n8n-nodes-autotask 2.5.0 → 2.5.2

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 (158) hide show
  1. package/dist/credentials/AutotaskApi.credentials.js +292 -290
  2. package/dist/credentials/AutotaskApi.credentials.js.map +1 -1
  3. package/dist/nodes/Autotask/Autotask.node.js +119 -115
  4. package/dist/nodes/Autotask/Autotask.node.js.map +1 -1
  5. package/dist/nodes/Autotask/AutotaskAiTools.node.js +80 -74
  6. package/dist/nodes/Autotask/AutotaskAiTools.node.js.map +1 -1
  7. package/dist/nodes/Autotask/AutotaskTrigger.node.d.ts.map +1 -1
  8. package/dist/nodes/Autotask/AutotaskTrigger.node.js +616 -609
  9. package/dist/nodes/Autotask/AutotaskTrigger.node.js.map +1 -1
  10. package/dist/nodes/Autotask/ai-tools/description-builders.js +4 -2
  11. package/dist/nodes/Autotask/ai-tools/description-builders.js.map +1 -1
  12. package/dist/nodes/Autotask/ai-tools/schema-generator.js +3 -2
  13. package/dist/nodes/Autotask/ai-tools/schema-generator.js.map +1 -1
  14. package/dist/nodes/Autotask/ai-tools/tool-executor.js +34 -27
  15. package/dist/nodes/Autotask/ai-tools/tool-executor.js.map +1 -1
  16. package/dist/nodes/Autotask/constants/resource-operations.js +9 -6
  17. package/dist/nodes/Autotask/constants/resource-operations.js.map +1 -1
  18. package/dist/nodes/Autotask/helpers/aiHelper.js +18 -13
  19. package/dist/nodes/Autotask/helpers/aiHelper.js.map +1 -1
  20. package/dist/nodes/Autotask/helpers/cache/service.js +12 -18
  21. package/dist/nodes/Autotask/helpers/cache/service.js.map +1 -1
  22. package/dist/nodes/Autotask/helpers/common-operations-context.js +3 -2
  23. package/dist/nodes/Autotask/helpers/common-operations-context.js.map +1 -1
  24. package/dist/nodes/Autotask/helpers/company-domain-search.js +7 -5
  25. package/dist/nodes/Autotask/helpers/company-domain-search.js.map +1 -1
  26. package/dist/nodes/Autotask/helpers/consolidate-properties.js +7 -5
  27. package/dist/nodes/Autotask/helpers/consolidate-properties.js.map +1 -1
  28. package/dist/nodes/Autotask/helpers/contact-mover.js +31 -22
  29. package/dist/nodes/Autotask/helpers/contact-mover.js.map +1 -1
  30. package/dist/nodes/Autotask/helpers/date-time/errors.js +0 -2
  31. package/dist/nodes/Autotask/helpers/date-time/errors.js.map +1 -1
  32. package/dist/nodes/Autotask/helpers/date-time/utils.js +2 -2
  33. package/dist/nodes/Autotask/helpers/date-time/utils.js.map +1 -1
  34. package/dist/nodes/Autotask/helpers/date-time/wrapper.js +1 -4
  35. package/dist/nodes/Autotask/helpers/date-time/wrapper.js.map +1 -1
  36. package/dist/nodes/Autotask/helpers/entity/api.js +29 -25
  37. package/dist/nodes/Autotask/helpers/entity/api.js.map +1 -1
  38. package/dist/nodes/Autotask/helpers/entity/core.js +0 -2
  39. package/dist/nodes/Autotask/helpers/entity/core.js.map +1 -1
  40. package/dist/nodes/Autotask/helpers/entity/deep-link.js +2 -1
  41. package/dist/nodes/Autotask/helpers/entity/deep-link.js.map +1 -1
  42. package/dist/nodes/Autotask/helpers/entity/picklist.js +2 -1
  43. package/dist/nodes/Autotask/helpers/entity/picklist.js.map +1 -1
  44. package/dist/nodes/Autotask/helpers/entity/utils.js +2 -1
  45. package/dist/nodes/Autotask/helpers/entity/utils.js.map +1 -1
  46. package/dist/nodes/Autotask/helpers/entity/writable-fields.js +1 -1
  47. package/dist/nodes/Autotask/helpers/entity/writable-fields.js.map +1 -1
  48. package/dist/nodes/Autotask/helpers/entity-values/field-mapping.js +4 -4
  49. package/dist/nodes/Autotask/helpers/entity-values/field-mapping.js.map +1 -1
  50. package/dist/nodes/Autotask/helpers/entity-values/value-helper.js +14 -16
  51. package/dist/nodes/Autotask/helpers/entity-values/value-helper.js.map +1 -1
  52. package/dist/nodes/Autotask/helpers/errorHandler.js +10 -7
  53. package/dist/nodes/Autotask/helpers/errorHandler.js.map +1 -1
  54. package/dist/nodes/Autotask/helpers/field-conversion/pipeline.js +2 -3
  55. package/dist/nodes/Autotask/helpers/field-conversion/pipeline.js.map +1 -1
  56. package/dist/nodes/Autotask/helpers/field-conversion/steps.js +1 -1
  57. package/dist/nodes/Autotask/helpers/field-conversion/steps.js.map +1 -1
  58. package/dist/nodes/Autotask/helpers/filter.js +3 -3
  59. package/dist/nodes/Autotask/helpers/filter.js.map +1 -1
  60. package/dist/nodes/Autotask/helpers/http/body-builder.js +3 -3
  61. package/dist/nodes/Autotask/helpers/http/body-builder.js.map +1 -1
  62. package/dist/nodes/Autotask/helpers/http/initRateTracker.js +1 -1
  63. package/dist/nodes/Autotask/helpers/http/initRateTracker.js.map +1 -1
  64. package/dist/nodes/Autotask/helpers/http/rateLimit.js +19 -20
  65. package/dist/nodes/Autotask/helpers/http/rateLimit.js.map +1 -1
  66. package/dist/nodes/Autotask/helpers/http/request.js +24 -20
  67. package/dist/nodes/Autotask/helpers/http/request.js.map +1 -1
  68. package/dist/nodes/Autotask/helpers/http/retryHandler.js +11 -10
  69. package/dist/nodes/Autotask/helpers/http/retryHandler.js.map +1 -1
  70. package/dist/nodes/Autotask/helpers/http/threadLimit.js +4 -5
  71. package/dist/nodes/Autotask/helpers/http/threadLimit.js.map +1 -1
  72. package/dist/nodes/Autotask/helpers/impersonation.js +2 -1
  73. package/dist/nodes/Autotask/helpers/impersonation.js.map +1 -1
  74. package/dist/nodes/Autotask/helpers/inactive-entity-activation.js +6 -3
  75. package/dist/nodes/Autotask/helpers/inactive-entity-activation.js.map +1 -1
  76. package/dist/nodes/Autotask/helpers/label-resolution.js +8 -6
  77. package/dist/nodes/Autotask/helpers/label-resolution.js.map +1 -1
  78. package/dist/nodes/Autotask/helpers/pagination.js +1 -4
  79. package/dist/nodes/Autotask/helpers/pagination.js.map +1 -1
  80. package/dist/nodes/Autotask/helpers/resource-operations.helper.js +44 -36
  81. package/dist/nodes/Autotask/helpers/resource-operations.helper.js.map +1 -1
  82. package/dist/nodes/Autotask/helpers/resourceMapper.js +1 -1
  83. package/dist/nodes/Autotask/helpers/resourceMapper.js.map +1 -1
  84. package/dist/nodes/Autotask/helpers/searchFilterBuilder.js +10 -6
  85. package/dist/nodes/Autotask/helpers/searchFilterBuilder.js.map +1 -1
  86. package/dist/nodes/Autotask/helpers/webhook/fieldConfiguration.js +1 -1
  87. package/dist/nodes/Autotask/helpers/webhook/fieldConfiguration.js.map +1 -1
  88. package/dist/nodes/Autotask/helpers/webhook/fields.js +7 -5
  89. package/dist/nodes/Autotask/helpers/webhook/fields.js.map +1 -1
  90. package/dist/nodes/Autotask/helpers/webhook/resources.js +3 -2
  91. package/dist/nodes/Autotask/helpers/webhook/resources.js.map +1 -1
  92. package/dist/nodes/Autotask/helpers/work-reassigner.js +44 -39
  93. package/dist/nodes/Autotask/helpers/work-reassigner.js.map +1 -1
  94. package/dist/nodes/Autotask/operations/base/base-operation.js +21 -21
  95. package/dist/nodes/Autotask/operations/base/base-operation.js.map +1 -1
  96. package/dist/nodes/Autotask/operations/base/count-operation.js +2 -1
  97. package/dist/nodes/Autotask/operations/base/count-operation.js.map +1 -1
  98. package/dist/nodes/Autotask/operations/base/create-operation.js +3 -3
  99. package/dist/nodes/Autotask/operations/base/create-operation.js.map +1 -1
  100. package/dist/nodes/Autotask/operations/base/delete-operation.js +1 -1
  101. package/dist/nodes/Autotask/operations/base/delete-operation.js.map +1 -1
  102. package/dist/nodes/Autotask/operations/base/field-processor.js +28 -30
  103. package/dist/nodes/Autotask/operations/base/field-processor.js.map +1 -1
  104. package/dist/nodes/Autotask/operations/base/field-validator.js +3 -6
  105. package/dist/nodes/Autotask/operations/base/field-validator.js.map +1 -1
  106. package/dist/nodes/Autotask/operations/base/field-values.js +7 -5
  107. package/dist/nodes/Autotask/operations/base/field-values.js.map +1 -1
  108. package/dist/nodes/Autotask/operations/base/get-many-advanced.operation.js +2 -3
  109. package/dist/nodes/Autotask/operations/base/get-many-advanced.operation.js.map +1 -1
  110. package/dist/nodes/Autotask/operations/base/get-many.js +11 -14
  111. package/dist/nodes/Autotask/operations/base/get-many.js.map +1 -1
  112. package/dist/nodes/Autotask/operations/base/getEntityInfo.operation.js +1 -1
  113. package/dist/nodes/Autotask/operations/base/getEntityInfo.operation.js.map +1 -1
  114. package/dist/nodes/Autotask/operations/base/update-operation.js +3 -3
  115. package/dist/nodes/Autotask/operations/base/update-operation.js.map +1 -1
  116. package/dist/nodes/Autotask/operations/common/json-parameters/description.js +6 -3
  117. package/dist/nodes/Autotask/operations/common/json-parameters/description.js.map +1 -1
  118. package/dist/nodes/Autotask/operations/common/picklist-labels/description.js +2 -1
  119. package/dist/nodes/Autotask/operations/common/picklist-labels/description.js.map +1 -1
  120. package/dist/nodes/Autotask/operations/common/reference-labels/description.js +2 -1
  121. package/dist/nodes/Autotask/operations/common/reference-labels/description.js.map +1 -1
  122. package/dist/nodes/Autotask/operations/common/scoped-query.js +12 -10
  123. package/dist/nodes/Autotask/operations/common/scoped-query.js.map +1 -1
  124. package/dist/nodes/Autotask/operations/common/select-columns/description.js +2 -1
  125. package/dist/nodes/Autotask/operations/common/select-columns/description.js.map +1 -1
  126. package/dist/nodes/Autotask/operations/common/udf-flattening/description.js +2 -1
  127. package/dist/nodes/Autotask/operations/common/udf-flattening/description.js.map +1 -1
  128. package/dist/nodes/Autotask/resources/appointments/execute.js +1 -1
  129. package/dist/nodes/Autotask/resources/appointments/execute.js.map +1 -1
  130. package/dist/nodes/Autotask/resources/configurationItems/moveConfigurationItem.js +41 -35
  131. package/dist/nodes/Autotask/resources/configurationItems/moveConfigurationItem.js.map +1 -1
  132. package/dist/nodes/Autotask/resources/invoices/execute.js +5 -4
  133. package/dist/nodes/Autotask/resources/invoices/execute.js.map +1 -1
  134. package/dist/nodes/Autotask/resources/taskSecondaryResources/execute.js +1 -1
  135. package/dist/nodes/Autotask/resources/taskSecondaryResources/execute.js.map +1 -1
  136. package/dist/nodes/Autotask/resources/ticketAttachments/execute.js +4 -3
  137. package/dist/nodes/Autotask/resources/ticketAttachments/execute.js.map +1 -1
  138. package/dist/nodes/Autotask/resources/ticketChangeRequestApprovals/execute.js +4 -3
  139. package/dist/nodes/Autotask/resources/ticketChangeRequestApprovals/execute.js.map +1 -1
  140. package/dist/nodes/Autotask/resources/ticketNoteAttachments/execute.js +4 -3
  141. package/dist/nodes/Autotask/resources/ticketNoteAttachments/execute.js.map +1 -1
  142. package/dist/nodes/Autotask/resources/ticketSecondaryResources/execute.js +1 -1
  143. package/dist/nodes/Autotask/resources/ticketSecondaryResources/execute.js.map +1 -1
  144. package/dist/nodes/Autotask/resources/tickets/execute.js +14 -10
  145. package/dist/nodes/Autotask/resources/tickets/execute.js.map +1 -1
  146. package/dist/nodes/Autotask/resources/timeEntries/execute.js +21 -17
  147. package/dist/nodes/Autotask/resources/timeEntries/execute.js.map +1 -1
  148. package/dist/nodes/Autotask/resources/timeEntryAttachments/execute.js +4 -3
  149. package/dist/nodes/Autotask/resources/timeEntryAttachments/execute.js.map +1 -1
  150. package/dist/nodes/Autotask/resources/tool/execute.js +7 -5
  151. package/dist/nodes/Autotask/resources/tool/execute.js.map +1 -1
  152. package/dist/package.json +1 -1
  153. package/dist/tsconfig.tsbuildinfo +1 -1
  154. package/package.json +1 -1
  155. package/dist/index.d.ts +0 -5
  156. package/dist/index.d.ts.map +0 -1
  157. package/dist/index.js +0 -10
  158. package/dist/index.js.map +0 -1
