n8n-nodes-autotask 0.3.3 → 0.4.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 (101) hide show
  1. package/README.md +72 -2
  2. package/dist/nodes/Autotask/Autotask.node.js +54 -9
  3. package/dist/nodes/Autotask/Autotask.node.js.map +1 -1
  4. package/dist/nodes/Autotask/constants/entities.js +9 -0
  5. package/dist/nodes/Autotask/constants/entities.js.map +1 -1
  6. package/dist/nodes/Autotask/constants/field.constants.js +7 -0
  7. package/dist/nodes/Autotask/constants/field.constants.js.map +1 -1
  8. package/dist/nodes/Autotask/helpers/errorHandler.js +16 -0
  9. package/dist/nodes/Autotask/helpers/errorHandler.js.map +1 -1
  10. package/dist/nodes/Autotask/helpers/http/request.js +19 -12
  11. package/dist/nodes/Autotask/helpers/http/request.js.map +1 -1
  12. package/dist/nodes/Autotask/operations/base/base-operation.js +1 -2
  13. package/dist/nodes/Autotask/operations/base/base-operation.js.map +1 -1
  14. package/dist/nodes/Autotask/operations/base/delete-operation.js +2 -1
  15. package/dist/nodes/Autotask/operations/base/delete-operation.js.map +1 -1
  16. package/dist/nodes/Autotask/resources/contractBlockHourFactors/description.d.ts +2 -0
  17. package/dist/nodes/Autotask/resources/contractBlockHourFactors/description.js +96 -0
  18. package/dist/nodes/Autotask/resources/contractBlockHourFactors/description.js.map +1 -0
  19. package/dist/nodes/Autotask/resources/contractBlockHourFactors/execute.d.ts +2 -0
  20. package/dist/nodes/Autotask/resources/contractBlockHourFactors/execute.js +97 -0
  21. package/dist/nodes/Autotask/resources/contractBlockHourFactors/execute.js.map +1 -0
  22. package/dist/nodes/Autotask/resources/contractBlockHourFactors/index.d.ts +3 -0
  23. package/dist/nodes/Autotask/resources/contractBlockHourFactors/index.js +8 -0
  24. package/dist/nodes/Autotask/resources/contractBlockHourFactors/index.js.map +1 -0
  25. package/dist/nodes/Autotask/resources/contractBlocks/description.d.ts +2 -0
  26. package/dist/nodes/Autotask/resources/contractBlocks/description.js +96 -0
  27. package/dist/nodes/Autotask/resources/contractBlocks/description.js.map +1 -0
  28. package/dist/nodes/Autotask/resources/contractBlocks/execute.d.ts +2 -0
  29. package/dist/nodes/Autotask/resources/contractBlocks/execute.js +97 -0
  30. package/dist/nodes/Autotask/resources/contractBlocks/execute.js.map +1 -0
  31. package/dist/nodes/Autotask/resources/contractBlocks/index.d.ts +3 -0
  32. package/dist/nodes/Autotask/resources/contractBlocks/index.js +8 -0
  33. package/dist/nodes/Autotask/resources/contractBlocks/index.js.map +1 -0
  34. package/dist/nodes/Autotask/resources/contractCharges/description.d.ts +2 -0
  35. package/dist/nodes/Autotask/resources/contractCharges/description.js +116 -0
  36. package/dist/nodes/Autotask/resources/contractCharges/description.js.map +1 -0
  37. package/dist/nodes/Autotask/resources/contractCharges/execute.d.ts +2 -0
  38. package/dist/nodes/Autotask/resources/contractCharges/execute.js +106 -0
  39. package/dist/nodes/Autotask/resources/contractCharges/execute.js.map +1 -0
  40. package/dist/nodes/Autotask/resources/contractCharges/index.d.ts +2 -0
  41. package/dist/nodes/Autotask/resources/contractCharges/index.js +19 -0
  42. package/dist/nodes/Autotask/resources/contractCharges/index.js.map +1 -0
  43. package/dist/nodes/Autotask/resources/contractMilestones/description.d.ts +2 -0
  44. package/dist/nodes/Autotask/resources/contractMilestones/description.js +96 -0
  45. package/dist/nodes/Autotask/resources/contractMilestones/description.js.map +1 -0
  46. package/dist/nodes/Autotask/resources/contractMilestones/execute.d.ts +2 -0
  47. package/dist/nodes/Autotask/resources/contractMilestones/execute.js +97 -0
  48. package/dist/nodes/Autotask/resources/contractMilestones/execute.js.map +1 -0
  49. package/dist/nodes/Autotask/resources/contractMilestones/index.d.ts +3 -0
  50. package/dist/nodes/Autotask/resources/contractMilestones/index.js +8 -0
  51. package/dist/nodes/Autotask/resources/contractMilestones/index.js.map +1 -0
  52. package/dist/nodes/Autotask/resources/contractNotes/description.d.ts +2 -0
  53. package/dist/nodes/Autotask/resources/contractNotes/description.js +96 -0
  54. package/dist/nodes/Autotask/resources/contractNotes/description.js.map +1 -0
  55. package/dist/nodes/Autotask/resources/contractNotes/execute.d.ts +2 -0
  56. package/dist/nodes/Autotask/resources/contractNotes/execute.js +97 -0
  57. package/dist/nodes/Autotask/resources/contractNotes/execute.js.map +1 -0
  58. package/dist/nodes/Autotask/resources/contractNotes/index.d.ts +2 -0
  59. package/dist/nodes/Autotask/resources/contractNotes/index.js +19 -0
  60. package/dist/nodes/Autotask/resources/contractNotes/index.js.map +1 -0
  61. package/dist/nodes/Autotask/resources/contractRates/description.d.ts +2 -0
  62. package/dist/nodes/Autotask/resources/contractRates/description.js +96 -0
  63. package/dist/nodes/Autotask/resources/contractRates/description.js.map +1 -0
  64. package/dist/nodes/Autotask/resources/contractRates/execute.d.ts +2 -0
  65. package/dist/nodes/Autotask/resources/contractRates/execute.js +97 -0
  66. package/dist/nodes/Autotask/resources/contractRates/execute.js.map +1 -0
  67. package/dist/nodes/Autotask/resources/contractRates/index.d.ts +3 -0
  68. package/dist/nodes/Autotask/resources/contractRates/index.js +8 -0
  69. package/dist/nodes/Autotask/resources/contractRates/index.js.map +1 -0
  70. package/dist/nodes/Autotask/resources/contractServiceUnits/description.d.ts +2 -0
  71. package/dist/nodes/Autotask/resources/contractServiceUnits/description.js +84 -0
  72. package/dist/nodes/Autotask/resources/contractServiceUnits/description.js.map +1 -0
  73. package/dist/nodes/Autotask/resources/contractServiceUnits/execute.d.ts +2 -0
  74. package/dist/nodes/Autotask/resources/contractServiceUnits/execute.js +78 -0
  75. package/dist/nodes/Autotask/resources/contractServiceUnits/execute.js.map +1 -0
  76. package/dist/nodes/Autotask/resources/contractServiceUnits/index.d.ts +3 -0
  77. package/dist/nodes/Autotask/resources/contractServiceUnits/index.js +8 -0
  78. package/dist/nodes/Autotask/resources/contractServiceUnits/index.js.map +1 -0
  79. package/dist/nodes/Autotask/resources/contractServices/description.d.ts +2 -0
  80. package/dist/nodes/Autotask/resources/contractServices/description.js +96 -0
  81. package/dist/nodes/Autotask/resources/contractServices/description.js.map +1 -0
  82. package/dist/nodes/Autotask/resources/contractServices/execute.d.ts +2 -0
  83. package/dist/nodes/Autotask/resources/contractServices/execute.js +97 -0
  84. package/dist/nodes/Autotask/resources/contractServices/execute.js.map +1 -0
  85. package/dist/nodes/Autotask/resources/contractServices/index.d.ts +2 -0
  86. package/dist/nodes/Autotask/resources/contractServices/index.js +19 -0
  87. package/dist/nodes/Autotask/resources/contractServices/index.js.map +1 -0
  88. package/dist/nodes/Autotask/resources/definitions.js +45 -0
  89. package/dist/nodes/Autotask/resources/definitions.js.map +1 -1
  90. package/dist/nodes/Autotask/resources/services/description.d.ts +9 -0
  91. package/dist/nodes/Autotask/resources/services/description.js +96 -0
  92. package/dist/nodes/Autotask/resources/services/description.js.map +1 -0
  93. package/dist/nodes/Autotask/resources/services/execute.d.ts +2 -0
  94. package/dist/nodes/Autotask/resources/services/execute.js +77 -0
  95. package/dist/nodes/Autotask/resources/services/execute.js.map +1 -0
  96. package/dist/nodes/Autotask/resources/services/index.d.ts +2 -0
  97. package/dist/nodes/Autotask/resources/services/index.js +19 -0
  98. package/dist/nodes/Autotask/resources/services/index.js.map +1 -0
  99. package/dist/package.json +1 -1
  100. package/dist/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +1 -1
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contractChargeFields = void 0;
4
+ exports.contractChargeFields = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: [
13
+ 'contractCharge',
14
+ ],
15
+ },
16
+ },
17
+ options: [
18
+ {
19
+ name: 'Create',
20
+ value: 'create',
21
+ description: 'Create a contract charge',
22
+ action: 'Create a contract charge',
23
+ },
24
+ {
25
+ name: 'Update',
26
+ value: 'update',
27
+ description: 'Update a contract charge',
28
+ action: 'Update a contract charge',
29
+ },
30
+ {
31
+ name: 'Delete',
32
+ value: 'delete',
33
+ description: 'Delete a contract charge',
34
+ action: 'Delete a contract charge',
35
+ },
36
+ {
37
+ name: 'Get',
38
+ value: 'get',
39
+ description: 'Get a contract charge by ID',
40
+ action: 'Get a contract charge',
41
+ },
42
+ {
43
+ name: 'Get Many',
44
+ value: 'getMany',
45
+ description: 'Get multiple contract charges',
46
+ action: 'Get multiple contract charges',
47
+ },
48
+ {
49
+ name: 'Count',
50
+ value: 'count',
51
+ description: 'Count number of contract charges',
52
+ action: 'Count contract charges',
53
+ },
54
+ ],
55
+ default: 'get',
56
+ },
57
+ {
58
+ displayName: 'Charge ID',
59
+ name: 'id',
60
+ type: 'string',
61
+ required: true,
62
+ default: '',
63
+ displayOptions: {
64
+ show: {
65
+ resource: ['contractCharge'],
66
+ operation: ['update', 'get', 'delete'],
67
+ },
68
+ },
69
+ description: 'The ID of the charge to operate on',
70
+ },
71
+ {
72
+ displayName: 'Contract ID',
73
+ name: 'contractID',
74
+ type: 'string',
75
+ required: true,
76
+ default: '',
77
+ displayOptions: {
78
+ show: {
79
+ resource: ['contractCharge'],
80
+ operation: ['delete'],
81
+ },
82
+ },
83
+ description: 'The ID of the contract that the charge belongs to',
84
+ },
85
+ {
86
+ displayName: 'Fields',
87
+ name: 'fieldsToMap',
88
+ type: 'resourceMapper',
89
+ default: {
90
+ mappingMode: 'defineBelow',
91
+ value: null,
92
+ },
93
+ required: true,
94
+ displayOptions: {
95
+ show: {
96
+ resource: ['contractCharge'],
97
+ operation: ['create', 'update', 'getMany', 'count'],
98
+ },
99
+ },
100
+ typeOptions: {
101
+ loadOptionsDependsOn: ['resource', 'operation'],
102
+ resourceMapper: {
103
+ resourceMapperMethod: 'getFields',
104
+ mode: 'add',
105
+ fieldWords: {
106
+ singular: 'field',
107
+ plural: 'fields',
108
+ },
109
+ addAllFields: false,
110
+ multiKeyMatch: true,
111
+ supportAutoMap: true,
112
+ },
113
+ },
114
+ },
115
+ ];
116
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/resources/contractCharges/description.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAsB;IACtD;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;oBACT,gBAAgB;iBAChB;aACD;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,0BAA0B;gBACvC,MAAM,EAAE,0BAA0B;aAClC;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,0BAA0B;gBACvC,MAAM,EAAE,0BAA0B;aAClC;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,0BAA0B;gBACvC,MAAM,EAAE,0BAA0B;aAClC;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,6BAA6B;gBAC1C,MAAM,EAAE,uBAAuB;aAC/B;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,+BAA+B;gBAC5C,MAAM,EAAE,+BAA+B;aACvC;YACD;gBACC,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,kCAAkC;gBAC/C,MAAM,EAAE,wBAAwB;aAChC;SACD;QACD,OAAO,EAAE,KAAK;KACd;IACD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC;aACtC;SACD;QACD,WAAW,EAAE,oCAAoC;KACjD;IACD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,WAAW,EAAE,mDAAmD;KAChE;IACD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE;YACR,WAAW,EAAE,aAAa;YAC1B,KAAK,EAAE,IAAI;SACX;QACD,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;aACnD;SACD;QACD,WAAW,EAAE;YACZ,oBAAoB,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;YAC/C,cAAc,EAAE;gBACf,oBAAoB,EAAE,WAAW;gBACjC,IAAI,EAAE,KAAK;gBACX,UAAU,EAAE;oBACX,QAAQ,EAAE,OAAO;oBACjB,MAAM,EAAE,QAAQ;iBAChB;gBACD,YAAY,EAAE,KAAK;gBACnB,aAAa,EAAE,IAAI;gBACnB,cAAc,EAAE,IAAI;aACpB;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function executeContractChargeOperation(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeContractChargeOperation = executeContractChargeOperation;
4
+ const base_1 = require("../../operations/base");
5
+ const entityInfo_execute_1 = require("../../operations/common/entityInfo.execute");
6
+ const get_many_advanced_1 = require("../../operations/common/get-many-advanced");
7
+ const ENTITY_TYPE = 'contractCharge';
8
+ async function executeContractChargeOperation() {
9
+ const items = this.getInputData();
10
+ const returnData = [];
11
+ const operation = this.getNodeParameter('operation', 0);
12
+ for (let i = 0; i < items.length; i++) {
13
+ try {
14
+ switch (operation) {
15
+ case 'create': {
16
+ console.log('Debug: Starting create operation for contract charge');
17
+ const createOp = new base_1.CreateOperation(ENTITY_TYPE, this);
18
+ console.log('Debug: Created operation instance');
19
+ const response = await createOp.execute(i);
20
+ console.log('Debug: Operation response:', response);
21
+ returnData.push({ json: response });
22
+ break;
23
+ }
24
+ case 'update': {
25
+ console.log('Debug: Starting update operation for contract charge');
26
+ const entityId = this.getNodeParameter('id', i);
27
+ const updateOp = new base_1.UpdateOperation(ENTITY_TYPE, this);
28
+ console.log('Debug: Created update operation instance');
29
+ const response = await updateOp.execute(i, entityId);
30
+ console.log('Debug: Update operation response:', response);
31
+ returnData.push({ json: response });
32
+ break;
33
+ }
34
+ case 'delete': {
35
+ console.log('Debug: Starting delete operation for contract charge');
36
+ const deleteOp = new base_1.DeleteOperation(ENTITY_TYPE, this);
37
+ console.log('Debug: Created DeleteOperation instance');
38
+ const response = await deleteOp.execute(i);
39
+ console.log('Debug: Delete operation response:', response);
40
+ returnData.push({ json: { success: true } });
41
+ break;
42
+ }
43
+ case 'get': {
44
+ console.log('Debug: Starting get operation for contract charge');
45
+ const getOp = new base_1.GetOperation(ENTITY_TYPE, this, 'contract');
46
+ console.log('Debug: Created GetOperation instance');
47
+ const response = await getOp.execute(i);
48
+ console.log('Debug: Get operation response:', response);
49
+ returnData.push({ json: response });
50
+ break;
51
+ }
52
+ case 'getMany': {
53
+ console.log('Debug: Starting getMany operation for contract charge');
54
+ const getManyOp = new base_1.GetManyOperation(ENTITY_TYPE, this, { parentType: 'contract' });
55
+ console.log('Debug: Created GetManyOperation instance');
56
+ const filters = getManyOp.buildFiltersFromResourceMapper(i);
57
+ console.log('Debug: Built filters from resource mapper');
58
+ const response = await getManyOp.execute({ filter: filters }, i);
59
+ console.log('Debug: GetMany operation response length:', response.length);
60
+ returnData.push(...getManyOp.processReturnData(response));
61
+ break;
62
+ }
63
+ case 'getManyAdvanced': {
64
+ console.log('Debug: Starting getManyAdvanced operation for contract charge');
65
+ const results = await get_many_advanced_1.handleGetManyAdvancedOperation.call(this, ENTITY_TYPE, i, { parentType: 'contract' });
66
+ console.log('Debug: GetManyAdvanced operation completed');
67
+ returnData.push(...results);
68
+ break;
69
+ }
70
+ case 'count': {
71
+ console.log('Debug: Starting count operation for contract charge');
72
+ const countOp = new base_1.CountOperation(ENTITY_TYPE, this);
73
+ console.log('Debug: Created CountOperation instance');
74
+ const count = await countOp.execute(i);
75
+ console.log('Debug: Count operation response:', count);
76
+ returnData.push({
77
+ json: {
78
+ count,
79
+ entityType: ENTITY_TYPE,
80
+ },
81
+ });
82
+ break;
83
+ }
84
+ case 'getEntityInfo':
85
+ case 'getFieldInfo': {
86
+ console.log('Debug: Starting entity info operation for contract charge');
87
+ const response = await (0, entityInfo_execute_1.executeEntityInfoOperations)(operation, ENTITY_TYPE, this, i, 'contract');
88
+ console.log('Debug: Entity info operation completed');
89
+ returnData.push(response);
90
+ break;
91
+ }
92
+ default:
93
+ throw new Error(`Operation ${operation} is not supported`);
94
+ }
95
+ }
96
+ catch (error) {
97
+ if (this.continueOnFail()) {
98
+ returnData.push({ json: { error: error.message } });
99
+ continue;
100
+ }
101
+ throw error;
102
+ }
103
+ }
104
+ return [returnData];
105
+ }
106
+ //# sourceMappingURL=execute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/resources/contractCharges/execute.ts"],"names":[],"mappings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AM,KAAK,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBACvC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;oBACvD,UAAU,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE;4BACL,KAAK;4BACL,UAAU,EAAE,WAAW;yBACvB;qBACD,CAAC,CAAC;oBACH,MAAM;gBACP,CAAC;gBAED,KAAK,eAAe,CAAC;gBACrB,KAAK,cAAc,CAAC,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,CAAC,2DAA2D,CAAC,CAAC;oBACzE,MAAM,QAAQ,GAAG,MAAM,IAAA,gDAA2B,EAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;oBAChG,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;oBACtD,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC1B,MAAM;gBACP,CAAC;gBAED;oBACC,MAAM,IAAI,KAAK,CAAC,aAAa,SAAS,mBAAmB,CAAC,CAAC;YAC7D,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBACpD,SAAS;YACV,CAAC;YACD,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAC;AACrB,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/resources/contractCharges/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,4CAA0B"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const contractMilestoneFields: INodeProperties[];
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contractMilestoneFields = void 0;
4
+ exports.contractMilestoneFields = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: [
13
+ 'contractMilestone',
14
+ ],
15
+ },
16
+ },
17
+ options: [
18
+ {
19
+ name: 'Create',
20
+ value: 'create',
21
+ description: 'Create a contract milestone',
22
+ action: 'Create a contract milestone',
23
+ },
24
+ {
25
+ name: 'Update',
26
+ value: 'update',
27
+ description: 'Update a contract milestone',
28
+ action: 'Update a contract milestone',
29
+ },
30
+ {
31
+ name: 'Get',
32
+ value: 'get',
33
+ description: 'Get a contract milestone by ID',
34
+ action: 'Get a contract milestone',
35
+ },
36
+ {
37
+ name: 'Get Many',
38
+ value: 'getMany',
39
+ description: 'Get multiple contract milestones',
40
+ action: 'Get multiple contract milestones',
41
+ },
42
+ {
43
+ name: 'Count',
44
+ value: 'count',
45
+ description: 'Count number of contract milestones',
46
+ action: 'Count contract milestones',
47
+ },
48
+ ],
49
+ default: 'get',
50
+ },
51
+ {
52
+ displayName: 'Milestone ID',
53
+ name: 'id',
54
+ type: 'string',
55
+ required: true,
56
+ default: '',
57
+ displayOptions: {
58
+ show: {
59
+ resource: ['contractMilestone'],
60
+ operation: ['update', 'get'],
61
+ },
62
+ },
63
+ description: 'The ID of the milestone to operate on',
64
+ },
65
+ {
66
+ displayName: 'Fields',
67
+ name: 'fieldsToMap',
68
+ type: 'resourceMapper',
69
+ default: {
70
+ mappingMode: 'defineBelow',
71
+ value: null,
72
+ },
73
+ required: true,
74
+ displayOptions: {
75
+ show: {
76
+ resource: ['contractMilestone'],
77
+ operation: ['create', 'update', 'getMany', 'count'],
78
+ },
79
+ },
80
+ typeOptions: {
81
+ loadOptionsDependsOn: ['resource', 'operation'],
82
+ resourceMapper: {
83
+ resourceMapperMethod: 'getFields',
84
+ mode: 'add',
85
+ fieldWords: {
86
+ singular: 'field',
87
+ plural: 'fields',
88
+ },
89
+ addAllFields: false,
90
+ multiKeyMatch: true,
91
+ supportAutoMap: true,
92
+ },
93
+ },
94
+ },
95
+ ];
96
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/resources/contractMilestones/description.ts"],"names":[],"mappings":";;;AAEa,QAAA,uBAAuB,GAAsB;IACzD;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;oBACT,mBAAmB;iBACnB;aACD;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,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C;YAC/C,cAAc,EAAE;gBACf,oBAAoB,EAAE,WAAW;gBACjC,IAAI,EAAE,KAAK;gBACX,UAAU,EAAE;oBACX,QAAQ,EAAE,OAAO;oBACjB,MAAM,EAAE,QAAQ;iBAChB;gBACD,YAAY,EAAE,KAAK;gBACnB,aAAa,EAAE,IAAI;gBACnB,cAAc,EAAE,IAAI;aACpB;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function executeContractMilestoneOperation(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeContractMilestoneOperation = executeContractMilestoneOperation;
4
+ const base_1 = require("../../operations/base");
5
+ const entityInfo_execute_1 = require("../../operations/common/entityInfo.execute");
6
+ const get_many_advanced_1 = require("../../operations/common/get-many-advanced");
7
+ const ENTITY_TYPE = 'contractMilestone';
8
+ async function executeContractMilestoneOperation() {
9
+ const items = this.getInputData();
10
+ const returnData = [];
11
+ const operation = this.getNodeParameter('operation', 0);
12
+ for (let i = 0; i < items.length; i++) {
13
+ try {
14
+ switch (operation) {
15
+ case 'create': {
16
+ console.log('Debug: Starting create operation for contract milestone');
17
+ const createOp = new base_1.CreateOperation(ENTITY_TYPE, this);
18
+ console.log('Debug: Created operation instance');
19
+ const response = await createOp.execute(i);
20
+ console.log('Debug: Operation response:', response);
21
+ returnData.push({ json: response });
22
+ break;
23
+ }
24
+ case 'update': {
25
+ console.log('Debug: Starting update operation for contract milestone');
26
+ const entityId = this.getNodeParameter('id', i);
27
+ const updateOp = new base_1.UpdateOperation(ENTITY_TYPE, this);
28
+ console.log('Debug: Created update operation instance');
29
+ const response = await updateOp.execute(i, entityId);
30
+ console.log('Debug: Update operation response:', response);
31
+ returnData.push({ json: response });
32
+ break;
33
+ }
34
+ case 'get': {
35
+ console.log('Debug: Starting get operation for contract milestone');
36
+ const getOp = new base_1.GetOperation(ENTITY_TYPE, this, 'contract');
37
+ console.log('Debug: Created GetOperation instance');
38
+ const response = await getOp.execute(i);
39
+ console.log('Debug: Get operation response:', response);
40
+ returnData.push({ json: response });
41
+ break;
42
+ }
43
+ case 'getMany': {
44
+ console.log('Debug: Starting getMany operation for contract milestone');
45
+ const getManyOp = new base_1.GetManyOperation(ENTITY_TYPE, this, { parentType: 'contract' });
46
+ console.log('Debug: Created GetManyOperation instance');
47
+ const filters = getManyOp.buildFiltersFromResourceMapper(i);
48
+ console.log('Debug: Built filters from resource mapper');
49
+ const response = await getManyOp.execute({ filter: filters }, i);
50
+ console.log('Debug: GetMany operation response length:', response.length);
51
+ returnData.push(...getManyOp.processReturnData(response));
52
+ break;
53
+ }
54
+ case 'getManyAdvanced': {
55
+ console.log('Debug: Starting getManyAdvanced operation for contract milestone');
56
+ const results = await get_many_advanced_1.handleGetManyAdvancedOperation.call(this, ENTITY_TYPE, i, { parentType: 'contract' });
57
+ console.log('Debug: GetManyAdvanced operation completed');
58
+ returnData.push(...results);
59
+ break;
60
+ }
61
+ case 'count': {
62
+ console.log('Debug: Starting count operation for contract milestone');
63
+ const countOp = new base_1.CountOperation(ENTITY_TYPE, this);
64
+ console.log('Debug: Created CountOperation instance');
65
+ const count = await countOp.execute(i);
66
+ console.log('Debug: Count operation response:', count);
67
+ returnData.push({
68
+ json: {
69
+ count,
70
+ entityType: ENTITY_TYPE,
71
+ },
72
+ });
73
+ break;
74
+ }
75
+ case 'getEntityInfo':
76
+ case 'getFieldInfo': {
77
+ console.log('Debug: Starting entity info operation for contract milestone');
78
+ const response = await (0, entityInfo_execute_1.executeEntityInfoOperations)(operation, ENTITY_TYPE, this, i, 'contract');
79
+ console.log('Debug: Entity info operation completed');
80
+ returnData.push(response);
81
+ break;
82
+ }
83
+ default:
84
+ throw new Error(`Operation ${operation} is not supported`);
85
+ }
86
+ }
87
+ catch (error) {
88
+ if (this.continueOnFail()) {
89
+ returnData.push({ json: { error: error.message } });
90
+ continue;
91
+ }
92
+ throw error;
93
+ }
94
+ }
95
+ return [returnData];
96
+ }
97
+ //# sourceMappingURL=execute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/resources/contractMilestones/execute.ts"],"names":[],"mappings":";;AAcA,8EAwGC;AApHD,gDAM+B;AAC/B,mFAAyF;AACzF,iFAA2F;AAE3F,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAEjC,KAAK,UAAU,iCAAiC;IAGtD,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;IAClC,MAAM,UAAU,GAAyB,EAAE,CAAC;IAC5C,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;IAElE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,IAAI,CAAC;YACJ,QAAQ,SAAS,EAAE,CAAC;gBACnB,KAAK,QAAQ,CAAC,CAAC,CAAC;oBACf,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;oBACvE,MAAM,QAAQ,GAAG,IAAI,sBAAe,CAAkB,WAAW,EAAE,IAAI,CAAC,CAAC;oBACzE,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;oBAEjD,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;oBAC3C,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,QAAQ,CAAC,CAAC;oBACpD,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;oBACpC,MAAM;gBACP,CAAC;gBAED,KAAK,QAAQ,CAAC,CAAC,CAAC;oBACf,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;oBACvE,MAAM,QAAQ,GAA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AC;gBACrB,KAAK,cAAc,CAAC,CAAC,CAAC;oBACrB,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;oBAC5E,MAAM,QAAQ,GAAG,MAAM,IAAA,gDAA2B,EAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;oBAChG,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;oBACtD,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC1B,MAAM;gBACP,CAAC;gBAED;oBACC,MAAM,IAAI,KAAK,CAAC,aAAa,SAAS,mBAAmB,CAAC,CAAC;YAC7D,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBACpD,SAAS;YACV,CAAC;YACD,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAC;AACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { contractMilestoneFields } from './description';
2
+ import { executeContractMilestoneOperation } from './execute';
3
+ export { contractMilestoneFields, executeContractMilestoneOperation };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeContractMilestoneOperation = exports.contractMilestoneFields = void 0;
4
+ const description_1 = require("./description");
5
+ Object.defineProperty(exports, "contractMilestoneFields", { enumerable: true, get: function () { return description_1.contractMilestoneFields; } });
6
+ const execute_1 = require("./execute");
7
+ Object.defineProperty(exports, "executeContractMilestoneOperation", { enumerable: true, get: function () { return execute_1.executeContractMilestoneOperation; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/resources/contractMilestones/index.ts"],"names":[],"mappings":";;;AAAA,+CAAwD;AAG/C,wGAHA,qCAAuB,OAGA;AAFhC,uCAA8D;AAE5B,kHAFzB,2CAAiC,OAEyB"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const contractNoteFields: INodeProperties[];
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contractNoteFields = void 0;
4
+ exports.contractNoteFields = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: [
13
+ 'contractNote',
14
+ ],
15
+ },
16
+ },
17
+ options: [
18
+ {
19
+ name: 'Create',
20
+ value: 'create',
21
+ description: 'Create a contract note',
22
+ action: 'Create a contract note',
23
+ },
24
+ {
25
+ name: 'Update',
26
+ value: 'update',
27
+ description: 'Update a contract note',
28
+ action: 'Update a contract note',
29
+ },
30
+ {
31
+ name: 'Get',
32
+ value: 'get',
33
+ description: 'Get a contract note by ID',
34
+ action: 'Get a contract note',
35
+ },
36
+ {
37
+ name: 'Get Many',
38
+ value: 'getMany',
39
+ description: 'Get multiple contract notes',
40
+ action: 'Get multiple contract notes',
41
+ },
42
+ {
43
+ name: 'Count',
44
+ value: 'count',
45
+ description: 'Count number of contract notes',
46
+ action: 'Count contract notes',
47
+ },
48
+ ],
49
+ default: 'get',
50
+ },
51
+ {
52
+ displayName: 'Note ID',
53
+ name: 'id',
54
+ type: 'string',
55
+ required: true,
56
+ default: '',
57
+ displayOptions: {
58
+ show: {
59
+ resource: ['contractNote'],
60
+ operation: ['update', 'get'],
61
+ },
62
+ },
63
+ description: 'The ID of the note to operate on',
64
+ },
65
+ {
66
+ displayName: 'Fields',
67
+ name: 'fieldsToMap',
68
+ type: 'resourceMapper',
69
+ default: {
70
+ mappingMode: 'defineBelow',
71
+ value: null,
72
+ },
73
+ required: true,
74
+ displayOptions: {
75
+ show: {
76
+ resource: ['contractNote'],
77
+ operation: ['create', 'update', 'getMany', 'count'],
78
+ },
79
+ },
80
+ typeOptions: {
81
+ loadOptionsDependsOn: ['resource', 'operation'],
82
+ resourceMapper: {
83
+ resourceMapperMethod: 'getFields',
84
+ mode: 'add',
85
+ fieldWords: {
86
+ singular: 'field',
87
+ plural: 'fields',
88
+ },
89
+ addAllFields: false,
90
+ multiKeyMatch: true,
91
+ supportAutoMap: true,
92
+ },
93
+ },
94
+ },
95
+ ];
96
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../nodes/Autotask/resources/contractNotes/description.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAsB;IACpD;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;oBACT,cAAc;iBACd;aACD;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,wBAAwB;gBACrC,MAAM,EAAE,wBAAwB;aAChC;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,wBAAwB;gBACrC,MAAM,EAAE,wBAAwB;aAChC;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,2BAA2B;gBACxC,MAAM,EAAE,qBAAqB;aAC7B;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,6BAA6B;gBAC1C,MAAM,EAAE,6BAA6B;aACrC;YACD;gBACC,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,gCAAgC;gBAC7C,MAAM,EAAE,sBAAsB;aAC9B;SACD;QACD,OAAO,EAAE,KAAK;KACd;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,IAAI;QACV,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,QAAQ,EAAE,KAAK,CAAC;aAC5B;SACD;QACD,WAAW,EAAE,kCAAkC;KAC/C;IACD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE;YACR,WAAW,EAAE,aAAa;YAC1B,KAAK,EAAE,IAAI;SACX;QACD,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;aACnD;SACD;QACD,WAAW,EAAE;YACZ,oBAAoB,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;YAC/C,cAAc,EAAE;gBACf,oBAAoB,EAAE,WAAW;gBACjC,IAAI,EAAE,KAAK;gBACX,UAAU,EAAE;oBACX,QAAQ,EAAE,OAAO;oBACjB,MAAM,EAAE,QAAQ;iBAChB;gBACD,YAAY,EAAE,KAAK;gBACnB,aAAa,EAAE,IAAI;gBACnB,cAAc,EAAE,IAAI;aACpB;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function executeContractNoteOperation(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;