@makingchatbots/n8n-nodes-genesys-cloud 0.1.3

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 (41) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +52 -0
  3. package/dist/credentials/GenesysCloudPlatformApiOAuth2Api.credentials.d.ts +10 -0
  4. package/dist/credentials/GenesysCloudPlatformApiOAuth2Api.credentials.js +144 -0
  5. package/dist/credentials/GenesysCloudPlatformApiOAuth2Api.credentials.js.map +1 -0
  6. package/dist/credentials/genesysCloud.svg +1 -0
  7. package/dist/nodes/GenesysCloud/ConversationDescription.d.ts +3 -0
  8. package/dist/nodes/GenesysCloud/ConversationDescription.js +253 -0
  9. package/dist/nodes/GenesysCloud/ConversationDescription.js.map +1 -0
  10. package/dist/nodes/GenesysCloud/ConversationOperation.d.ts +2 -0
  11. package/dist/nodes/GenesysCloud/ConversationOperation.js +56 -0
  12. package/dist/nodes/GenesysCloud/ConversationOperation.js.map +1 -0
  13. package/dist/nodes/GenesysCloud/GenericFunctions.d.ts +3 -0
  14. package/dist/nodes/GenesysCloud/GenericFunctions.js +116 -0
  15. package/dist/nodes/GenesysCloud/GenericFunctions.js.map +1 -0
  16. package/dist/nodes/GenesysCloud/GenesysCloud.node.d.ts +5 -0
  17. package/dist/nodes/GenesysCloud/GenesysCloud.node.js +146 -0
  18. package/dist/nodes/GenesysCloud/GenesysCloud.node.js.map +1 -0
  19. package/dist/nodes/GenesysCloud/GenesysCloud.node.json +18 -0
  20. package/dist/nodes/GenesysCloud/GroupDescription.d.ts +3 -0
  21. package/dist/nodes/GenesysCloud/GroupDescription.js +110 -0
  22. package/dist/nodes/GenesysCloud/GroupDescription.js.map +1 -0
  23. package/dist/nodes/GenesysCloud/GroupOperation.d.ts +3 -0
  24. package/dist/nodes/GenesysCloud/GroupOperation.js +30 -0
  25. package/dist/nodes/GenesysCloud/GroupOperation.js.map +1 -0
  26. package/dist/nodes/GenesysCloud/QueueDescription.d.ts +3 -0
  27. package/dist/nodes/GenesysCloud/QueueDescription.js +296 -0
  28. package/dist/nodes/GenesysCloud/QueueDescription.js.map +1 -0
  29. package/dist/nodes/GenesysCloud/QueueOperation.d.ts +4 -0
  30. package/dist/nodes/GenesysCloud/QueueOperation.js +44 -0
  31. package/dist/nodes/GenesysCloud/QueueOperation.js.map +1 -0
  32. package/dist/nodes/GenesysCloud/UserDescription.d.ts +3 -0
  33. package/dist/nodes/GenesysCloud/UserDescription.js +258 -0
  34. package/dist/nodes/GenesysCloud/UserDescription.js.map +1 -0
  35. package/dist/nodes/GenesysCloud/UserOperation.d.ts +2 -0
  36. package/dist/nodes/GenesysCloud/UserOperation.js +22 -0
  37. package/dist/nodes/GenesysCloud/UserOperation.js.map +1 -0
  38. package/dist/nodes/GenesysCloud/genesysCloud.svg +1 -0
  39. package/dist/package.json +61 -0
  40. package/dist/tsconfig.tsbuildinfo +1 -0
  41. package/package.json +61 -0
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2026 Lucas Woodward
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # Genesys Cloud Node for n8n
2
+
3
+ An n8n community node for [Genesys Cloud's Platform API](https://developer.genesys.cloud/platform/api/).
4
+
5
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
6
+
7
+ ## Installation
8
+
9
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
10
+
11
+ ## Credentials
12
+
13
+ You need to authenticate with Genesys Cloud using OAuth 2.0 Client Credentials.
14
+
15
+ 1. Log in to your Genesys Cloud organization.
16
+ 2. Navigate to **Admin** > **Integrations** > **OAuth**.
17
+ 3. Click **Add Client**.
18
+ 4. Give the client a name (e.g. "n8n Automation").
19
+ 5. Under **Grant Types**, select **Client Credentials**.
20
+ 6. Click the **Roles** tab and assign the necessary roles for the resources you intend to access.
21
+ 7. Save the client.
22
+ 8. Copy the **Client ID** and **Client Secret**.
23
+
24
+ In n8n:
25
+ 1. Create a new credential type **Genesys Cloud API**.
26
+ 2. Enter your **Client ID** and **Client Secret**.
27
+ 3. Select your **Region** (e.g., `mypurecloud.com`, `mypurecloud.ie`, etc.).
28
+
29
+ ## Operations
30
+
31
+ This node supports the following operations:
32
+
33
+ ### Conversation
34
+ * **Get**: Get a specific conversation by ID.
35
+ * **Get Many**: Retrieve a list of conversations with filters (e.g., by Interval).
36
+
37
+ ### Group
38
+ * **Get**: Get a specific group by ID.
39
+ * **Get Many**: Retrieve a list of groups.
40
+
41
+ ### Queue
42
+ * **Get**: Get a specific queue by ID.
43
+ * **Get Many**: Retrieve a list of queues.
44
+
45
+ ### User
46
+ * **Get**: Get a specific user by ID.
47
+ * **Get Many**: Retrieve a list of users.
48
+
49
+ ## Resources
50
+
51
+ * [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
52
+ * [Genesys Cloud Platform API Documentation](https://developer.genesys.cloud/platform/api/)
@@ -0,0 +1,10 @@
1
+ import type { Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class GenesysCloudPlatformApiOAuth2Api implements ICredentialType {
3
+ name: string;
4
+ extends: string[];
5
+ displayName: string;
6
+ documentationUrl: string;
7
+ icon: Icon;
8
+ properties: INodeProperties[];
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GenesysCloudPlatformApiOAuth2Api = void 0;
4
+ class GenesysCloudPlatformApiOAuth2Api {
5
+ constructor() {
6
+ this.name = 'genesysCloudPlatformApiOAuth2Api';
7
+ this.extends = ['oAuth2Api'];
8
+ this.displayName = 'Genesys Cloud Platform API OAuth2 API';
9
+ this.documentationUrl = 'https://developer.genesys.cloud/authorization/platform-auth/use-client-credentials';
10
+ this.icon = 'file:genesysCloud.svg';
11
+ this.properties = [
12
+ {
13
+ displayName: 'Grant Type',
14
+ name: 'grantType',
15
+ type: 'hidden',
16
+ default: 'clientCredentials',
17
+ },
18
+ {
19
+ displayName: 'Access Token URL',
20
+ name: 'accessTokenUrl',
21
+ type: 'hidden',
22
+ default: '=https://login.{{$self["region"]}}/oauth/token',
23
+ },
24
+ {
25
+ displayName: 'Authentication',
26
+ name: 'authentication',
27
+ type: 'hidden',
28
+ default: 'body',
29
+ },
30
+ {
31
+ displayName: 'Scope',
32
+ name: 'scope',
33
+ type: 'hidden',
34
+ default: '',
35
+ },
36
+ {
37
+ displayName: 'Token Key',
38
+ name: 'tokenKey',
39
+ type: 'hidden',
40
+ default: 'access_token',
41
+ typeOptions: { password: true },
42
+ },
43
+ {
44
+ displayName: 'Refresh Token Key',
45
+ name: 'refreshTokenKey',
46
+ type: 'hidden',
47
+ default: 'refresh_token',
48
+ typeOptions: { password: true },
49
+ },
50
+ {
51
+ displayName: 'Send Additional Body Properties',
52
+ name: 'sendAdditionalBodyProperties',
53
+ type: 'hidden',
54
+ default: false,
55
+ },
56
+ {
57
+ displayName: 'Allowed HTTP Request Domains',
58
+ name: 'allowedHttpRequestDomains',
59
+ type: 'hidden',
60
+ default: '',
61
+ },
62
+ {
63
+ displayName: 'Region',
64
+ name: 'region',
65
+ type: 'options',
66
+ options: [
67
+ {
68
+ name: 'US East (Virginia) - mypurecloud.com',
69
+ value: 'mypurecloud.com',
70
+ },
71
+ {
72
+ name: 'US East 2 (Ohio) - use2.us-gov-pure.cloud',
73
+ value: 'use2.us-gov-pure.cloud',
74
+ },
75
+ {
76
+ name: 'US West (Oregon) - usw2.pure.cloud',
77
+ value: 'usw2.pure.cloud',
78
+ },
79
+ {
80
+ name: 'Canada (Central) - cac1.pure.cloud',
81
+ value: 'cac1.pure.cloud',
82
+ },
83
+ {
84
+ name: 'Europe (Ireland) - mypurecloud.ie',
85
+ value: 'mypurecloud.ie',
86
+ },
87
+ {
88
+ name: 'Europe (London) - euw2.pure.cloud',
89
+ value: 'euw2.pure.cloud',
90
+ },
91
+ {
92
+ name: 'Europe (Frankfurt) - mypurecloud.de',
93
+ value: 'mypurecloud.de',
94
+ },
95
+ {
96
+ name: 'Europe (Zurich) - euc2.pure.cloud',
97
+ value: 'euc2.pure.cloud',
98
+ },
99
+ {
100
+ name: 'Asia Pacific (Mumbai) - aps1.pure.cloud',
101
+ value: 'aps1.pure.cloud',
102
+ },
103
+ {
104
+ name: 'Asia Pacific (Tokyo) - mypurecloud.jp',
105
+ value: 'mypurecloud.jp',
106
+ },
107
+ {
108
+ name: 'Asia Pacific (Seoul) - apne2.pure.cloud',
109
+ value: 'apne2.pure.cloud',
110
+ },
111
+ {
112
+ name: 'Asia Pacific (Osaka) - apne3.pure.cloud',
113
+ value: 'apne3.pure.cloud',
114
+ },
115
+ {
116
+ name: 'Asia Pacific (Sydney) - mypurecloud.com.au',
117
+ value: 'mypurecloud.com.au',
118
+ },
119
+ {
120
+ name: 'South America (São Paulo) - sae1.pure.cloud',
121
+ value: 'sae1.pure.cloud',
122
+ },
123
+ {
124
+ name: 'Middle East (UAE) - mec1.pure.cloud',
125
+ value: 'mec1.pure.cloud',
126
+ },
127
+ ],
128
+ default: 'mypurecloud.com',
129
+ description: 'The Genesys Cloud region',
130
+ },
131
+ ];
132
+ this.test = {
133
+ request: {
134
+ baseURL: '=https://api.{{$credentials.region}}',
135
+ url: '/api/v2/tokens/me',
136
+ headers: {
137
+ 'Content-Type': 'application/json',
138
+ },
139
+ },
140
+ };
141
+ }
142
+ }
143
+ exports.GenesysCloudPlatformApiOAuth2Api = GenesysCloudPlatformApiOAuth2Api;
144
+ //# sourceMappingURL=GenesysCloudPlatformApiOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenesysCloudPlatformApiOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/GenesysCloudPlatformApiOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,gCAAgC;IAA7C;QACC,SAAI,GAAG,kCAAkC,CAAC;QAC1C,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QACxB,gBAAW,GAAG,uCAAuC,CAAC;QACtD,qBAAgB,GACf,oFAAoF,CAAC;QACtF,SAAI,GAAS,uBAAuB,CAAC;QACrC,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;aAC5B;YACD;gBACC,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,gDAAgD;aACzD;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM;aACf;YACD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,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E,iBAAiB;qBACxB;oBACD;wBACC,IAAI,EAAE,uCAAuC;wBAC7C,KAAK,EAAE,gBAAgB;qBACvB;oBACD;wBACC,IAAI,EAAE,yCAAyC;wBAC/C,KAAK,EAAE,kBAAkB;qBACzB;oBACD;wBACC,IAAI,EAAE,yCAAyC;wBAC/C,KAAK,EAAE,kBAAkB;qBACzB;oBACD;wBACC,IAAI,EAAE,4CAA4C;wBAClD,KAAK,EAAE,oBAAoB;qBAC3B;oBACD;wBACC,IAAI,EAAE,6CAA6C;wBACnD,KAAK,EAAE,iBAAiB;qBACxB;oBACD;wBACC,IAAI,EAAE,qCAAqC;wBAC3C,KAAK,EAAE,iBAAiB;qBACxB;iBACD;gBACD,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,0BAA0B;aACvC;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,sCAAsC;gBAC/C,GAAG,EAAE,mBAAmB;gBACxB,OAAO,EAAE;oBACR,cAAc,EAAE,kBAAkB;iBAClC;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA1ID,4EA0IC"}
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?> <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Layer_1" x="0px" y="0px" viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve"> <style type="text/css"> .st0{fill:none;stroke:#F05224;stroke-width:2;stroke-miterlimit:10;} </style> <path class="st0" d="M1.3,27.1L1.3,27.1c0-3.3,2.7-6.1,6.1-6.1H18c1.6,0,2.9,1.3,2.9,2.9c0,0,0,0,0,0l0,0c0,1.6-1.3,2.9-2.9,2.9 h-3.5c-3.3,0-6.1-2.7-6.1-6.1l0,0c0-3.3,2.7-6.1,6.1-6.1h15.9c5.1,0,9.3,4.1,9.3,9.3c0,0,0,0,0,0l0,0c0,5.1-4.1,9.3-9.3,9.3l0,0H7.4 C4.1,33.1,1.3,30.4,1.3,27.1z"></path> <path class="st0" d="M33.1,28.7h9c2.4,0,4.3,1.9,4.3,4.3l0,0c0,2.4-1.9,4.3-4.3,4.3h-9c-2.4,0-4.3-1.9-4.3-4.3l0,0 C28.7,30.6,30.7,28.7,33.1,28.7z"></path> <path class="st0" d="M22,9.9h9c2.4,0,4.3,1.9,4.3,4.3l0,0c0,2.4-1.9,4.3-4.3,4.3h-9c-2.4,0-4.3-1.9-4.3-4.3l0,0 C17.6,11.9,19.6,9.9,22,9.9z"></path> </svg>
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const conversationOperations: INodeProperties[];
3
+ export declare const conversationFields: INodeProperties[];
@@ -0,0 +1,253 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.conversationFields = exports.conversationOperations = void 0;
4
+ exports.conversationOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['conversation'],
13
+ },
14
+ },
15
+ options: [
16
+ {
17
+ name: 'Get',
18
+ value: 'get',
19
+ description: 'Get a conversation',
20
+ action: 'Get a conversation',
21
+ },
22
+ {
23
+ name: 'Get Many',
24
+ value: 'getAll',
25
+ description: 'Get many active conversations',
26
+ action: 'Get many conversations',
27
+ },
28
+ ],
29
+ default: 'get',
30
+ },
31
+ ];
32
+ exports.conversationFields = [
33
+ {
34
+ displayName: 'Conversation ID',
35
+ name: 'conversationId',
36
+ type: 'string',
37
+ required: true,
38
+ default: '',
39
+ displayOptions: {
40
+ show: {
41
+ resource: ['conversation'],
42
+ operation: ['get'],
43
+ },
44
+ },
45
+ description: 'The ID of the conversation',
46
+ },
47
+ {
48
+ displayName: 'Return All',
49
+ name: 'returnAll',
50
+ type: 'boolean',
51
+ displayOptions: {
52
+ show: {
53
+ resource: ['conversation'],
54
+ operation: ['getAll'],
55
+ },
56
+ },
57
+ default: false,
58
+ description: 'Whether to return all results or only up to a given limit',
59
+ },
60
+ {
61
+ displayName: 'Limit',
62
+ name: 'limit',
63
+ type: 'number',
64
+ displayOptions: {
65
+ show: {
66
+ resource: ['conversation'],
67
+ operation: ['getAll'],
68
+ returnAll: [false],
69
+ },
70
+ },
71
+ typeOptions: {
72
+ minValue: 1,
73
+ maxValue: 100,
74
+ },
75
+ default: 50,
76
+ description: 'Max number of results to return',
77
+ },
78
+ {
79
+ displayName: 'Start Date',
80
+ name: 'startDate',
81
+ type: 'dateTime',
82
+ required: true,
83
+ default: '',
84
+ displayOptions: {
85
+ show: {
86
+ resource: ['conversation'],
87
+ operation: ['getAll'],
88
+ },
89
+ },
90
+ description: 'The start date and time for the query range',
91
+ },
92
+ {
93
+ displayName: 'End Date',
94
+ name: 'endDate',
95
+ type: 'dateTime',
96
+ required: true,
97
+ default: '',
98
+ displayOptions: {
99
+ show: {
100
+ resource: ['conversation'],
101
+ operation: ['getAll'],
102
+ },
103
+ },
104
+ description: 'The end date and time for the query range',
105
+ },
106
+ {
107
+ displayName: 'Options',
108
+ name: 'options',
109
+ type: 'collection',
110
+ placeholder: 'Add Option',
111
+ default: {},
112
+ displayOptions: {
113
+ show: {
114
+ resource: ['conversation'],
115
+ operation: ['getAll'],
116
+ },
117
+ },
118
+ options: [
119
+ {
120
+ displayName: 'Order',
121
+ name: 'order',
122
+ type: 'options',
123
+ options: [
124
+ {
125
+ name: 'Ascending',
126
+ value: 'asc',
127
+ },
128
+ {
129
+ name: 'Descending',
130
+ value: 'desc',
131
+ },
132
+ ],
133
+ default: 'asc',
134
+ description: 'Sort order for results',
135
+ },
136
+ {
137
+ displayName: 'Order By',
138
+ name: 'orderBy',
139
+ type: 'options',
140
+ options: [
141
+ {
142
+ name: 'Conversation Start',
143
+ value: 'conversationStart',
144
+ },
145
+ {
146
+ name: 'Conversation End',
147
+ value: 'conversationEnd',
148
+ },
149
+ {
150
+ name: 'Segment Start',
151
+ value: 'segmentStart',
152
+ },
153
+ {
154
+ name: 'Segment End',
155
+ value: 'segmentEnd',
156
+ },
157
+ ],
158
+ default: 'conversationStart',
159
+ description: 'Which field to sort results by',
160
+ },
161
+ {
162
+ displayName: 'Segment Filters',
163
+ name: 'segmentFilters',
164
+ type: 'fixedCollection',
165
+ typeOptions: {
166
+ multipleValues: true,
167
+ },
168
+ placeholder: 'Add Filter',
169
+ default: {},
170
+ description: 'Filter conversations by specific dimensions',
171
+ options: [
172
+ {
173
+ displayName: 'Filters',
174
+ name: 'filters',
175
+ values: [
176
+ {
177
+ displayName: 'Dimension',
178
+ name: 'dimension',
179
+ type: 'options',
180
+ options: [
181
+ {
182
+ name: 'Direction',
183
+ value: 'direction',
184
+ description: 'Inbound or outbound conversation',
185
+ },
186
+ {
187
+ name: 'Media Type',
188
+ value: 'mediaType',
189
+ description: 'Type of media (voice, chat, email, etc.)',
190
+ },
191
+ {
192
+ name: 'Queue ID',
193
+ value: 'queueId',
194
+ description: 'The queue that handled the conversation',
195
+ },
196
+ {
197
+ name: 'User ID',
198
+ value: 'userId',
199
+ description: 'The user (agent) involved in the conversation',
200
+ },
201
+ {
202
+ name: 'Wrap-up Code',
203
+ value: 'wrapUpCode',
204
+ description: 'The wrap-up code applied to the conversation',
205
+ },
206
+ ],
207
+ default: 'mediaType',
208
+ description: 'The dimension to filter by',
209
+ },
210
+ {
211
+ displayName: 'Operator',
212
+ name: 'operator',
213
+ type: 'options',
214
+ options: [
215
+ {
216
+ name: 'Matches',
217
+ value: 'matches',
218
+ description: 'Dimension equals the specified value',
219
+ },
220
+ {
221
+ name: 'Exists',
222
+ value: 'exists',
223
+ description: 'Dimension has any value',
224
+ },
225
+ {
226
+ name: 'Not Exists',
227
+ value: 'notExists',
228
+ description: 'Dimension has no value',
229
+ },
230
+ ],
231
+ default: 'matches',
232
+ description: 'How to compare the dimension',
233
+ },
234
+ {
235
+ displayName: 'Value',
236
+ name: 'value',
237
+ type: 'string',
238
+ default: '',
239
+ displayOptions: {
240
+ show: {
241
+ operator: ['matches'],
242
+ },
243
+ },
244
+ description: 'The value to match against. For Media Type use: voice, chat, email, callback, message, screenshare, cobrowse, video. For Direction use: inbound, outbound.',
245
+ },
246
+ ],
247
+ },
248
+ ],
249
+ },
250
+ ],
251
+ },
252
+ ];
253
+ //# sourceMappingURL=ConversationDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationDescription.js","sourceRoot":"","sources":["../../../nodes/GenesysCloud/ConversationDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,cAAc,CAAC;aAC1B;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,oBAAoB;gBACjC,MAAM,EAAE,oBAAoB;aAC5B;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,+BAA+B;gBAC5C,MAAM,EAAE,wBAAwB;aAChC;SACD;QACD,OAAO,EAAE,KAAK;KACd;CACD,CAAC;AAEW,QAAA,kBAAkB,GAAsB;IAIpD;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE,4BAA4B;KACzC;IAKD;QACC,WAAW,EAAE,YAAY;QAC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D;qBACD;iBACD;aACD;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function conversationOperation(this: IExecuteFunctions, index: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.conversationOperation = conversationOperation;
4
+ const GenericFunctions_1 = require("./GenericFunctions");
5
+ async function conversationOperation(index) {
6
+ const operation = this.getNodeParameter('operation', index);
7
+ let responseData;
8
+ const qs = {};
9
+ if (operation === 'get') {
10
+ const conversationId = this.getNodeParameter('conversationId', index);
11
+ responseData = await GenericFunctions_1.genesysCloudApiRequest.call(this, 'GET', `/api/v2/conversations/${conversationId}`, {}, qs);
12
+ }
13
+ else if (operation === 'getAll') {
14
+ const returnAll = this.getNodeParameter('returnAll', index);
15
+ const limit = returnAll ? 0 : this.getNodeParameter('limit', index);
16
+ const startDate = this.getNodeParameter('startDate', index);
17
+ const endDate = this.getNodeParameter('endDate', index);
18
+ const interval = `${startDate}/${endDate}`;
19
+ const options = this.getNodeParameter('options', index);
20
+ const body = {
21
+ interval,
22
+ };
23
+ if (options.order) {
24
+ body.order = options.order;
25
+ }
26
+ if (options.orderBy) {
27
+ body.orderBy = options.orderBy;
28
+ }
29
+ const segmentFiltersOption = options.segmentFilters;
30
+ if (segmentFiltersOption === null || segmentFiltersOption === void 0 ? void 0 : segmentFiltersOption.filters) {
31
+ const filters = segmentFiltersOption.filters;
32
+ if (filters.length > 0) {
33
+ const predicates = filters.map((filter) => {
34
+ const predicate = {
35
+ type: 'dimension',
36
+ dimension: filter.dimension,
37
+ operator: filter.operator,
38
+ };
39
+ if (filter.operator === 'matches' && filter.value) {
40
+ predicate.value = filter.value;
41
+ }
42
+ return predicate;
43
+ });
44
+ body.segmentFilters = [
45
+ {
46
+ type: 'and',
47
+ predicates,
48
+ },
49
+ ];
50
+ }
51
+ }
52
+ responseData = await GenericFunctions_1.genesysCloudApiRequestAllItems.call(this, 'conversations', 'POST', '/api/v2/analytics/conversations/details/query', body, qs, limit, 'body');
53
+ }
54
+ return this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: index } });
55
+ }
56
+ //# sourceMappingURL=ConversationOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationOperation.js","sourceRoot":"","sources":["../../../nodes/GenesysCloud/ConversationOperation.ts"],"names":[],"mappings":";;AAGA,sDAkFC;AApFD,yDAA4F;AAErF,KAAK,UAAU,qBAAqB,CAE1C,KAAa;IAEb,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAW,CAAC;IACtE,IAAI,YAAY,CAAC;IACjB,MAAM,EAAE,GAAgB,EAAE,CAAC;IAE3B,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QACzB,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,KAAK,CAAW,CAAC;QAChF,YAAY,GAAG,MAAM,yCAAsB,CAAC,IAAI,CAC/C,IAAI,EACJ,KAAK,EACL,yBAAyB,cAAc,EAAE,EACzC,EAAE,EACF,EAAE,CACF,CAAC;IACH,CAAC;SAAM,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QACnC,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAY,CAAC;QACvE,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAY,CAAC;QAChF,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAW,CAAC;QACtE,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK,CAAW,CAAC;QAClE,MAAM,QAAQ,GAAG,GAAG,SAAS,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AC/C,IAAI,EACJ,EAAE,EACF,KAAK,EACL,MAAM,CACN,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAC7C,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,YAA6B,CAAC,EAC3D,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAC7B,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IDataObject, IExecuteFunctions, IHttpRequestMethods, ILoadOptionsFunctions, IPollFunctions } from 'n8n-workflow';
2
+ export declare function genesysCloudApiRequest(this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, method: IHttpRequestMethods, resource: string, body?: IDataObject, query?: IDataObject): Promise<any>;
3
+ export declare function genesysCloudApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, propertyName: string, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, query?: IDataObject, limit?: number, paginationLoc?: 'query' | 'body'): Promise<IDataObject[]>;