n8n-nodes-autotask 0.1.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 (381) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +241 -0
  3. package/dist/credentials/AutotaskApi.credentials.d.ts +10 -0
  4. package/dist/credentials/AutotaskApi.credentials.js +266 -0
  5. package/dist/credentials/AutotaskApi.credentials.js.map +1 -0
  6. package/dist/nodes/Autotask/Autotask.node.d.ts +11 -0
  7. package/dist/nodes/Autotask/Autotask.node.js +121 -0
  8. package/dist/nodes/Autotask/Autotask.node.js.map +1 -0
  9. package/dist/nodes/Autotask/autotask.svg +1 -0
  10. package/dist/nodes/Autotask/constants/api.d.ts +48 -0
  11. package/dist/nodes/Autotask/constants/api.js +52 -0
  12. package/dist/nodes/Autotask/constants/api.js.map +1 -0
  13. package/dist/nodes/Autotask/constants/date.constants.d.ts +20 -0
  14. package/dist/nodes/Autotask/constants/date.constants.js +35 -0
  15. package/dist/nodes/Autotask/constants/date.constants.js.map +1 -0
  16. package/dist/nodes/Autotask/constants/entities.d.ts +3 -0
  17. package/dist/nodes/Autotask/constants/entities.js +34 -0
  18. package/dist/nodes/Autotask/constants/entities.js.map +1 -0
  19. package/dist/nodes/Autotask/constants/error.constants.d.ts +60 -0
  20. package/dist/nodes/Autotask/constants/error.constants.js +64 -0
  21. package/dist/nodes/Autotask/constants/error.constants.js.map +1 -0
  22. package/dist/nodes/Autotask/constants/field.constants.d.ts +51 -0
  23. package/dist/nodes/Autotask/constants/field.constants.js +85 -0
  24. package/dist/nodes/Autotask/constants/field.constants.js.map +1 -0
  25. package/dist/nodes/Autotask/constants/filters.d.ts +4 -0
  26. package/dist/nodes/Autotask/constants/filters.js +20 -0
  27. package/dist/nodes/Autotask/constants/filters.js.map +1 -0
  28. package/dist/nodes/Autotask/constants/index.d.ts +6 -0
  29. package/dist/nodes/Autotask/constants/index.js +29 -0
  30. package/dist/nodes/Autotask/constants/index.js.map +1 -0
  31. package/dist/nodes/Autotask/constants/operations.d.ts +25 -0
  32. package/dist/nodes/Autotask/constants/operations.js +29 -0
  33. package/dist/nodes/Autotask/constants/operations.js.map +1 -0
  34. package/dist/nodes/Autotask/constants/ui.constants.d.ts +58 -0
  35. package/dist/nodes/Autotask/constants/ui.constants.js +79 -0
  36. package/dist/nodes/Autotask/constants/ui.constants.js.map +1 -0
  37. package/dist/nodes/Autotask/constants/ui.d.ts +117 -0
  38. package/dist/nodes/Autotask/constants/ui.js +68 -0
  39. package/dist/nodes/Autotask/constants/ui.js.map +1 -0
  40. package/dist/nodes/Autotask/helpers/cache/index.d.ts +2 -0
  41. package/dist/nodes/Autotask/helpers/cache/index.js +6 -0
  42. package/dist/nodes/Autotask/helpers/cache/index.js.map +1 -0
  43. package/dist/nodes/Autotask/helpers/cache/init.d.ts +3 -0
  44. package/dist/nodes/Autotask/helpers/cache/init.js +32 -0
  45. package/dist/nodes/Autotask/helpers/cache/init.js.map +1 -0
  46. package/dist/nodes/Autotask/helpers/cache/service.d.ts +45 -0
  47. package/dist/nodes/Autotask/helpers/cache/service.js +138 -0
  48. package/dist/nodes/Autotask/helpers/cache/service.js.map +1 -0
  49. package/dist/nodes/Autotask/helpers/date-time/errors.d.ts +12 -0
  50. package/dist/nodes/Autotask/helpers/date-time/errors.js +25 -0
  51. package/dist/nodes/Autotask/helpers/date-time/errors.js.map +1 -0
  52. package/dist/nodes/Autotask/helpers/date-time/index.d.ts +3 -0
  53. package/dist/nodes/Autotask/helpers/date-time/index.js +20 -0
  54. package/dist/nodes/Autotask/helpers/date-time/index.js.map +1 -0
  55. package/dist/nodes/Autotask/helpers/date-time/utils.d.ts +8 -0
  56. package/dist/nodes/Autotask/helpers/date-time/utils.js +146 -0
  57. package/dist/nodes/Autotask/helpers/date-time/utils.js.map +1 -0
  58. package/dist/nodes/Autotask/helpers/date-time/wrapper.d.ts +18 -0
  59. package/dist/nodes/Autotask/helpers/date-time/wrapper.js +68 -0
  60. package/dist/nodes/Autotask/helpers/date-time/wrapper.js.map +1 -0
  61. package/dist/nodes/Autotask/helpers/entity/api.d.ts +12 -0
  62. package/dist/nodes/Autotask/helpers/entity/api.js +165 -0
  63. package/dist/nodes/Autotask/helpers/entity/api.js.map +1 -0
  64. package/dist/nodes/Autotask/helpers/entity/core.d.ts +24 -0
  65. package/dist/nodes/Autotask/helpers/entity/core.js +34 -0
  66. package/dist/nodes/Autotask/helpers/entity/core.js.map +1 -0
  67. package/dist/nodes/Autotask/helpers/entity/index.d.ts +3 -0
  68. package/dist/nodes/Autotask/helpers/entity/index.js +11 -0
  69. package/dist/nodes/Autotask/helpers/entity/index.js.map +1 -0
  70. package/dist/nodes/Autotask/helpers/entity/picklist.d.ts +10 -0
  71. package/dist/nodes/Autotask/helpers/entity/picklist.js +23 -0
  72. package/dist/nodes/Autotask/helpers/entity/picklist.js.map +1 -0
  73. package/dist/nodes/Autotask/helpers/entity/utils.d.ts +2 -0
  74. package/dist/nodes/Autotask/helpers/entity/utils.js +21 -0
  75. package/dist/nodes/Autotask/helpers/entity/utils.js.map +1 -0
  76. package/dist/nodes/Autotask/helpers/entity-values/field-mapping.d.ts +19 -0
  77. package/dist/nodes/Autotask/helpers/entity-values/field-mapping.js +49 -0
  78. package/dist/nodes/Autotask/helpers/entity-values/field-mapping.js.map +1 -0
  79. package/dist/nodes/Autotask/helpers/entity-values/helpers.d.ts +6 -0
  80. package/dist/nodes/Autotask/helpers/entity-values/helpers.js +24 -0
  81. package/dist/nodes/Autotask/helpers/entity-values/helpers.js.map +1 -0
  82. package/dist/nodes/Autotask/helpers/entity-values/index.d.ts +24 -0
  83. package/dist/nodes/Autotask/helpers/entity-values/index.js +9 -0
  84. package/dist/nodes/Autotask/helpers/entity-values/index.js.map +1 -0
  85. package/dist/nodes/Autotask/helpers/entity-values/transformers.d.ts +10 -0
  86. package/dist/nodes/Autotask/helpers/entity-values/transformers.js +88 -0
  87. package/dist/nodes/Autotask/helpers/entity-values/transformers.js.map +1 -0
  88. package/dist/nodes/Autotask/helpers/entity-values/value-helper.d.ts +49 -0
  89. package/dist/nodes/Autotask/helpers/entity-values/value-helper.js +234 -0
  90. package/dist/nodes/Autotask/helpers/entity-values/value-helper.js.map +1 -0
  91. package/dist/nodes/Autotask/helpers/errorHandler.d.ts +21 -0
  92. package/dist/nodes/Autotask/helpers/errorHandler.js +152 -0
  93. package/dist/nodes/Autotask/helpers/errorHandler.js.map +1 -0
  94. package/dist/nodes/Autotask/helpers/field-conversion/index.d.ts +3 -0
  95. package/dist/nodes/Autotask/helpers/field-conversion/index.js +20 -0
  96. package/dist/nodes/Autotask/helpers/field-conversion/index.js.map +1 -0
  97. package/dist/nodes/Autotask/helpers/field-conversion/pipeline.d.ts +12 -0
  98. package/dist/nodes/Autotask/helpers/field-conversion/pipeline.js +59 -0
  99. package/dist/nodes/Autotask/helpers/field-conversion/pipeline.js.map +1 -0
  100. package/dist/nodes/Autotask/helpers/field-conversion/services/field-type.service.d.ts +16 -0
  101. package/dist/nodes/Autotask/helpers/field-conversion/services/field-type.service.js +77 -0
  102. package/dist/nodes/Autotask/helpers/field-conversion/services/field-type.service.js.map +1 -0
  103. package/dist/nodes/Autotask/helpers/field-conversion/steps.d.ts +2 -0
  104. package/dist/nodes/Autotask/helpers/field-conversion/steps.js +117 -0
  105. package/dist/nodes/Autotask/helpers/field-conversion/steps.js.map +1 -0
  106. package/dist/nodes/Autotask/helpers/field-conversion/types.d.ts +18 -0
  107. package/dist/nodes/Autotask/helpers/field-conversion/types.js +3 -0
  108. package/dist/nodes/Autotask/helpers/field-conversion/types.js.map +1 -0
  109. package/dist/nodes/Autotask/helpers/field-conversion/utils.d.ts +19 -0
  110. package/dist/nodes/Autotask/helpers/field-conversion/utils.js +131 -0
  111. package/dist/nodes/Autotask/helpers/field-conversion/utils.js.map +1 -0
  112. package/dist/nodes/Autotask/helpers/filter.d.ts +10 -0
  113. package/dist/nodes/Autotask/helpers/filter.js +51 -0
  114. package/dist/nodes/Autotask/helpers/filter.js.map +1 -0
  115. package/dist/nodes/Autotask/helpers/http/body-builder.d.ts +19 -0
  116. package/dist/nodes/Autotask/helpers/http/body-builder.js +61 -0
  117. package/dist/nodes/Autotask/helpers/http/body-builder.js.map +1 -0
  118. package/dist/nodes/Autotask/helpers/http/headers.d.ts +2 -0
  119. package/dist/nodes/Autotask/helpers/http/headers.js +16 -0
  120. package/dist/nodes/Autotask/helpers/http/headers.js.map +1 -0
  121. package/dist/nodes/Autotask/helpers/http/index.d.ts +2 -0
  122. package/dist/nodes/Autotask/helpers/http/index.js +19 -0
  123. package/dist/nodes/Autotask/helpers/http/index.js.map +1 -0
  124. package/dist/nodes/Autotask/helpers/http/request.d.ts +21 -0
  125. package/dist/nodes/Autotask/helpers/http/request.js +233 -0
  126. package/dist/nodes/Autotask/helpers/http/request.js.map +1 -0
  127. package/dist/nodes/Autotask/helpers/index.d.ts +8 -0
  128. package/dist/nodes/Autotask/helpers/index.js +25 -0
  129. package/dist/nodes/Autotask/helpers/index.js.map +1 -0
  130. package/dist/nodes/Autotask/helpers/options/entityOptions.d.ts +5 -0
  131. package/dist/nodes/Autotask/helpers/options/entityOptions.js +58 -0
  132. package/dist/nodes/Autotask/helpers/options/entityOptions.js.map +1 -0
  133. package/dist/nodes/Autotask/helpers/options/index.d.ts +5 -0
  134. package/dist/nodes/Autotask/helpers/options/index.js +8 -0
  135. package/dist/nodes/Autotask/helpers/options/index.js.map +1 -0
  136. package/dist/nodes/Autotask/helpers/options/utils.d.ts +9 -0
  137. package/dist/nodes/Autotask/helpers/options/utils.js +48 -0
  138. package/dist/nodes/Autotask/helpers/options/utils.js.map +1 -0
  139. package/dist/nodes/Autotask/helpers/pagination.d.ts +26 -0
  140. package/dist/nodes/Autotask/helpers/pagination.js +58 -0
  141. package/dist/nodes/Autotask/helpers/pagination.js.map +1 -0
  142. package/dist/nodes/Autotask/helpers/parameter.d.ts +4 -0
  143. package/dist/nodes/Autotask/helpers/parameter.js +35 -0
  144. package/dist/nodes/Autotask/helpers/parameter.js.map +1 -0
  145. package/dist/nodes/Autotask/helpers/resource-operations.helper.d.ts +16 -0
  146. package/dist/nodes/Autotask/helpers/resource-operations.helper.js +59 -0
  147. package/dist/nodes/Autotask/helpers/resource-operations.helper.js.map +1 -0
  148. package/dist/nodes/Autotask/helpers/resourceMapper.d.ts +2 -0
  149. package/dist/nodes/Autotask/helpers/resourceMapper.js +42 -0
  150. package/dist/nodes/Autotask/helpers/resourceMapper.js.map +1 -0
  151. package/dist/nodes/Autotask/helpers/searchFilterBuilder.d.ts +17 -0
  152. package/dist/nodes/Autotask/helpers/searchFilterBuilder.js +98 -0
  153. package/dist/nodes/Autotask/helpers/searchFilterBuilder.js.map +1 -0
  154. package/dist/nodes/Autotask/operations/base/base-operation.d.ts +43 -0
  155. package/dist/nodes/Autotask/operations/base/base-operation.js +333 -0
  156. package/dist/nodes/Autotask/operations/base/base-operation.js.map +1 -0
  157. package/dist/nodes/Autotask/operations/base/count-operation.d.ts +7 -0
  158. package/dist/nodes/Autotask/operations/base/count-operation.js +51 -0
  159. package/dist/nodes/Autotask/operations/base/count-operation.js.map +1 -0
  160. package/dist/nodes/Autotask/operations/base/create-operation.d.ts +8 -0
  161. package/dist/nodes/Autotask/operations/base/create-operation.js +71 -0
  162. package/dist/nodes/Autotask/operations/base/create-operation.js.map +1 -0
  163. package/dist/nodes/Autotask/operations/base/delete-operation.d.ts +7 -0
  164. package/dist/nodes/Autotask/operations/base/delete-operation.js +44 -0
  165. package/dist/nodes/Autotask/operations/base/delete-operation.js.map +1 -0
  166. package/dist/nodes/Autotask/operations/base/field-processor.d.ts +50 -0
  167. package/dist/nodes/Autotask/operations/base/field-processor.js +387 -0
  168. package/dist/nodes/Autotask/operations/base/field-processor.js.map +1 -0
  169. package/dist/nodes/Autotask/operations/base/field-validator.d.ts +23 -0
  170. package/dist/nodes/Autotask/operations/base/field-validator.js +210 -0
  171. package/dist/nodes/Autotask/operations/base/field-validator.js.map +1 -0
  172. package/dist/nodes/Autotask/operations/base/field-values.d.ts +3 -0
  173. package/dist/nodes/Autotask/operations/base/field-values.js +79 -0
  174. package/dist/nodes/Autotask/operations/base/field-values.js.map +1 -0
  175. package/dist/nodes/Autotask/operations/base/get-many-advanced.operation.d.ts +15 -0
  176. package/dist/nodes/Autotask/operations/base/get-many-advanced.operation.js +59 -0
  177. package/dist/nodes/Autotask/operations/base/get-many-advanced.operation.js.map +1 -0
  178. package/dist/nodes/Autotask/operations/base/get-many.d.ts +23 -0
  179. package/dist/nodes/Autotask/operations/base/get-many.js +126 -0
  180. package/dist/nodes/Autotask/operations/base/get-many.js.map +1 -0
  181. package/dist/nodes/Autotask/operations/base/get-operation.d.ts +7 -0
  182. package/dist/nodes/Autotask/operations/base/get-operation.js +23 -0
  183. package/dist/nodes/Autotask/operations/base/get-operation.js.map +1 -0
  184. package/dist/nodes/Autotask/operations/base/getEntityInfo.operation.d.ts +8 -0
  185. package/dist/nodes/Autotask/operations/base/getEntityInfo.operation.js +65 -0
  186. package/dist/nodes/Autotask/operations/base/getEntityInfo.operation.js.map +1 -0
  187. package/dist/nodes/Autotask/operations/base/getFieldInfo.operation.d.ts +9 -0
  188. package/dist/nodes/Autotask/operations/base/getFieldInfo.operation.js +81 -0
  189. package/dist/nodes/Autotask/operations/base/getFieldInfo.operation.js.map +1 -0
  190. package/dist/nodes/Autotask/operations/base/index.d.ts +12 -0
  191. package/dist/nodes/Autotask/operations/base/index.js +28 -0
  192. package/dist/nodes/Autotask/operations/base/index.js.map +1 -0
  193. package/dist/nodes/Autotask/operations/base/operation-type.d.ts +5 -0
  194. package/dist/nodes/Autotask/operations/base/operation-type.js +21 -0
  195. package/dist/nodes/Autotask/operations/base/operation-type.js.map +1 -0
  196. package/dist/nodes/Autotask/operations/base/types.d.ts +6 -0
  197. package/dist/nodes/Autotask/operations/base/types.js +18 -0
  198. package/dist/nodes/Autotask/operations/base/types.js.map +1 -0
  199. package/dist/nodes/Autotask/operations/base/update-operation.d.ts +8 -0
  200. package/dist/nodes/Autotask/operations/base/update-operation.js +74 -0
  201. package/dist/nodes/Autotask/operations/base/update-operation.js.map +1 -0
  202. package/dist/nodes/Autotask/operations/common/entityInfo.description.d.ts +8 -0
  203. package/dist/nodes/Autotask/operations/common/entityInfo.description.js +38 -0
  204. package/dist/nodes/Autotask/operations/common/entityInfo.description.js.map +1 -0
  205. package/dist/nodes/Autotask/operations/common/entityInfo.execute.d.ts +2 -0
  206. package/dist/nodes/Autotask/operations/common/entityInfo.execute.js +20 -0
  207. package/dist/nodes/Autotask/operations/common/entityInfo.execute.js.map +1 -0
  208. package/dist/nodes/Autotask/operations/common/get-many-advanced/description.d.ts +2 -0
  209. package/dist/nodes/Autotask/operations/common/get-many-advanced/description.js +23 -0
  210. package/dist/nodes/Autotask/operations/common/get-many-advanced/description.js.map +1 -0
  211. package/dist/nodes/Autotask/operations/common/get-many-advanced/execute.d.ts +15 -0
  212. package/dist/nodes/Autotask/operations/common/get-many-advanced/execute.js +14 -0
  213. package/dist/nodes/Autotask/operations/common/get-many-advanced/execute.js.map +1 -0
  214. package/dist/nodes/Autotask/operations/common/get-many-advanced/index.d.ts +2 -0
  215. package/dist/nodes/Autotask/operations/common/get-many-advanced/index.js +19 -0
  216. package/dist/nodes/Autotask/operations/common/get-many-advanced/index.js.map +1 -0
  217. package/dist/nodes/Autotask/resources/companies/description.d.ts +2 -0
  218. package/dist/nodes/Autotask/resources/companies/description.js +101 -0
  219. package/dist/nodes/Autotask/resources/companies/description.js.map +1 -0
  220. package/dist/nodes/Autotask/resources/companies/execute.d.ts +2 -0
  221. package/dist/nodes/Autotask/resources/companies/execute.js +77 -0
  222. package/dist/nodes/Autotask/resources/companies/execute.js.map +1 -0
  223. package/dist/nodes/Autotask/resources/companies/index.d.ts +2 -0
  224. package/dist/nodes/Autotask/resources/companies/index.js +19 -0
  225. package/dist/nodes/Autotask/resources/companies/index.js.map +1 -0
  226. package/dist/nodes/Autotask/resources/companyNotes/description.d.ts +2 -0
  227. package/dist/nodes/Autotask/resources/companyNotes/description.js +96 -0
  228. package/dist/nodes/Autotask/resources/companyNotes/description.js.map +1 -0
  229. package/dist/nodes/Autotask/resources/companyNotes/execute.d.ts +2 -0
  230. package/dist/nodes/Autotask/resources/companyNotes/execute.js +77 -0
  231. package/dist/nodes/Autotask/resources/companyNotes/execute.js.map +1 -0
  232. package/dist/nodes/Autotask/resources/companyNotes/index.d.ts +2 -0
  233. package/dist/nodes/Autotask/resources/companyNotes/index.js +19 -0
  234. package/dist/nodes/Autotask/resources/companyNotes/index.js.map +1 -0
  235. package/dist/nodes/Autotask/resources/contacts/description.d.ts +2 -0
  236. package/dist/nodes/Autotask/resources/contacts/description.js +100 -0
  237. package/dist/nodes/Autotask/resources/contacts/description.js.map +1 -0
  238. package/dist/nodes/Autotask/resources/contacts/execute.d.ts +2 -0
  239. package/dist/nodes/Autotask/resources/contacts/execute.js +83 -0
  240. package/dist/nodes/Autotask/resources/contacts/execute.js.map +1 -0
  241. package/dist/nodes/Autotask/resources/contacts/index.d.ts +2 -0
  242. package/dist/nodes/Autotask/resources/contacts/index.js +19 -0
  243. package/dist/nodes/Autotask/resources/contacts/index.js.map +1 -0
  244. package/dist/nodes/Autotask/resources/definitions.d.ts +3 -0
  245. package/dist/nodes/Autotask/resources/definitions.js +79 -0
  246. package/dist/nodes/Autotask/resources/definitions.js.map +1 -0
  247. package/dist/nodes/Autotask/resources/products/description.d.ts +2 -0
  248. package/dist/nodes/Autotask/resources/products/description.js +96 -0
  249. package/dist/nodes/Autotask/resources/products/description.js.map +1 -0
  250. package/dist/nodes/Autotask/resources/products/execute.d.ts +2 -0
  251. package/dist/nodes/Autotask/resources/products/execute.js +77 -0
  252. package/dist/nodes/Autotask/resources/products/execute.js.map +1 -0
  253. package/dist/nodes/Autotask/resources/products/index.d.ts +2 -0
  254. package/dist/nodes/Autotask/resources/products/index.js +8 -0
  255. package/dist/nodes/Autotask/resources/products/index.js.map +1 -0
  256. package/dist/nodes/Autotask/resources/projectCharges/description.d.ts +2 -0
  257. package/dist/nodes/Autotask/resources/projectCharges/description.js +102 -0
  258. package/dist/nodes/Autotask/resources/projectCharges/description.js.map +1 -0
  259. package/dist/nodes/Autotask/resources/projectCharges/execute.d.ts +2 -0
  260. package/dist/nodes/Autotask/resources/projectCharges/execute.js +83 -0
  261. package/dist/nodes/Autotask/resources/projectCharges/execute.js.map +1 -0
  262. package/dist/nodes/Autotask/resources/projectCharges/index.d.ts +2 -0
  263. package/dist/nodes/Autotask/resources/projectCharges/index.js +19 -0
  264. package/dist/nodes/Autotask/resources/projectCharges/index.js.map +1 -0
  265. package/dist/nodes/Autotask/resources/projectNotes/description.d.ts +2 -0
  266. package/dist/nodes/Autotask/resources/projectNotes/description.js +96 -0
  267. package/dist/nodes/Autotask/resources/projectNotes/description.js.map +1 -0
  268. package/dist/nodes/Autotask/resources/projectNotes/execute.d.ts +2 -0
  269. package/dist/nodes/Autotask/resources/projectNotes/execute.js +77 -0
  270. package/dist/nodes/Autotask/resources/projectNotes/execute.js.map +1 -0
  271. package/dist/nodes/Autotask/resources/projectNotes/index.d.ts +2 -0
  272. package/dist/nodes/Autotask/resources/projectNotes/index.js +19 -0
  273. package/dist/nodes/Autotask/resources/projectNotes/index.js.map +1 -0
  274. package/dist/nodes/Autotask/resources/projectPhases/description.d.ts +2 -0
  275. package/dist/nodes/Autotask/resources/projectPhases/description.js +110 -0
  276. package/dist/nodes/Autotask/resources/projectPhases/description.js.map +1 -0
  277. package/dist/nodes/Autotask/resources/projectPhases/execute.d.ts +2 -0
  278. package/dist/nodes/Autotask/resources/projectPhases/execute.js +93 -0
  279. package/dist/nodes/Autotask/resources/projectPhases/execute.js.map +1 -0
  280. package/dist/nodes/Autotask/resources/projectPhases/index.d.ts +2 -0
  281. package/dist/nodes/Autotask/resources/projectPhases/index.js +8 -0
  282. package/dist/nodes/Autotask/resources/projectPhases/index.js.map +1 -0
  283. package/dist/nodes/Autotask/resources/projectTasks/description.d.ts +2 -0
  284. package/dist/nodes/Autotask/resources/projectTasks/description.js +110 -0
  285. package/dist/nodes/Autotask/resources/projectTasks/description.js.map +1 -0
  286. package/dist/nodes/Autotask/resources/projectTasks/execute.d.ts +2 -0
  287. package/dist/nodes/Autotask/resources/projectTasks/execute.js +77 -0
  288. package/dist/nodes/Autotask/resources/projectTasks/execute.js.map +1 -0
  289. package/dist/nodes/Autotask/resources/projectTasks/index.d.ts +2 -0
  290. package/dist/nodes/Autotask/resources/projectTasks/index.js +8 -0
  291. package/dist/nodes/Autotask/resources/projectTasks/index.js.map +1 -0
  292. package/dist/nodes/Autotask/resources/projects/description.d.ts +2 -0
  293. package/dist/nodes/Autotask/resources/projects/description.js +96 -0
  294. package/dist/nodes/Autotask/resources/projects/description.js.map +1 -0
  295. package/dist/nodes/Autotask/resources/projects/execute.d.ts +2 -0
  296. package/dist/nodes/Autotask/resources/projects/execute.js +77 -0
  297. package/dist/nodes/Autotask/resources/projects/execute.js.map +1 -0
  298. package/dist/nodes/Autotask/resources/projects/index.d.ts +2 -0
  299. package/dist/nodes/Autotask/resources/projects/index.js +19 -0
  300. package/dist/nodes/Autotask/resources/projects/index.js.map +1 -0
  301. package/dist/nodes/Autotask/resources/resources/description.d.ts +2 -0
  302. package/dist/nodes/Autotask/resources/resources/description.js +89 -0
  303. package/dist/nodes/Autotask/resources/resources/description.js.map +1 -0
  304. package/dist/nodes/Autotask/resources/resources/execute.d.ts +2 -0
  305. package/dist/nodes/Autotask/resources/resources/execute.js +71 -0
  306. package/dist/nodes/Autotask/resources/resources/execute.js.map +1 -0
  307. package/dist/nodes/Autotask/resources/resources/index.d.ts +2 -0
  308. package/dist/nodes/Autotask/resources/resources/index.js +19 -0
  309. package/dist/nodes/Autotask/resources/resources/index.js.map +1 -0
  310. package/dist/nodes/Autotask/resources/searchFilter/description.d.ts +3 -0
  311. package/dist/nodes/Autotask/resources/searchFilter/description.js +136 -0
  312. package/dist/nodes/Autotask/resources/searchFilter/description.js.map +1 -0
  313. package/dist/nodes/Autotask/resources/searchFilter/execute.d.ts +2 -0
  314. package/dist/nodes/Autotask/resources/searchFilter/execute.js +34 -0
  315. package/dist/nodes/Autotask/resources/searchFilter/execute.js.map +1 -0
  316. package/dist/nodes/Autotask/resources/searchFilter/index.d.ts +3 -0
  317. package/dist/nodes/Autotask/resources/searchFilter/index.js +9 -0
  318. package/dist/nodes/Autotask/resources/searchFilter/index.js.map +1 -0
  319. package/dist/nodes/Autotask/resources/tickets/description.d.ts +2 -0
  320. package/dist/nodes/Autotask/resources/tickets/description.js +94 -0
  321. package/dist/nodes/Autotask/resources/tickets/description.js.map +1 -0
  322. package/dist/nodes/Autotask/resources/tickets/execute.d.ts +2 -0
  323. package/dist/nodes/Autotask/resources/tickets/execute.js +77 -0
  324. package/dist/nodes/Autotask/resources/tickets/execute.js.map +1 -0
  325. package/dist/nodes/Autotask/resources/tickets/index.d.ts +2 -0
  326. package/dist/nodes/Autotask/resources/tickets/index.js +8 -0
  327. package/dist/nodes/Autotask/resources/tickets/index.js.map +1 -0
  328. package/dist/nodes/Autotask/resources/timeEntries/description.d.ts +2 -0
  329. package/dist/nodes/Autotask/resources/timeEntries/description.js +115 -0
  330. package/dist/nodes/Autotask/resources/timeEntries/description.js.map +1 -0
  331. package/dist/nodes/Autotask/resources/timeEntries/execute.d.ts +2 -0
  332. package/dist/nodes/Autotask/resources/timeEntries/execute.js +83 -0
  333. package/dist/nodes/Autotask/resources/timeEntries/execute.js.map +1 -0
  334. package/dist/nodes/Autotask/resources/timeEntries/index.d.ts +2 -0
  335. package/dist/nodes/Autotask/resources/timeEntries/index.js +19 -0
  336. package/dist/nodes/Autotask/resources/timeEntries/index.js.map +1 -0
  337. package/dist/nodes/Autotask/types/SearchFilter.d.ts +27 -0
  338. package/dist/nodes/Autotask/types/SearchFilter.js +3 -0
  339. package/dist/nodes/Autotask/types/SearchFilter.js.map +1 -0
  340. package/dist/nodes/Autotask/types/base/api.d.ts +44 -0
  341. package/dist/nodes/Autotask/types/base/api.js +3 -0
  342. package/dist/nodes/Autotask/types/base/api.js.map +1 -0
  343. package/dist/nodes/Autotask/types/base/auth.d.ts +19 -0
  344. package/dist/nodes/Autotask/types/base/auth.js +3 -0
  345. package/dist/nodes/Autotask/types/base/auth.js.map +1 -0
  346. package/dist/nodes/Autotask/types/base/common.d.ts +66 -0
  347. package/dist/nodes/Autotask/types/base/common.js +3 -0
  348. package/dist/nodes/Autotask/types/base/common.js.map +1 -0
  349. package/dist/nodes/Autotask/types/base/core-types.d.ts +11 -0
  350. package/dist/nodes/Autotask/types/base/core-types.js +12 -0
  351. package/dist/nodes/Autotask/types/base/core-types.js.map +1 -0
  352. package/dist/nodes/Autotask/types/base/entities.d.ts +67 -0
  353. package/dist/nodes/Autotask/types/base/entities.js +3 -0
  354. package/dist/nodes/Autotask/types/base/entities.js.map +1 -0
  355. package/dist/nodes/Autotask/types/base/entity-types.d.ts +94 -0
  356. package/dist/nodes/Autotask/types/base/entity-types.js +17 -0
  357. package/dist/nodes/Autotask/types/base/entity-types.js.map +1 -0
  358. package/dist/nodes/Autotask/types/base/entity-values.d.ts +9 -0
  359. package/dist/nodes/Autotask/types/base/entity-values.js +3 -0
  360. package/dist/nodes/Autotask/types/base/entity-values.js.map +1 -0
  361. package/dist/nodes/Autotask/types/base/errors.d.ts +4 -0
  362. package/dist/nodes/Autotask/types/base/errors.js +12 -0
  363. package/dist/nodes/Autotask/types/base/errors.js.map +1 -0
  364. package/dist/nodes/Autotask/types/base/field-base.d.ts +82 -0
  365. package/dist/nodes/Autotask/types/base/field-base.js +67 -0
  366. package/dist/nodes/Autotask/types/base/field-base.js.map +1 -0
  367. package/dist/nodes/Autotask/types/base/http.d.ts +34 -0
  368. package/dist/nodes/Autotask/types/base/http.js +3 -0
  369. package/dist/nodes/Autotask/types/base/http.js.map +1 -0
  370. package/dist/nodes/Autotask/types/base/picklists.d.ts +16 -0
  371. package/dist/nodes/Autotask/types/base/picklists.js +3 -0
  372. package/dist/nodes/Autotask/types/base/picklists.js.map +1 -0
  373. package/dist/nodes/Autotask/types/base/udf-types.d.ts +64 -0
  374. package/dist/nodes/Autotask/types/base/udf-types.js +24 -0
  375. package/dist/nodes/Autotask/types/base/udf-types.js.map +1 -0
  376. package/dist/nodes/Autotask/types/index.d.ts +18 -0
  377. package/dist/nodes/Autotask/types/index.js +6 -0
  378. package/dist/nodes/Autotask/types/index.js.map +1 -0
  379. package/dist/package.json +80 -0
  380. package/dist/tsconfig.tsbuildinfo +1 -0
  381. package/package.json +80 -0
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetOperation = void 0;
4
+ const error_constants_1 = require("../../constants/error.constants");
5
+ const entity_types_1 = require("../../types/base/entity-types");
6
+ const base_operation_1 = require("./base-operation");
7
+ class GetOperation extends base_operation_1.BaseOperation {
8
+ constructor(entityType, context, parentType) {
9
+ super(entityType, entity_types_1.OperationType.READ, context, parentType);
10
+ }
11
+ async execute(itemIndex) {
12
+ const entityId = await this.getParameter('id', itemIndex);
13
+ if (!entityId || (typeof entityId !== 'string' && typeof entityId !== 'number')) {
14
+ throw new Error(error_constants_1.ERROR_TEMPLATES.validation
15
+ .replace('{type}', 'ValidationError')
16
+ .replace('{entity}', this.entityType)
17
+ .replace('{details}', 'Entity ID is required for get operation'));
18
+ }
19
+ return await this.getEntityById(itemIndex, entityId);
20
+ }
21
+ }
22
+ exports.GetOperation = GetOperation;
23
+ //# sourceMappingURL=get-operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-operation.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/operations/base/get-operation.ts"],"names":[],"mappings":";;;AAEA,qEAAkE;AAClE,gEAA8D;AAC9D,qDAAiD;AAKjD,MAAa,YAAwC,SAAQ,8BAAa;IACzE,YACC,UAAkB,EAClB,OAA0B,EAC1B,UAAmB;QAEnB,KAAK,CAAC,UAAU,EAAE,4BAAa,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAC5D,CAAC;IAKD,KAAK,CAAC,OAAO,CAAC,SAAiB;QAE9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,CAAC,EAAE,CAAC;YACjF,MAAM,IAAI,KAAK,CACd,iCAAe,CAAC,UAAU;iBACxB,OAAO,CAAC,QAAQ,EAAE,iBAAiB,CAAC;iBACpC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC;iBACpC,OAAO,CAAC,WAAW,EAAE,yCAAyC,CAAC,CACjE,CAAC;QACH,CAAC;QAGD,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,QAA2B,CAAM,CAAC;IAC9E,CAAC;CACD;AA3BD,oCA2BC"}
@@ -0,0 +1,8 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ import { BaseOperation } from './base-operation';
3
+ import type { IAutotaskEntity } from '../../types/base/entity-types';
4
+ export declare class GetEntityInfoOperation<T extends IAutotaskEntity> extends BaseOperation {
5
+ constructor(entityType: string, context: IExecuteFunctions, parentType?: string, parentChain?: string[]);
6
+ execute(itemIndex: number): Promise<INodeExecutionData>;
7
+ private getSupportedOperations;
8
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetEntityInfoOperation = void 0;
4
+ const base_operation_1 = require("./base-operation");
5
+ const entity_types_1 = require("../../types/base/entity-types");
6
+ const errorHandler_1 = require("../../helpers/errorHandler");
7
+ const entities_1 = require("../../constants/entities");
8
+ const error_constants_1 = require("../../constants/error.constants");
9
+ const request_1 = require("../../helpers/http/request");
10
+ const http_1 = require("../../helpers/http");
11
+ class GetEntityInfoOperation extends base_operation_1.BaseOperation {
12
+ constructor(entityType, context, parentType, parentChain) {
13
+ super(entityType, entity_types_1.OperationType.READ, context, parentType, parentChain);
14
+ }
15
+ async execute(itemIndex) {
16
+ return (0, errorHandler_1.handleErrors)(this.context, async () => {
17
+ const metadata = (0, entities_1.getEntityMetadata)(this.entityType);
18
+ if (!metadata) {
19
+ throw new Error(error_constants_1.ERROR_TEMPLATES.validation
20
+ .replace('{type}', 'ValidationError')
21
+ .replace('{entity}', this.entityType)
22
+ .replace('{details}', 'Entity metadata not found'));
23
+ }
24
+ const endpoint = (0, request_1.buildEntityUrl)(this.entityType);
25
+ const apiResponse = await http_1.autotaskApiRequest.call(this.context, 'GET', `${endpoint}/entityInformation`);
26
+ if (!(apiResponse === null || apiResponse === void 0 ? void 0 : apiResponse.info)) {
27
+ throw new Error(error_constants_1.ERROR_TEMPLATES.validation
28
+ .replace('{type}', 'ValidationError')
29
+ .replace('{entity}', this.entityType)
30
+ .replace('{details}', 'Invalid entity info response format'));
31
+ }
32
+ const apiInfo = apiResponse.info;
33
+ const entityInfo = {
34
+ name: this.entityType,
35
+ metadata: {
36
+ ...metadata,
37
+ supportedOperations: this.getSupportedOperations(apiInfo),
38
+ },
39
+ apiInfo,
40
+ };
41
+ return {
42
+ json: entityInfo,
43
+ };
44
+ }, {
45
+ operation: 'getEntityInfo',
46
+ entityType: this.entityType,
47
+ });
48
+ }
49
+ getSupportedOperations(apiInfo) {
50
+ const operations = ['get', 'getMany', 'query'];
51
+ if (apiInfo.canCreate)
52
+ operations.push('create');
53
+ if (apiInfo.canUpdate)
54
+ operations.push('update');
55
+ if (apiInfo.canDelete)
56
+ operations.push('delete');
57
+ if (apiInfo.hasUserDefinedFields)
58
+ operations.push('udf');
59
+ if (apiInfo.supportsWebhookCallouts)
60
+ operations.push('webhook');
61
+ return operations;
62
+ }
63
+ }
64
+ exports.GetEntityInfoOperation = GetEntityInfoOperation;
65
+ //# sourceMappingURL=getEntityInfo.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getEntityInfo.operation.js","sourceRoot":"","sources":["../../../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AAU,CAAC;qBACpC,OAAO,CAAC,WAAW,EAAE,qCAAqC,CAAC,CAC7D,CAAC;YACH,CAAC;YAED,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC;YAGjC,MAAM,UAAU,GAAgB;gBAC/B,IAAI,EAAE,IAAI,CAAC,UAAU;gBACrB,QAAQ,EAAE;oBACT,GAAG,QAAQ;oBACX,mBAAmB,EAAE,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC;iBACzD;gBACD,OAAO;aACP,CAAC;YAEF,OAAO;gBACN,IAAI,EAAE,UAAU;aAChB,CAAC;QACH,CAAC,EACD;YACC,SAAS,EAAE,eAAe;YAC1B,UAAU,EAAE,IAAI,CAAC,UAAU;SAC3B,CACD,CAAC;IACH,CAAC;IAKO,sBAAsB,CAAC,OAAoB;QAClD,MAAM,UAAU,GAAa,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAEzD,IAAI,OAAO,CAAC,SAAS;YAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,IAAI,OAAO,CAAC,SAAS;YAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,IAAI,OAAO,CAAC,SAAS;YAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,IAAI,OAAO,CAAC,oBAAoB;YAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzD,IAAI,OAAO,CAAC,uBAAuB;YAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEhE,OAAO,UAAU,CAAC;IACnB,CAAC;CACD;AAlFD,wDAkFC"}
@@ -0,0 +1,9 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ import { BaseOperation } from './base-operation';
3
+ import type { IAutotaskEntity } from '../../types/base/entity-types';
4
+ export declare class GetFieldInfoOperation<T extends IAutotaskEntity> extends BaseOperation {
5
+ constructor(entityType: string, context: IExecuteFunctions, parentType?: string, parentChain?: string[]);
6
+ execute(itemIndex: number): Promise<INodeExecutionData>;
7
+ private processStandardFields;
8
+ private processUdfFields;
9
+ }
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetFieldInfoOperation = void 0;
4
+ const base_operation_1 = require("./base-operation");
5
+ const entity_types_1 = require("../../types/base/entity-types");
6
+ const errorHandler_1 = require("../../helpers/errorHandler");
7
+ const entities_1 = require("../../constants/entities");
8
+ const error_constants_1 = require("../../constants/error.constants");
9
+ const request_1 = require("../../helpers/http/request");
10
+ const http_1 = require("../../helpers/http");
11
+ class GetFieldInfoOperation extends base_operation_1.BaseOperation {
12
+ constructor(entityType, context, parentType, parentChain) {
13
+ super(entityType, entity_types_1.OperationType.READ, context, parentType, parentChain);
14
+ }
15
+ async execute(itemIndex) {
16
+ return (0, errorHandler_1.handleErrors)(this.context, async () => {
17
+ const metadata = (0, entities_1.getEntityMetadata)(this.entityType);
18
+ if (!metadata) {
19
+ throw new Error(error_constants_1.ERROR_TEMPLATES.validation
20
+ .replace('{type}', 'ValidationError')
21
+ .replace('{entity}', this.entityType)
22
+ .replace('{details}', 'Entity metadata not found'));
23
+ }
24
+ const baseEndpoint = (0, request_1.buildEntityUrl)(this.entityType).replace(/\/$/, '');
25
+ const entityInfoResponse = await http_1.autotaskApiRequest.call(this.context, 'GET', `${baseEndpoint}/entityInformation`);
26
+ if (!(entityInfoResponse === null || entityInfoResponse === void 0 ? void 0 : entityInfoResponse.info)) {
27
+ throw new Error(error_constants_1.ERROR_TEMPLATES.validation
28
+ .replace('{type}', 'ValidationError')
29
+ .replace('{entity}', this.entityType)
30
+ .replace('{details}', 'Invalid entity info response format'));
31
+ }
32
+ const entityInfo = entityInfoResponse.info;
33
+ const standardFieldsResponse = await http_1.autotaskApiRequest.call(this.context, 'GET', `${baseEndpoint}/entityInformation/fields`);
34
+ const standardFields = this.processStandardFields(standardFieldsResponse.fields || []);
35
+ let udfFields = [];
36
+ if (entityInfo.hasUserDefinedFields) {
37
+ console.debug(`[${new Date().toISOString()}] Entity ${this.entityType} supports UDF fields, fetching from: ${baseEndpoint}/entityInformation/userDefinedFields`);
38
+ const udfResponse = await http_1.autotaskApiRequest.call(this.context, 'GET', `${baseEndpoint}/entityInformation/userDefinedFields`);
39
+ udfFields = this.processUdfFields(udfResponse.fields || []);
40
+ console.debug(`[${new Date().toISOString()}] Retrieved ${udfFields.length} UDF fields for ${this.entityType}`);
41
+ }
42
+ else {
43
+ console.debug(`[${new Date().toISOString()}] Entity ${this.entityType} does not support UDF fields (hasUserDefinedFields: ${entityInfo.hasUserDefinedFields})`);
44
+ }
45
+ const allFields = [...standardFields, ...udfFields];
46
+ const fieldInfo = {
47
+ name: this.entityType,
48
+ metadata: {
49
+ ...metadata,
50
+ hasUserDefinedFields: entityInfo.hasUserDefinedFields,
51
+ supportsWebhookCallouts: entityInfo.supportsWebhookCallouts,
52
+ },
53
+ standardFields,
54
+ udfFields,
55
+ allFields,
56
+ };
57
+ return {
58
+ json: fieldInfo,
59
+ };
60
+ }, {
61
+ operation: 'getFieldInfo',
62
+ entityType: this.entityType,
63
+ });
64
+ }
65
+ processStandardFields(fields) {
66
+ return fields.map(field => ({
67
+ ...field,
68
+ isUdf: false,
69
+ isSystemField: field.isSystemField || false,
70
+ }));
71
+ }
72
+ processUdfFields(fields) {
73
+ return fields.map(field => ({
74
+ ...field,
75
+ isUdf: true,
76
+ isSystemField: false,
77
+ }));
78
+ }
79
+ }
80
+ exports.GetFieldInfoOperation = GetFieldInfoOperation;
81
+ //# sourceMappingURL=getFieldInfo.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFieldInfo.operation.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/operations/base/getFieldInfo.operation.ts"],"names":[],"mappings":";;;AACA,qDAAiD;AACjD,gEAA8D;AAC9D,6DAA0D;AAC1D,uDAA6D;AAG7D,qEAAkE;AAClE,wDAA4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AAoB;oBACrD,uBAAuB,EAAE,UAAU,CAAC,uBAAuB;iBAC3D;gBACD,cAAc;gBACd,SAAS;gBACT,SAAS;aACT,CAAC;YAEF,OAAO;gBACN,IAAI,EAAE,SAAS;aACf,CAAC;QACH,CAAC,EACD;YACC,SAAS,EAAE,cAAc;YACzB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC3B,CACD,CAAC;IACH,CAAC;IAKO,qBAAqB,CAAC,MAAsB;QACnD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3B,GAAG,KAAK;YACR,KAAK,EAAE,KAAK;YACZ,aAAa,EAAE,KAAK,CAAC,aAAa,IAAI,KAAK;SAC3C,CAAC,CAAC,CAAC;IACL,CAAC;IAKO,gBAAgB,CAAC,MAAsB;QAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3B,GAAG,KAAK;YACR,KAAK,EAAE,IAAI;YACX,aAAa,EAAE,KAAK;SACpB,CAAC,CAAC,CAAC;IACL,CAAC;CACD;AAxHD,sDAwHC"}
@@ -0,0 +1,12 @@
1
+ export { OperationType, WriteOperation, ReadOperation } from './types';
2
+ export { OperationTypeValidator } from './operation-type';
3
+ export { FieldProcessor } from './field-processor';
4
+ export { FieldValidator } from './field-validator';
5
+ export { BaseOperation } from './base-operation';
6
+ export { getOperationFieldValues } from './field-values';
7
+ export { GetManyOperation } from './get-many';
8
+ export { CreateOperation } from './create-operation';
9
+ export { UpdateOperation } from './update-operation';
10
+ export { GetOperation } from './get-operation';
11
+ export { DeleteOperation } from './delete-operation';
12
+ export { CountOperation } from './count-operation';
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CountOperation = exports.DeleteOperation = exports.GetOperation = exports.UpdateOperation = exports.CreateOperation = exports.GetManyOperation = exports.getOperationFieldValues = exports.BaseOperation = exports.FieldValidator = exports.FieldProcessor = exports.OperationTypeValidator = exports.OperationType = void 0;
4
+ var types_1 = require("./types");
5
+ Object.defineProperty(exports, "OperationType", { enumerable: true, get: function () { return types_1.OperationType; } });
6
+ var operation_type_1 = require("./operation-type");
7
+ Object.defineProperty(exports, "OperationTypeValidator", { enumerable: true, get: function () { return operation_type_1.OperationTypeValidator; } });
8
+ var field_processor_1 = require("./field-processor");
9
+ Object.defineProperty(exports, "FieldProcessor", { enumerable: true, get: function () { return field_processor_1.FieldProcessor; } });
10
+ var field_validator_1 = require("./field-validator");
11
+ Object.defineProperty(exports, "FieldValidator", { enumerable: true, get: function () { return field_validator_1.FieldValidator; } });
12
+ var base_operation_1 = require("./base-operation");
13
+ Object.defineProperty(exports, "BaseOperation", { enumerable: true, get: function () { return base_operation_1.BaseOperation; } });
14
+ var field_values_1 = require("./field-values");
15
+ Object.defineProperty(exports, "getOperationFieldValues", { enumerable: true, get: function () { return field_values_1.getOperationFieldValues; } });
16
+ var get_many_1 = require("./get-many");
17
+ Object.defineProperty(exports, "GetManyOperation", { enumerable: true, get: function () { return get_many_1.GetManyOperation; } });
18
+ var create_operation_1 = require("./create-operation");
19
+ Object.defineProperty(exports, "CreateOperation", { enumerable: true, get: function () { return create_operation_1.CreateOperation; } });
20
+ var update_operation_1 = require("./update-operation");
21
+ Object.defineProperty(exports, "UpdateOperation", { enumerable: true, get: function () { return update_operation_1.UpdateOperation; } });
22
+ var get_operation_1 = require("./get-operation");
23
+ Object.defineProperty(exports, "GetOperation", { enumerable: true, get: function () { return get_operation_1.GetOperation; } });
24
+ var delete_operation_1 = require("./delete-operation");
25
+ Object.defineProperty(exports, "DeleteOperation", { enumerable: true, get: function () { return delete_operation_1.DeleteOperation; } });
26
+ var count_operation_1 = require("./count-operation");
27
+ Object.defineProperty(exports, "CountOperation", { enumerable: true, get: function () { return count_operation_1.CountOperation; } });
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/operations/base/index.ts"],"names":[],"mappings":";;;AAAA,iCAAuE;AAA9D,sGAAA,aAAa,OAAA;AACtB,mDAA0D;AAAjD,wHAAA,sBAAsB,OAAA;AAC/B,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,+CAAyD;AAAhD,uHAAA,uBAAuB,OAAA;AAChC,uCAA8C;AAArC,4GAAA,gBAAgB,OAAA;AACzB,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA"}
@@ -0,0 +1,5 @@
1
+ export declare class OperationTypeValidator {
2
+ validateOperation(operation: string): Promise<boolean>;
3
+ private isSupportedOperation;
4
+ isWriteOperation(operation: string): boolean;
5
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OperationTypeValidator = void 0;
4
+ const entity_types_1 = require("../../types/base/entity-types");
5
+ const types_1 = require("./types");
6
+ class OperationTypeValidator {
7
+ async validateOperation(operation) {
8
+ if (!this.isSupportedOperation(operation)) {
9
+ throw new Error(`Unsupported operation: ${operation}`);
10
+ }
11
+ return true;
12
+ }
13
+ isSupportedOperation(operation) {
14
+ return Object.values(entity_types_1.OperationType).includes(operation);
15
+ }
16
+ isWriteOperation(operation) {
17
+ return types_1.WRITE_OPERATIONS.includes(operation);
18
+ }
19
+ }
20
+ exports.OperationTypeValidator = OperationTypeValidator;
21
+ //# sourceMappingURL=operation-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-type.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/operations/base/operation-type.ts"],"names":[],"mappings":";;;AAAA,gEAA8D;AAC9D,mCAA2C;AAM3C,MAAa,sBAAsB;IAIlC,KAAK,CAAC,iBAAiB,CAAC,SAAiB;QAExC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3C,MAAM,IAAI,KAAK,CAAC,0BAA0B,SAAS,EAAE,CAAC,CAAC;QACxD,CAAC;QAGD,OAAO,IAAI,CAAC;IACb,CAAC;IAKO,oBAAoB,CAAC,SAAiB;QAC7C,OAAO,MAAM,CAAC,MAAM,CAAC,4BAAa,CAAC,CAAC,QAAQ,CAAC,SAA0B,CAAC,CAAC;IAC1E,CAAC;IAKD,gBAAgB,CAAC,SAAiB;QACjC,OAAO,wBAAgB,CAAC,QAAQ,CAAC,SAA2B,CAAC,CAAC;IAC/D,CAAC;CACD;AA3BD,wDA2BC"}
@@ -0,0 +1,6 @@
1
+ import { OperationType } from '../../types/base/entity-types';
2
+ export declare const WRITE_OPERATIONS: readonly [OperationType.CREATE, OperationType.UPDATE, OperationType.DELETE];
3
+ export declare const READ_OPERATIONS: readonly [OperationType.READ, OperationType.QUERY, OperationType.COUNT, OperationType.GET_ENTITY_INFO, OperationType.GET_FIELD_INFO];
4
+ export type WriteOperation = typeof WRITE_OPERATIONS[number];
5
+ export type ReadOperation = typeof READ_OPERATIONS[number];
6
+ export { OperationType };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OperationType = exports.READ_OPERATIONS = exports.WRITE_OPERATIONS = void 0;
4
+ const entity_types_1 = require("../../types/base/entity-types");
5
+ Object.defineProperty(exports, "OperationType", { enumerable: true, get: function () { return entity_types_1.OperationType; } });
6
+ exports.WRITE_OPERATIONS = [
7
+ entity_types_1.OperationType.CREATE,
8
+ entity_types_1.OperationType.UPDATE,
9
+ entity_types_1.OperationType.DELETE,
10
+ ];
11
+ exports.READ_OPERATIONS = [
12
+ entity_types_1.OperationType.READ,
13
+ entity_types_1.OperationType.QUERY,
14
+ entity_types_1.OperationType.COUNT,
15
+ entity_types_1.OperationType.GET_ENTITY_INFO,
16
+ entity_types_1.OperationType.GET_FIELD_INFO,
17
+ ];
18
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/operations/base/types.ts"],"names":[],"mappings":";;;AAAA,gEAA8D;AAmCrD,8FAnCA,4BAAa,OAmCA;AA9BT,QAAA,gBAAgB,GAAG;IAC/B,4BAAa,CAAC,MAAM;IACpB,4BAAa,CAAC,MAAM;IACpB,4BAAa,CAAC,MAAM;CACX,CAAC;AAKE,QAAA,eAAe,GAAG;IAC9B,4BAAa,CAAC,IAAI;IAClB,4BAAa,CAAC,KAAK;IACnB,4BAAa,CAAC,KAAK;IACnB,4BAAa,CAAC,eAAe;IAC7B,4BAAa,CAAC,cAAc;CACnB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { IExecuteFunctions } from 'n8n-workflow';
2
+ import type { IAutotaskEntity } from '../../types/base/entity-types';
3
+ import { BaseOperation } from './base-operation';
4
+ export declare class UpdateOperation<T extends IAutotaskEntity> extends BaseOperation {
5
+ private readonly fieldProcessor;
6
+ constructor(entityType: string, context: IExecuteFunctions);
7
+ execute(itemIndex: number, entityId: string | number): Promise<T>;
8
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateOperation = void 0;
4
+ const entity_types_1 = require("../../types/base/entity-types");
5
+ const request_1 = require("../../helpers/http/request");
6
+ const errorHandler_1 = require("../../helpers/errorHandler");
7
+ const field_values_1 = require("./field-values");
8
+ const date_time_1 = require("../../helpers/date-time");
9
+ const body_builder_1 = require("../../helpers/http/body-builder");
10
+ const base_operation_1 = require("./base-operation");
11
+ const field_processor_1 = require("./field-processor");
12
+ const error_constants_1 = require("../../constants/error.constants");
13
+ const entities_1 = require("../../constants/entities");
14
+ const utils_1 = require("../../helpers/date-time/utils");
15
+ class UpdateOperation extends base_operation_1.BaseOperation {
16
+ constructor(entityType, context) {
17
+ var _a;
18
+ const metadata = (0, entities_1.getEntityMetadata)(entityType);
19
+ const parentType = ((_a = metadata === null || metadata === void 0 ? void 0 : metadata.operations) === null || _a === void 0 ? void 0 : _a.update) === 'parent' ? metadata.childOf : undefined;
20
+ super(entityType, entity_types_1.OperationType.UPDATE, context, parentType);
21
+ this.fieldProcessor = field_processor_1.FieldProcessor.getInstance(entityType, entity_types_1.OperationType.UPDATE, context);
22
+ }
23
+ async execute(itemIndex, entityId) {
24
+ return await (0, errorHandler_1.handleErrors)(this.context, async () => {
25
+ console.debug('[UpdateOperation] Starting update for', this.entityType, 'ID:', entityId);
26
+ const rawFieldValues = await (0, field_values_1.getOperationFieldValues)(this.context, this.entityType, itemIndex, 'update');
27
+ console.debug('[UpdateOperation] Raw field values:', rawFieldValues);
28
+ const validatedData = await (0, field_values_1.validateFieldValues)(this.context, this.entityType, rawFieldValues, itemIndex, 'update');
29
+ console.debug('[UpdateOperation] Validated data:', validatedData);
30
+ const apiReadyData = await (0, utils_1.convertDatesToUTC)(validatedData, this.entityType, this.context, 'UpdateOperation');
31
+ console.debug('[UpdateOperation] API-ready data with date conversion:', apiReadyData);
32
+ const metadata = (0, entities_1.getEntityMetadata)(this.entityType);
33
+ console.debug('Entity metadata:', metadata);
34
+ const endpoint = await this.buildOperationUrl(itemIndex);
35
+ console.debug('[UpdateOperation] Using endpoint:', endpoint);
36
+ try {
37
+ const { body: requestBody } = await (0, body_builder_1.buildRequestBody)({
38
+ validatedData: apiReadyData,
39
+ entityType: this.entityType,
40
+ entityId,
41
+ operation: 'update',
42
+ fieldProcessor: this.fieldProcessor,
43
+ });
44
+ console.debug('Request body:', requestBody);
45
+ const response = await request_1.autotaskApiRequest.call(this.context, 'PATCH', endpoint, requestBody);
46
+ if (!response) {
47
+ throw new Error(error_constants_1.ERROR_TEMPLATES.operation
48
+ .replace('{type}', 'ResponseError')
49
+ .replace('{operation}', 'update')
50
+ .replace('{entity}', this.entityType)
51
+ .replace('{details}', 'Invalid API response: empty response'));
52
+ }
53
+ return date_time_1.processResponseDates.call(this.context, response, `${this.entityType}.update`);
54
+ }
55
+ catch (error) {
56
+ if (error instanceof Error) {
57
+ if (error.message.includes('404')) {
58
+ console.debug('[UpdateOperation] Endpoint not found error detected');
59
+ throw new Error(error_constants_1.ERROR_TEMPLATES.validation
60
+ .replace('{type}', 'ValidationError')
61
+ .replace('{entity}', this.entityType)
62
+ .replace('{details}', `Invalid endpoint: ${endpoint}`));
63
+ }
64
+ }
65
+ throw error;
66
+ }
67
+ }, {
68
+ operation: 'update',
69
+ entityType: this.entityType,
70
+ });
71
+ }
72
+ }
73
+ exports.UpdateOperation = UpdateOperation;
74
+ //# sourceMappingURL=update-operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-operation.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/operations/base/update-operation.ts"],"names":[],"mappings":";;;AAEA,gEAA8D;AAC9D,wDAAgE;AAChE,6DAA0D;AAC1D,iDAA8E;AAC9E,uDAA+D;AAC/D,kEAAmE;AACnE,qDAAiD;AACjD,uDAAmD;AACnD,qEAAkE;AAClE,uDAA6D;AAC7D,yDAAkE;AAMlE,MAAa,eAA2C,SAAQ,8BAAa;IAG5E,YACC,UAAkB,EAClB,OAA0B;;QAG1B,MAAM,QAAQ,GAAG,IAAA,4BAAiB,EAAC,UAAU,CAAC,CAAC;QAC/C,MAAM,UAAU,GAAG,CAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,0CAAE,MAAM,MAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;QAE5F,KAAK,CAAC,UAAU,EAAE,4BAAa,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,cAAc,GAAG,gCAAc,CAAC,WAAW,CAAC,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BACH,CAAC;gBACF,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC,EACD;YACC,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC3B,CACD,CAAC;IACH,CAAC;CACD;AAtHD,0CAsHC"}
@@ -0,0 +1,8 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const entityInfoOptions: {
3
+ name: string;
4
+ value: string;
5
+ description: string;
6
+ action: string;
7
+ }[];
8
+ export declare function addEntityInfoOperations(resourceName: string): INodeProperties[];
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.entityInfoOptions = void 0;
4
+ exports.addEntityInfoOperations = addEntityInfoOperations;
5
+ exports.entityInfoOptions = [
6
+ {
7
+ name: 'Get Entity Info',
8
+ value: 'getEntityInfo',
9
+ description: 'Get metadata about this entity type',
10
+ action: 'Get entity info',
11
+ },
12
+ {
13
+ name: 'Get Field Info',
14
+ value: 'getFieldInfo',
15
+ description: 'Get field definitions for this entity type',
16
+ action: 'Get field info',
17
+ },
18
+ ];
19
+ function addEntityInfoOperations(resourceName) {
20
+ return [
21
+ {
22
+ displayName: 'Operation',
23
+ name: 'operation',
24
+ type: 'options',
25
+ noDataExpression: true,
26
+ displayOptions: {
27
+ show: {
28
+ resource: [resourceName],
29
+ },
30
+ },
31
+ options: [
32
+ ...exports.entityInfoOptions,
33
+ ],
34
+ default: '',
35
+ },
36
+ ];
37
+ }
38
+ //# sourceMappingURL=entityInfo.description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entityInfo.description.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/operations/common/entityInfo.description.ts"],"names":[],"mappings":";;;AAuBA,0DAmBC;AArCY,QAAA,iBAAiB,GAAG;IAChC;QACC,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,qCAAqC;QAClD,MAAM,EAAE,iBAAiB;KACzB;IACD;QACC,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,4CAA4C;QACzD,MAAM,EAAE,gBAAgB;KACxB;CACD,CAAC;AAKF,SAAgB,uBAAuB,CAAC,YAAoB;IAC3D,OAAO;QACN;YACC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,IAAI;YACtB,cAAc,EAAE;gBACf,IAAI,EAAE;oBACL,QAAQ,EAAE,CAAC,YAAY,CAAC;iBACxB;aACD;YACD,OAAO,EAAE;gBACR,GAAG,yBAAiB;aAEpB;YACD,OAAO,EAAE,EAAE;SACX;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function executeEntityInfoOperations(operation: string, entityType: string, context: IExecuteFunctions, itemIndex: number, parentType?: string, parentChain?: string[]): Promise<INodeExecutionData>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeEntityInfoOperations = executeEntityInfoOperations;
4
+ const getEntityInfo_operation_1 = require("../base/getEntityInfo.operation");
5
+ const getFieldInfo_operation_1 = require("../base/getFieldInfo.operation");
6
+ async function executeEntityInfoOperations(operation, entityType, context, itemIndex, parentType, parentChain) {
7
+ switch (operation) {
8
+ case 'getEntityInfo': {
9
+ const getEntityInfoOp = new getEntityInfo_operation_1.GetEntityInfoOperation(entityType, context, parentType, parentChain);
10
+ return getEntityInfoOp.execute(itemIndex);
11
+ }
12
+ case 'getFieldInfo': {
13
+ const getFieldInfoOp = new getFieldInfo_operation_1.GetFieldInfoOperation(entityType, context, parentType, parentChain);
14
+ return getFieldInfoOp.execute(itemIndex);
15
+ }
16
+ default:
17
+ throw new Error(`Unknown operation: ${operation}`);
18
+ }
19
+ }
20
+ //# sourceMappingURL=entityInfo.execute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entityInfo.execute.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/operations/common/entityInfo.execute.ts"],"names":[],"mappings":";;AAQA,kEA8BC;AApCD,6EAAyE;AACzE,2EAAuE;AAKhE,KAAK,UAAU,2BAA2B,CAChD,SAAiB,EACjB,UAAkB,EAClB,OAA0B,EAC1B,SAAiB,EACjB,UAAmB,EACnB,WAAsB;IAEtB,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,eAAe,CAAC,CAAC,CAAC;YACtB,MAAM,eAAe,GAAG,IAAI,gDAAsB,CACjD,UAAU,EACV,OAAO,EACP,UAAU,EACV,WAAW,CACX,CAAC;YACF,OAAO,eAAe,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;QACD,KAAK,cAAc,CAAC,CAAC,CAAC;YACrB,MAAM,cAAc,GAAG,IAAI,8CAAqB,CAC/C,UAAU,EACV,OAAO,EACP,UAAU,EACV,WAAW,CACX,CAAC;YACF,OAAO,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC1C,CAAC;QACD;YACC,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;IACrD,CAAC;AACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const getManyAdvancedOptions: INodeProperties[];
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getManyAdvancedOptions = void 0;
4
+ exports.getManyAdvancedOptions = [
5
+ {
6
+ displayName: 'Advanced Filter',
7
+ name: 'advancedFilter',
8
+ type: 'json',
9
+ default: '',
10
+ description: 'Must be a JSON string containing a "filter" array with Autotask API query criteria',
11
+ hint: 'First use Get Field Info to confirm exact field names, then use Search Filter Build to construct the filter JSON. (Autotask API docs: https://ww4.autotask.net/help/DeveloperHelp/Content/APIs/REST/API_Basic_Query_Calls.htm.)',
12
+ required: true,
13
+ typeOptions: {
14
+ alwaysOpenEditWindow: true,
15
+ },
16
+ displayOptions: {
17
+ show: {
18
+ operation: ['getManyAdvanced'],
19
+ },
20
+ },
21
+ },
22
+ ];
23
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../nodes/Autotask/operations/common/get-many-advanced/description.ts"],"names":[],"mappings":";;;AAKa,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,oFAAoF;QACjG,IAAI,EAAE,iOAAiO;QACvO,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE;YACZ,oBAAoB,EAAE,IAAI;SAC1B;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,SAAS,EAAE,CAAC,iBAAiB,CAAC;aAC9B;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function executeGetManyAdvanced(this: IExecuteFunctions, entityType: string, itemIndex: number, options?: {
3
+ pageSize?: number;
4
+ maxPages?: number;
5
+ isPicklistQuery?: boolean;
6
+ picklistFields?: string[];
7
+ parentType?: string;
8
+ }): Promise<INodeExecutionData[]>;
9
+ export declare function handleGetManyAdvancedOperation(this: IExecuteFunctions, entityType: string, itemIndex: number, options?: {
10
+ pageSize?: number;
11
+ maxPages?: number;
12
+ isPicklistQuery?: boolean;
13
+ picklistFields?: string[];
14
+ parentType?: string;
15
+ }): Promise<INodeExecutionData[]>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeGetManyAdvanced = executeGetManyAdvanced;
4
+ exports.handleGetManyAdvancedOperation = handleGetManyAdvancedOperation;
5
+ const get_many_advanced_operation_1 = require("../../base/get-many-advanced.operation");
6
+ async function executeGetManyAdvanced(entityType, itemIndex, options) {
7
+ const operation = new get_many_advanced_operation_1.GetManyAdvancedOperation(entityType, this, options);
8
+ const results = await operation.execute(itemIndex);
9
+ return results.map(item => ({ json: item }));
10
+ }
11
+ function handleGetManyAdvancedOperation(entityType, itemIndex, options) {
12
+ return executeGetManyAdvanced.call(this, entityType, itemIndex, options);
13
+ }
14
+ //# sourceMappingURL=execute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../nodes/Autotask/operations/common/get-many-advanced/execute.ts"],"names":[],"mappings":";;AAOA,wDAeC;AAKD,wEAaC;AAtCD,wFAAkF;AAK3E,KAAK,UAAU,sBAAsB,CAE3C,UAAkB,EAClB,SAAiB,EACjB,OAMC;IAED,MAAM,SAAS,GAAG,IAAI,sDAAwB,CAAkB,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3F,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACnD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC9C,CAAC;AAKD,SAAgB,8BAA8B,CAE7C,UAAkB,EAClB,SAAiB,EACjB,OAMC;IAED,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAC1E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './description';
2
+ export * from './execute';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./description"), exports);
18
+ __exportStar(require("./execute"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Autotask/operations/common/get-many-advanced/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,4CAA0B"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const companyFields: INodeProperties[];