@@ -7,321 +7,323 @@ exports.AutotaskApi = void 0;
7
7
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
8
8
  const cache_1 = require("../nodes/Autotask/helpers/cache");
9
9
  class AutotaskApi {
10
- name = 'autotaskApi';
11
- displayName = 'Autotask API';
12
- icon = 'file:../nodes/Autotask/autotask.svg';
13
- documentationUrl = 'https://ww6.autotask.net/help/developerhelp/Content/APIs/REST/REST_API_Home.htm';
14
- properties = [
15
- {
16
- displayName: 'API Integration Code',
17
- name: 'APIIntegrationcode',
18
- type: 'string',
19
- typeOptions: {
20
- password: true,
10
+ constructor() {
11
+ this.name = 'autotaskApi';
12
+ this.displayName = 'Autotask API';
13
+ this.icon = 'file:../nodes/Autotask/autotask.svg';
14
+ this.documentationUrl = 'https://ww6.autotask.net/help/developerhelp/Content/APIs/REST/REST_API_Home.htm';
15
+ this.properties = [
16
+ {
17
+ displayName: 'API Integration Code',
18
+ name: 'APIIntegrationcode',
19
+ type: 'string',
20
+ typeOptions: {
21
+ password: true,
22
+ },
23
+ default: '',
24
+ required: true,
25
+ description: 'The unique API Integration Code from your Autotask account (found in Admin > API User Security)',
21
26
  },
22
- default: '',
23
- required: true,
24
- description: 'The unique API Integration Code from your Autotask account (found in Admin > API User Security)',
25
- },
26
- {
27
- displayName: 'Username',
28
- name: 'Username',
29
- type: 'string',
30
- default: '',
31
- required: true,
32
- description: 'Username of your Autotask account (must have API access enabled)',
33
- },
34
- {
35
- displayName: 'Secret',
36
- name: 'Secret',
37
- type: 'string',
38
- typeOptions: {
39
- password: true,
27
+ {
28
+ displayName: 'Username',
29
+ name: 'Username',
30
+ type: 'string',
31
+ default: '',
32
+ required: true,
33
+ description: 'Username of your Autotask account (must have API access enabled)',
40
34
  },
41
- default: '',
42
- required: true,
43
- description: 'Secret key obtained from Autotask API User Security settings',
44
- },
45
- {
46
- displayName: 'Zone',
47
- name: 'zone',
48
- type: 'options',
49
- options: [
50
- {
51
- name: 'Pre-release',
52
- value: 'https://webservices2.autotask.net/atservicesrest',
53
- },
54
- {
55
- name: 'Pre-release (UK)',
56
- value: 'https://webservices11.autotask.net/atservicesrest',
57
- },
58
- {
59
- name: 'Limited Release',
60
- value: 'https://webservices1.autotask.net/atservicesrest',
61
- },
62
- {
63
- name: 'Limited Release (UK)',
64
- value: 'https://webservices17.autotask.net/atservicesrest',
65
- },
66
- {
67
- name: 'America East',
68
- value: 'https://webservices3.autotask.net/atservicesrest',
69
- },
70
- {
71
- name: 'America East 2',
72
- value: 'https://webservices14.autotask.net/atservicesrest',
73
- },
74
- {
75
- name: 'America East 3',
76
- value: 'https://webservices22.autotask.net/atservicesrest',
77
- },
78
- {
79
- name: 'America West',
80
- value: 'https://webservices5.autotask.net/atservicesrest',
81
- },
82
- {
83
- name: 'America West 2',
84
- value: 'https://webservices15.autotask.net/atservicesrest',
85
- },
86
- {
87
- name: 'America West 3',
88
- value: 'https://webservices24.autotask.net/atservicesrest',
89
- },
90
- {
91
- name: 'America West 4',
92
- value: 'https://webservices25.autotask.net/atservicesrest',
93
- },
94
- {
95
- name: 'UK',
96
- value: 'https://webservices4.autotask.net/atservicesrest',
97
- },
98
- {
99
- name: 'UK2',
100
- value: 'https://webservices16.autotask.net/atservicesrest',
101
- },
102
- {
103
- name: 'UK3',
104
- value: 'https://webservices28.autotask.net/atservicesrest',
105
- },
106
- {
107
- name: 'Australia / New Zealand',
108
- value: 'https://webservices6.autotask.net/atservicesrest',
109
- },
110
- {
111
- name: 'Australia / New Zealand (Sydney — from 11 Mar 2026)',
112
- value: 'https://webservices29.autotask.net/atservicesrest',
113
- },
114
- {
115
- name: 'Australia 2',
116
- value: 'https://webservices26.autotask.net/atservicesrest',
117
- },
118
- {
119
- name: 'Pre-Release (Deutsch)',
120
- value: 'https://prde.autotask.net/atservicesrest',
121
- },
122
- {
123
- name: 'Pre-Release (Español)',
124
- value: 'https://pres.autotask.net/atservicesrest',
125
- },
126
- {
127
- name: 'German (Deutsch)',
128
- value: 'https://webservices18.autotask.net/atservicesrest',
129
- },
130
- {
131
- name: 'EU1 (English Europe and Asia)',
132
- value: 'https://webservices19.autotask.net/atservicesrest',
133
- },
134
- {
135
- name: 'Spanish (Español)',
136
- value: 'https://webservices12.autotask.net/atservicesrest',
137
- },
138
- {
139
- name: 'Other (Custom URL)',
140
- value: 'other',
141
- },
142
- ],
143
- default: 'https://webservices6.autotask.net/atservicesrest',
144
- required: true,
145
- description: 'Select your Autotask instance zone. If unsure, use "Other" to specify a custom URL. Zone list sourced from: https://ww6.autotask.net/help/developerhelp/Content/APIs/General/API_Zones.htm',
146
- },
147
- {
148
- displayName: 'Custom Zone URL',
149
- name: 'customZoneUrl',
150
- type: 'string',
151
- default: '',
152
- required: true,
153
- displayOptions: {
154
- show: {
155
- zone: ['other'],
156
- },
35
+ {
36
+ displayName: 'Secret',
37
+ name: 'Secret',
38
+ type: 'string',
39
+ typeOptions: {
40
+ password: true,
41
+ },
42
+ default: '',
43
+ required: true,
44
+ description: 'Secret key obtained from Autotask API User Security settings',
157
45
  },
158
- description: 'Enter your custom Autotask zone URL. You can get this information from your Autotask administrator.',
159
- },
160
- {
161
- displayName: 'Timezone',
162
- name: 'timezone',
163
- type: 'options',
164
- options: moment_timezone_1.default.tz.names().map((tz) => ({ name: tz, value: tz })),
165
- default: 'UTC',
166
- required: true,
167
- description: 'Select your timezone. All dates/times in the Autotask API are in UTC and will be automatically converted to/from this timezone.',
168
- hint: 'This setting affects how dates and times are displayed and entered in the node. The API always uses UTC internally.',
169
- },
170
- // Cache Configuration
171
- {
172
- displayName: 'Enable Field Caching',
173
- name: 'cacheEnabled',
174
- type: 'boolean',
175
- default: true,
176
- description: 'Whether to cache field values to reduce API calls',
177
- },
178
- {
179
- displayName: 'Cache TTL',
180
- name: 'cacheTTL',
181
- type: 'number',
182
- default: 86400,
183
- description: 'How long to cache field values (in seconds)',
184
- displayOptions: {
185
- show: {
186
- cacheEnabled: [true],
46
+ {
47
+ displayName: 'Zone',
48
+ name: 'zone',
49
+ type: 'options',
50
+ options: [
51
+ {
52
+ name: 'Pre-release',
53
+ value: 'https://webservices2.autotask.net/atservicesrest',
54
+ },
55
+ {
56
+ name: 'Pre-release (UK)',
57
+ value: 'https://webservices11.autotask.net/atservicesrest',
58
+ },
59
+ {
60
+ name: 'Limited Release',
61
+ value: 'https://webservices1.autotask.net/atservicesrest',
62
+ },
63
+ {
64
+ name: 'Limited Release (UK)',
65
+ value: 'https://webservices17.autotask.net/atservicesrest',
66
+ },
67
+ {
68
+ name: 'America East',
69
+ value: 'https://webservices3.autotask.net/atservicesrest',
70
+ },
71
+ {
72
+ name: 'America East 2',
73
+ value: 'https://webservices14.autotask.net/atservicesrest',
74
+ },
75
+ {
76
+ name: 'America East 3',
77
+ value: 'https://webservices22.autotask.net/atservicesrest',
78
+ },
79
+ {
80
+ name: 'America West',
81
+ value: 'https://webservices5.autotask.net/atservicesrest',
82
+ },
83
+ {
84
+ name: 'America West 2',
85
+ value: 'https://webservices15.autotask.net/atservicesrest',
86
+ },
87
+ {
88
+ name: 'America West 3',
89
+ value: 'https://webservices24.autotask.net/atservicesrest',
90
+ },
91
+ {
92
+ name: 'America West 4',
93
+ value: 'https://webservices25.autotask.net/atservicesrest',
94
+ },
95
+ {
96
+ name: 'UK',
97
+ value: 'https://webservices4.autotask.net/atservicesrest',
98
+ },
99
+ {
100
+ name: 'UK2',
101
+ value: 'https://webservices16.autotask.net/atservicesrest',
102
+ },
103
+ {
104
+ name: 'UK3',
105
+ value: 'https://webservices28.autotask.net/atservicesrest',
106
+ },
107
+ {
108
+ name: 'Australia / New Zealand',
109
+ value: 'https://webservices6.autotask.net/atservicesrest',
110
+ },
111
+ {
112
+ name: 'Australia / New Zealand (Sydney — from 11 Mar 2026)',
113
+ value: 'https://webservices29.autotask.net/atservicesrest',
114
+ },
115
+ {
116
+ name: 'Australia 2',
117
+ value: 'https://webservices26.autotask.net/atservicesrest',
118
+ },
119
+ {
120
+ name: 'Pre-Release (Deutsch)',
121
+ value: 'https://prde.autotask.net/atservicesrest',
122
+ },
123
+ {
124
+ name: 'Pre-Release (Español)',
125
+ value: 'https://pres.autotask.net/atservicesrest',
126
+ },
127
+ {
128
+ name: 'German (Deutsch)',
129
+ value: 'https://webservices18.autotask.net/atservicesrest',
130
+ },
131
+ {
132
+ name: 'EU1 (English Europe and Asia)',
133
+ value: 'https://webservices19.autotask.net/atservicesrest',
134
+ },
135
+ {
136
+ name: 'Spanish (Español)',
137
+ value: 'https://webservices12.autotask.net/atservicesrest',
138
+ },
139
+ {
140
+ name: 'Other (Custom URL)',
141
+ value: 'other',
142
+ },
143
+ ],
144
+ default: 'https://webservices6.autotask.net/atservicesrest',
145
+ required: true,
146
+ description: 'Select your Autotask instance zone. If unsure, use "Other" to specify a custom URL. Zone list sourced from: https://ww6.autotask.net/help/developerhelp/Content/APIs/General/API_Zones.htm',
147
+ },
148
+ {
149
+ displayName: 'Custom Zone URL',
150
+ name: 'customZoneUrl',
151
+ type: 'string',
152
+ default: '',
153
+ required: true,
154
+ displayOptions: {
155
+ show: {
156
+ zone: ['other'],
157
+ },
158
+ },
159
+ description: 'Enter your custom Autotask zone URL. You can get this information from your Autotask administrator.',
160
+ },
161
+ {
162
+ displayName: 'Timezone',
163
+ name: 'timezone',
164
+ type: 'options',
165
+ options: moment_timezone_1.default.tz.names().map((tz) => ({ name: tz, value: tz })),
166
+ default: 'UTC',
167
+ required: true,
168
+ description: 'Select your timezone. All dates/times in the Autotask API are in UTC and will be automatically converted to/from this timezone.',
169
+ hint: 'This setting affects how dates and times are displayed and entered in the node. The API always uses UTC internally.',
170
+ },
171
+ // Cache Configuration
172
+ {
173
+ displayName: 'Enable Field Caching',
174
+ name: 'cacheEnabled',
175
+ type: 'boolean',
176
+ default: true,
177
+ description: 'Whether to cache field values to reduce API calls',
178
+ },
179
+ {
180
+ displayName: 'Cache TTL',
181
+ name: 'cacheTTL',
182
+ type: 'number',
183
+ default: 86400,
184
+ description: 'How long to cache field values (in seconds)',
185
+ displayOptions: {
186
+ show: {
187
+ cacheEnabled: [true],
188
+ },
187
189
  },
188
190
  },
189
- },
190
- {
191
- displayName: 'Cache Entity Info',
192
- name: 'cacheEntityInfo',
193
- type: 'boolean',
194
- default: true,
195
- description: 'Whether to cache entity information and field definitions',
196
- displayOptions: {
197
- show: {
198
- cacheEnabled: [true],
191
+ {
192
+ displayName: 'Cache Entity Info',
193
+ name: 'cacheEntityInfo',
194
+ type: 'boolean',
195
+ default: true,
196
+ description: 'Whether to cache entity information and field definitions',
197
+ displayOptions: {
198
+ show: {
199
+ cacheEnabled: [true],
200
+ },
199
201
  },
200
202
  },
201
- },
202
- {
203
- displayName: 'Entity Info TTL',
204
- name: 'cacheEntityInfoTTL',
205
- type: 'number',
206
- default: 86400,
207
- description: 'How long to cache entity information (in seconds)',
208
- displayOptions: {
209
- show: {
210
- cacheEnabled: [true],
211
- cacheEntityInfo: [true],
203
+ {
204
+ displayName: 'Entity Info TTL',
205
+ name: 'cacheEntityInfoTTL',
206
+ type: 'number',
207
+ default: 86400,
208
+ description: 'How long to cache entity information (in seconds)',
209
+ displayOptions: {
210
+ show: {
211
+ cacheEnabled: [true],
212
+ cacheEntityInfo: [true],
213
+ },
212
214
  },
213
215
  },
214
- },
215
- {
216
- displayName: 'Cache Reference Fields',
217
- name: 'cacheReferenceFields',
218
- type: 'boolean',
219
- default: true,
220
- description: 'Whether to cache reference field values',
221
- displayOptions: {
222
- show: {
223
- cacheEnabled: [true],
216
+ {
217
+ displayName: 'Cache Reference Fields',
218
+ name: 'cacheReferenceFields',
219
+ type: 'boolean',
220
+ default: true,
221
+ description: 'Whether to cache reference field values',
222
+ displayOptions: {
223
+ show: {
224
+ cacheEnabled: [true],
225
+ },
224
226
  },
225
227
  },
226
- },
227
- {
228
- displayName: 'Reference Fields TTL',
229
- name: 'cacheReferenceTTL',
230
- type: 'number',
231
- default: 86400,
232
- description: 'How long to cache reference field values (in seconds)',
233
- displayOptions: {
234
- show: {
235
- cacheEnabled: [true],
236
- cacheReferenceFields: [true],
228
+ {
229
+ displayName: 'Reference Fields TTL',
230
+ name: 'cacheReferenceTTL',
231
+ type: 'number',
232
+ default: 86400,
233
+ description: 'How long to cache reference field values (in seconds)',
234
+ displayOptions: {
235
+ show: {
236
+ cacheEnabled: [true],
237
+ cacheReferenceFields: [true],
238
+ },
237
239
  },
238
240
  },
239
- },
240
- {
241
- displayName: 'Cache Picklists',
242
- name: 'cachePicklists',
243
- type: 'boolean',
244
- default: true,
245
- description: 'Whether to cache picklist values',
246
- displayOptions: {
247
- show: {
248
- cacheEnabled: [true],
241
+ {
242
+ displayName: 'Cache Picklists',
243
+ name: 'cachePicklists',
244
+ type: 'boolean',
245
+ default: true,
246
+ description: 'Whether to cache picklist values',
247
+ displayOptions: {
248
+ show: {
249
+ cacheEnabled: [true],
250
+ },
249
251
  },
250
252
  },
251
- },
252
- {
253
- displayName: 'Picklists TTL',
254
- name: 'cachePicklistsTTL',
255
- type: 'number',
256
- default: 86400,
257
- description: 'How long to cache picklist values (in seconds)',
258
- displayOptions: {
259
- show: {
260
- cacheEnabled: [true],
261
- cachePicklists: [true],
253
+ {
254
+ displayName: 'Picklists TTL',
255
+ name: 'cachePicklistsTTL',
256
+ type: 'number',
257
+ default: 86400,
258
+ description: 'How long to cache picklist values (in seconds)',
259
+ displayOptions: {
260
+ show: {
261
+ cacheEnabled: [true],
262
+ cachePicklists: [true],
263
+ },
262
264
  },
263
265
  },
264
- },
265
- {
266
- displayName: 'Cache Directory',
267
- name: 'cacheDirectory',
268
- type: 'string',
269
- default: './cache/autotask',
270
- description: 'Directory to store cache files (relative or absolute path)',
271
- displayOptions: {
272
- show: {
273
- cacheEnabled: [true],
266
+ {
267
+ displayName: 'Cache Directory',
268
+ name: 'cacheDirectory',
269
+ type: 'string',
270
+ default: './cache/autotask',
271
+ description: 'Directory to store cache files (relative or absolute path)',
272
+ displayOptions: {
273
+ show: {
274
+ cacheEnabled: [true],
275
+ },
274
276
  },
275
277
  },
276
- },
277
- {
278
- displayName: 'Maximum Cache Size (MB)',
279
- name: 'cacheMaxSize',
280
- type: 'number',
281
- default: 100,
282
- description: 'Maximum size of the cache in megabytes (0 for unlimited)',
283
- displayOptions: {
284
- show: {
285
- cacheEnabled: [true],
278
+ {
279
+ displayName: 'Maximum Cache Size (MB)',
280
+ name: 'cacheMaxSize',
281
+ type: 'number',
282
+ default: 100,
283
+ description: 'Maximum size of the cache in megabytes (0 for unlimited)',
284
+ displayOptions: {
285
+ show: {
286
+ cacheEnabled: [true],
287
+ },
286
288
  },
287
289
  },
288
- },
289
- {
290
- displayName: 'WARNING: Disabling Cache Causes High API Usage',
291
- name: 'cachingWarning',
292
- type: 'notice',
293
- default: 'This node uses dynamic picklists and field enrichers that convert numerical values to human-readable labels. Disabling caching will result in separate API calls for each lookup, potentially causing high API usage and rate limits.',
294
- displayOptions: {
295
- show: {
296
- cacheEnabled: [false],
290
+ {
291
+ displayName: 'WARNING: Disabling Cache Causes High API Usage',
292
+ name: 'cachingWarning',
293
+ type: 'notice',
294
+ default: 'This node uses dynamic picklists and field enrichers that convert numerical values to human-readable labels. Disabling caching will result in separate API calls for each lookup, potentially causing high API usage and rate limits.',
295
+ displayOptions: {
296
+ show: {
297
+ cacheEnabled: [false],
298
+ },
297
299
  },
298
300
  },
299
- },
300
- ];
301
- authenticate = {
302
- type: 'generic',
303
- properties: {
304
- headers: {
305
- APIIntegrationcode: '={{$credentials.APIIntegrationcode}}',
306
- Username: '={{$credentials.Username}}',
307
- Secret: '={{$credentials.Secret}}',
308
- 'Content-Type': 'application/json',
301
+ ];
302
+ this.authenticate = {
303
+ type: 'generic',
304
+ properties: {
305
+ headers: {
306
+ APIIntegrationcode: '={{$credentials.APIIntegrationcode}}',
307
+ Username: '={{$credentials.Username}}',
308
+ Secret: '={{$credentials.Secret}}',
309
+ 'Content-Type': 'application/json',
310
+ },
309
311
  },
310
- },
311
- };
312
- test = {
313
- request: {
314
- baseURL: '={{$credentials.zone === "other" ? $credentials.customZoneUrl : $credentials.zone}}/V1.0',
315
- url: '/Companies/entityInformation',
316
- method: 'GET',
317
- headers: {
318
- APIIntegrationcode: '={{$credentials.APIIntegrationcode}}',
319
- Username: '={{$credentials.Username}}',
320
- Secret: '={{$credentials.Secret}}',
321
- 'Content-Type': 'application/json',
312
+ };
313
+ this.test = {
314
+ request: {
315
+ baseURL: '={{$credentials.zone === "other" ? $credentials.customZoneUrl : $credentials.zone}}/V1.0',
316
+ url: '/Companies/entityInformation',
317
+ method: 'GET',
318
+ headers: {
319
+ APIIntegrationcode: '={{$credentials.APIIntegrationcode}}',
320
+ Username: '={{$credentials.Username}}',
321
+ Secret: '={{$credentials.Secret}}',
322
+ 'Content-Type': 'application/json',
323
+ },
322
324
  },
323
- },
324
- };
325
+ };
326
+ }
325
327
  preValidate() {
326
328
  // Clear all cache instances when testing credentials
327
329
  // This ensures cache is reinitialized with new settings