@easy8/n8n-nodes-easy8 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 (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +310 -0
  3. package/dist/credentials/Easy8.dark.svg +17 -0
  4. package/dist/credentials/Easy8.svg +16 -0
  5. package/dist/credentials/Easy8Api.credentials.d.ts +13 -0
  6. package/dist/credentials/Easy8Api.credentials.js +47 -0
  7. package/dist/credentials/Easy8Api.credentials.js.map +1 -0
  8. package/dist/images/cred-guide-1.png +0 -0
  9. package/dist/images/cred-guide-2.png +0 -0
  10. package/dist/images/cred-guide-3.png +0 -0
  11. package/dist/nodes/Easy8/Easy8.dark.svg +17 -0
  12. package/dist/nodes/Easy8/Easy8.node.d.ts +10 -0
  13. package/dist/nodes/Easy8/Easy8.node.js +283 -0
  14. package/dist/nodes/Easy8/Easy8.node.js.map +1 -0
  15. package/dist/nodes/Easy8/Easy8.svg +16 -0
  16. package/dist/nodes/Easy8/LoadOptions.d.ts +4 -0
  17. package/dist/nodes/Easy8/LoadOptions.js +157 -0
  18. package/dist/nodes/Easy8/LoadOptions.js.map +1 -0
  19. package/dist/nodes/Easy8/Model.d.ts +18 -0
  20. package/dist/nodes/Easy8/Model.js +24 -0
  21. package/dist/nodes/Easy8/Model.js.map +1 -0
  22. package/dist/nodes/Easy8/client/Autocomplete.d.ts +5 -0
  23. package/dist/nodes/Easy8/client/Autocomplete.js +3 -0
  24. package/dist/nodes/Easy8/client/Autocomplete.js.map +1 -0
  25. package/dist/nodes/Easy8/client/Easy8Client.d.ts +18 -0
  26. package/dist/nodes/Easy8/client/Easy8Client.js +124 -0
  27. package/dist/nodes/Easy8/client/Easy8Client.js.map +1 -0
  28. package/dist/nodes/Easy8/client/Issue.d.ts +15 -0
  29. package/dist/nodes/Easy8/client/Issue.js +3 -0
  30. package/dist/nodes/Easy8/client/Issue.js.map +1 -0
  31. package/dist/nodes/Easy8/client/Project.d.ts +10 -0
  32. package/dist/nodes/Easy8/client/Project.js +3 -0
  33. package/dist/nodes/Easy8/client/Project.js.map +1 -0
  34. package/dist/nodes/Easy8/client/Resources.d.ts +8 -0
  35. package/dist/nodes/Easy8/client/Resources.js +3 -0
  36. package/dist/nodes/Easy8/client/Resources.js.map +1 -0
  37. package/dist/nodes/Easy8/client/index.d.ts +3 -0
  38. package/dist/nodes/Easy8/client/index.js +20 -0
  39. package/dist/nodes/Easy8/client/index.js.map +1 -0
  40. package/dist/nodes/Easy8/fields/AccountFields.d.ts +2 -0
  41. package/dist/nodes/Easy8/fields/AccountFields.js +293 -0
  42. package/dist/nodes/Easy8/fields/AccountFields.js.map +1 -0
  43. package/dist/nodes/Easy8/fields/AttendanceFields.d.ts +2 -0
  44. package/dist/nodes/Easy8/fields/AttendanceFields.js +141 -0
  45. package/dist/nodes/Easy8/fields/AttendanceFields.js.map +1 -0
  46. package/dist/nodes/Easy8/fields/CustomFields.d.ts +2 -0
  47. package/dist/nodes/Easy8/fields/CustomFields.js +33 -0
  48. package/dist/nodes/Easy8/fields/CustomFields.js.map +1 -0
  49. package/dist/nodes/Easy8/fields/IssueFields.d.ts +2 -0
  50. package/dist/nodes/Easy8/fields/IssueFields.js +200 -0
  51. package/dist/nodes/Easy8/fields/IssueFields.js.map +1 -0
  52. package/dist/nodes/Easy8/fields/LeadFields.d.ts +2 -0
  53. package/dist/nodes/Easy8/fields/LeadFields.js +84 -0
  54. package/dist/nodes/Easy8/fields/LeadFields.js.map +1 -0
  55. package/dist/nodes/Easy8/fields/OpportunityFields.d.ts +3 -0
  56. package/dist/nodes/Easy8/fields/OpportunityFields.js +169 -0
  57. package/dist/nodes/Easy8/fields/OpportunityFields.js.map +1 -0
  58. package/dist/nodes/Easy8/fields/PersonalContactFields.d.ts +2 -0
  59. package/dist/nodes/Easy8/fields/PersonalContactFields.js +207 -0
  60. package/dist/nodes/Easy8/fields/PersonalContactFields.js.map +1 -0
  61. package/dist/nodes/Easy8/fields/ProjectFields.d.ts +2 -0
  62. package/dist/nodes/Easy8/fields/ProjectFields.js +61 -0
  63. package/dist/nodes/Easy8/fields/ProjectFields.js.map +1 -0
  64. package/dist/nodes/Easy8/fields/TimeEntryFields.d.ts +2 -0
  65. package/dist/nodes/Easy8/fields/TimeEntryFields.js +171 -0
  66. package/dist/nodes/Easy8/fields/TimeEntryFields.js.map +1 -0
  67. package/dist/nodes/Easy8/fields/UserFields.d.ts +2 -0
  68. package/dist/nodes/Easy8/fields/UserFields.js +195 -0
  69. package/dist/nodes/Easy8/fields/UserFields.js.map +1 -0
  70. package/dist/nodes/Easy8/operations/AddCommentOperation.d.ts +3 -0
  71. package/dist/nodes/Easy8/operations/AddCommentOperation.js +46 -0
  72. package/dist/nodes/Easy8/operations/AddCommentOperation.js.map +1 -0
  73. package/dist/nodes/Easy8/operations/BaseModel.d.ts +18 -0
  74. package/dist/nodes/Easy8/operations/BaseModel.js +3 -0
  75. package/dist/nodes/Easy8/operations/BaseModel.js.map +1 -0
  76. package/dist/nodes/Easy8/operations/CreateModel.d.ts +83 -0
  77. package/dist/nodes/Easy8/operations/CreateModel.js +3 -0
  78. package/dist/nodes/Easy8/operations/CreateModel.js.map +1 -0
  79. package/dist/nodes/Easy8/operations/CreateOperation.d.ts +6 -0
  80. package/dist/nodes/Easy8/operations/CreateOperation.js +211 -0
  81. package/dist/nodes/Easy8/operations/CreateOperation.js.map +1 -0
  82. package/dist/nodes/Easy8/operations/GetManyOperation.d.ts +3 -0
  83. package/dist/nodes/Easy8/operations/GetManyOperation.js +77 -0
  84. package/dist/nodes/Easy8/operations/GetManyOperation.js.map +1 -0
  85. package/dist/nodes/Easy8/operations/GetOneOperation.d.ts +3 -0
  86. package/dist/nodes/Easy8/operations/GetOneOperation.js +17 -0
  87. package/dist/nodes/Easy8/operations/GetOneOperation.js.map +1 -0
  88. package/dist/nodes/Easy8/operations/UpdateModel.d.ts +83 -0
  89. package/dist/nodes/Easy8/operations/UpdateModel.js +3 -0
  90. package/dist/nodes/Easy8/operations/UpdateModel.js.map +1 -0
  91. package/dist/nodes/Easy8/operations/UpdateOperation.d.ts +3 -0
  92. package/dist/nodes/Easy8/operations/UpdateOperation.js +188 -0
  93. package/dist/nodes/Easy8/operations/UpdateOperation.js.map +1 -0
  94. package/dist/nodes/Easy8/utils/ConvertToEasyDate.d.ts +1 -0
  95. package/dist/nodes/Easy8/utils/ConvertToEasyDate.js +26 -0
  96. package/dist/nodes/Easy8/utils/ConvertToEasyDate.js.map +1 -0
  97. package/dist/nodes/Easy8/utils/ExtractBillingOptions.d.ts +20 -0
  98. package/dist/nodes/Easy8/utils/ExtractBillingOptions.js +29 -0
  99. package/dist/nodes/Easy8/utils/ExtractBillingOptions.js.map +1 -0
  100. package/dist/nodes/Easy8/utils/SanitizeDomain.d.ts +1 -0
  101. package/dist/nodes/Easy8/utils/SanitizeDomain.js +10 -0
  102. package/dist/nodes/Easy8/utils/SanitizeDomain.js.map +1 -0
  103. package/dist/nodes/Easy8/utils/TryToParseParameterAsNumber.d.ts +2 -0
  104. package/dist/nodes/Easy8/utils/TryToParseParameterAsNumber.js +18 -0
  105. package/dist/nodes/Easy8/utils/TryToParseParameterAsNumber.js.map +1 -0
  106. package/dist/nodes/Easy8/utils/index.d.ts +4 -0
  107. package/dist/nodes/Easy8/utils/index.js +21 -0
  108. package/dist/nodes/Easy8/utils/index.js.map +1 -0
  109. package/dist/package.json +58 -0
  110. package/dist/tsconfig.tsbuildinfo +1 -0
  111. package/package.json +58 -0
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Easy8Client = void 0;
4
+ const utils_1 = require("../utils");
5
+ class Easy8Client {
6
+ constructor(that, helpers) {
7
+ this.that = that;
8
+ this.helpers = helpers;
9
+ }
10
+ async listProjects() {
11
+ const baseUrl = await this.baseUrl();
12
+ return await this.listAllItems({
13
+ modifyOptionsFn: ({ options, offset, pageSize }) => {
14
+ options.method = 'GET';
15
+ options.url = `${baseUrl}/projects.json`;
16
+ options.qs = {
17
+ offset,
18
+ limit: pageSize,
19
+ };
20
+ },
21
+ pageSize: 100,
22
+ resultItemKey: 'projects',
23
+ });
24
+ }
25
+ async getProject(projectId) {
26
+ const baseUrl = await this.baseUrl();
27
+ this.that.logger.debug(`Loading Project ${projectId}`);
28
+ const options = {
29
+ method: 'GET',
30
+ url: `${baseUrl}/projects/${projectId}.json`,
31
+ qs: {
32
+ include: 'trackers',
33
+ },
34
+ json: true,
35
+ };
36
+ const result = await this.helpers.httpRequestWithAuthentication.call(this.that, 'easy8Api', options);
37
+ return result['project'];
38
+ }
39
+ async getIssue(issueId) {
40
+ const baseUrl = await this.baseUrl();
41
+ this.that.logger.debug(`Loading Project ${issueId}`);
42
+ const options = {
43
+ method: 'GET',
44
+ url: `${baseUrl}/issues/${issueId}.json`,
45
+ qs: {
46
+ include: 'trackers',
47
+ },
48
+ json: true,
49
+ };
50
+ const result = await this.helpers.httpRequestWithAuthentication.call(this.that, 'easy8Api', options);
51
+ return result['issue'];
52
+ }
53
+ async listAllIssueStatuses() {
54
+ const baseUrl = await this.baseUrl();
55
+ this.that.logger.debug(`Loading all issue statuses`);
56
+ const options = {
57
+ method: 'GET',
58
+ url: `${baseUrl}/issue_statuses.json`,
59
+ json: true,
60
+ };
61
+ const result = await this.helpers.httpRequestWithAuthentication.call(this.that, 'easy8Api', options);
62
+ return result['issue_statuses'];
63
+ }
64
+ async listAutocompletePriorities() {
65
+ const baseUrl = await this.baseUrl();
66
+ this.that.logger.debug(`Loading Autocomplete Priorities`);
67
+ const options = {
68
+ method: 'GET',
69
+ url: `${baseUrl}/easy_autocompletes/issue_priorities.json`,
70
+ json: true,
71
+ };
72
+ const result = await this.helpers.httpRequestWithAuthentication.call(this.that, 'easy8Api', options);
73
+ return result;
74
+ }
75
+ async listEasyQueries(type) {
76
+ const baseUrl = await this.baseUrl();
77
+ return await this.listAllItems({
78
+ modifyOptionsFn: ({ options, offset, pageSize }) => {
79
+ options.method = 'GET';
80
+ options.url = `${baseUrl}/easy_queries.json`;
81
+ options.qs = {
82
+ type: type,
83
+ offset,
84
+ limit: pageSize,
85
+ };
86
+ },
87
+ pageSize: 100,
88
+ resultItemKey: 'easy_queries',
89
+ });
90
+ }
91
+ async baseUrl() {
92
+ const cred = await this.that.getCredentials('easy8Api');
93
+ return (0, utils_1.sanitizeDomain)(cred.domain);
94
+ }
95
+ async listAllItems(options) {
96
+ const that = this.that;
97
+ let offset = 0;
98
+ let pageSize = options.pageSize;
99
+ let fetchedItemsCount = pageSize;
100
+ let page = 1;
101
+ const allItems = [];
102
+ while (fetchedItemsCount >= pageSize) {
103
+ that.logger.debug(`Loading page ${page}`);
104
+ const requestOptions = {
105
+ url: '',
106
+ json: true,
107
+ };
108
+ options.modifyOptionsFn({ options: requestOptions, offset, pageSize });
109
+ const result = await this.helpers.httpRequestWithAuthentication.call(that, 'easy8Api', requestOptions);
110
+ if (!result) {
111
+ that.logger.error(`Error loading page ${page}`);
112
+ break;
113
+ }
114
+ const items = result[options.resultItemKey];
115
+ allItems.push(...items);
116
+ fetchedItemsCount = items.length;
117
+ offset += pageSize;
118
+ page += 1;
119
+ }
120
+ return allItems;
121
+ }
122
+ }
123
+ exports.Easy8Client = Easy8Client;
124
+ //# sourceMappingURL=Easy8Client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Easy8Client.js","sourceRoot":"","sources":["../../../../nodes/Easy8/client/Easy8Client.ts"],"names":[],"mappings":";;;AAEA,oCAA0C;AAwB1C,MAAa,WAAW;IACtB,YACmB,IAA0B,EAC1B,OAA+B;QAD/B,SAAI,GAAJ,IAAI,CAAsB;QAC1B,YAAO,GAAP,OAAO,CAAwB;IAC/C,CAAC;IAEJ,KAAK,CAAC,YAAY;QAChB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrC,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC;YAC7B,eAAe,EAAE,CAAC,EAAE,OAAO,E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ClE,IAAI,EACJ,UAAU,EACV,cAAc,CACf,CAAC;YACF,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAC;gBAChD,MAAM;YACR,CAAC;YACD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YAC5C,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;YAExB,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAC;YACjC,MAAM,IAAI,QAAQ,CAAC;YACnB,IAAI,IAAI,CAAC,CAAC;QACZ,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAjKD,kCAiKC"}
@@ -0,0 +1,15 @@
1
+ export interface EasyIdNamePair {
2
+ id: number;
3
+ name: string;
4
+ }
5
+ export interface EasyIssue {
6
+ id: number;
7
+ project: EasyIdNamePair;
8
+ subject: string;
9
+ }
10
+ export interface EasyIssueStatus {
11
+ id: number;
12
+ name: string;
13
+ is_closed: boolean;
14
+ description: string | null;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Issue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Issue.js","sourceRoot":"","sources":["../../../../nodes/Easy8/client/Issue.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export interface Project {
2
+ id: number;
3
+ name: string;
4
+ status: number;
5
+ trackers: EasyProjectTracker[] | undefined;
6
+ }
7
+ export interface EasyProjectTracker {
8
+ id: number;
9
+ name: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Project.js","sourceRoot":"","sources":["../../../../nodes/Easy8/client/Project.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export type EasyQueryType = 'EasyAttendanceQuery' | 'EasyIssueQuery' | 'EasyLeadQuery' | 'EasyCrmCaseQuery' | 'EasyContactQuery' | 'EasyGanttEasyProjectQuery' | 'EasyPersonalContactQuery' | 'EasyProjectQuery' | 'EasyTimeEntryQuery' | 'EasyUserQuery';
2
+ export interface EasyQueryInfo {
3
+ id: number;
4
+ name: string;
5
+ is_public: boolean;
6
+ project_id: number | null;
7
+ type: EasyQueryType;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Resources.js","sourceRoot":"","sources":["../../../../nodes/Easy8/client/Resources.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './Project';
2
+ export * from './Issue';
3
+ export * from './Easy8Client';
@@ -0,0 +1,20 @@
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("./Project"), exports);
18
+ __exportStar(require("./Issue"), exports);
19
+ __exportStar(require("./Easy8Client"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/Easy8/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,0CAAwB;AACxB,gDAA8B"}
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const AccountFields: INodeProperties[];
@@ -0,0 +1,293 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountFields = void 0;
4
+ const Model_1 = require("../Model");
5
+ const CustomFields_1 = require("./CustomFields");
6
+ const CommonAccountOptions = [
7
+ {
8
+ displayName: 'Industry ID',
9
+ name: 'industryId',
10
+ type: 'number',
11
+ default: '',
12
+ },
13
+ {
14
+ displayName: 'Name',
15
+ name: 'firstname',
16
+ type: 'string',
17
+ default: '',
18
+ description: 'Account name',
19
+ },
20
+ {
21
+ displayName: 'Accounts Type ID',
22
+ name: 'typeId',
23
+ type: 'number',
24
+ default: '',
25
+ description: 'Contact Type ID',
26
+ },
27
+ {
28
+ displayName: 'Account Manager ID',
29
+ name: 'assignedToId',
30
+ type: 'number',
31
+ default: '',
32
+ },
33
+ {
34
+ displayName: 'External Account Manager ID',
35
+ name: 'externalAssignedToId',
36
+ type: 'number',
37
+ default: '',
38
+ },
39
+ {
40
+ displayName: 'Account Status ID',
41
+ name: 'contactStatusId',
42
+ type: 'number',
43
+ default: '',
44
+ description: 'Current status of the account',
45
+ },
46
+ {
47
+ displayName: 'Account Level ID',
48
+ name: 'contactLevelId',
49
+ type: 'number',
50
+ default: '',
51
+ description: 'Level of the account',
52
+ },
53
+ {
54
+ displayName: 'Author ID',
55
+ name: 'authorId',
56
+ type: 'number',
57
+ default: 0,
58
+ description: 'Author who created the account',
59
+ },
60
+ {
61
+ displayName: 'Account Opened',
62
+ name: 'accountOpened',
63
+ type: 'dateTime',
64
+ default: '',
65
+ description: 'Date when the account was opened',
66
+ },
67
+ {
68
+ displayName: 'Account Closed',
69
+ name: 'accountClosed',
70
+ type: 'dateTime',
71
+ default: '',
72
+ description: 'Date when the account was closed',
73
+ },
74
+ {
75
+ displayName: 'Customer Left Reason ID',
76
+ name: 'customerLeftReasonId',
77
+ type: 'number',
78
+ default: '',
79
+ description: 'Reason why the customer left',
80
+ },
81
+ ];
82
+ const BillingAccountOptions = [
83
+ {
84
+ displayName: 'Company Name',
85
+ name: 'organization',
86
+ type: 'string',
87
+ default: '',
88
+ },
89
+ {
90
+ displayName: 'Street',
91
+ name: 'street',
92
+ type: 'string',
93
+ default: '',
94
+ },
95
+ {
96
+ displayName: 'City',
97
+ name: 'city',
98
+ type: 'string',
99
+ default: '',
100
+ },
101
+ {
102
+ displayName: 'Country Code',
103
+ name: 'countryCode',
104
+ type: 'string',
105
+ default: '',
106
+ },
107
+ {
108
+ displayName: 'Country Division',
109
+ name: 'countrySubdivisionCode',
110
+ type: 'string',
111
+ default: '',
112
+ },
113
+ {
114
+ displayName: 'Postal Code',
115
+ name: 'postalCode',
116
+ type: 'string',
117
+ default: '',
118
+ },
119
+ {
120
+ displayName: 'Email',
121
+ name: 'email',
122
+ placeholder: 'name@email.com',
123
+ type: 'string',
124
+ default: '',
125
+ },
126
+ {
127
+ displayName: 'Telephone',
128
+ name: 'phone',
129
+ type: 'string',
130
+ default: '',
131
+ },
132
+ {
133
+ displayName: 'VAT Number',
134
+ name: 'vatNo',
135
+ type: 'string',
136
+ default: '',
137
+ },
138
+ {
139
+ displayName: 'VAT Rate',
140
+ name: 'vatRate',
141
+ type: 'number',
142
+ default: '',
143
+ },
144
+ {
145
+ displayName: 'Bank Account Number',
146
+ name: 'bankAccount',
147
+ type: 'string',
148
+ default: '',
149
+ },
150
+ {
151
+ displayName: 'IBAN',
152
+ name: 'iban',
153
+ type: 'string',
154
+ default: '',
155
+ },
156
+ {
157
+ displayName: 'Variable Symbol',
158
+ name: 'variableSymbol',
159
+ type: 'string',
160
+ default: '',
161
+ },
162
+ {
163
+ displayName: 'SWIFT',
164
+ name: 'swift',
165
+ type: 'string',
166
+ default: '',
167
+ },
168
+ {
169
+ displayName: 'BIC',
170
+ name: 'bic',
171
+ type: 'string',
172
+ default: '',
173
+ },
174
+ ];
175
+ exports.AccountFields = [
176
+ {
177
+ displayName: 'Account ID',
178
+ name: 'id',
179
+ type: 'number',
180
+ displayOptions: {
181
+ show: {
182
+ operation: [
183
+ Model_1.EasyNodeOperationType.getOne,
184
+ Model_1.EasyNodeOperationType.addComment,
185
+ Model_1.EasyNodeOperationType.update,
186
+ ],
187
+ resource: [Model_1.EasyNodeResourceType.accounts],
188
+ },
189
+ },
190
+ default: '',
191
+ },
192
+ {
193
+ displayName: 'Easy8 Accounts Query Name or ID',
194
+ name: 'accountQueryId',
195
+ type: 'options',
196
+ description: 'Choose a query to filter the results. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
197
+ displayOptions: {
198
+ show: {
199
+ resource: [Model_1.EasyNodeResourceType.accounts],
200
+ operation: [Model_1.EasyNodeOperationType.getMany],
201
+ },
202
+ },
203
+ typeOptions: {
204
+ loadOptionsMethod: 'getEasyAccountQueries',
205
+ },
206
+ default: '',
207
+ },
208
+ {
209
+ displayName: 'Create Fields',
210
+ name: 'accountCreateOptions',
211
+ type: 'collection',
212
+ placeholder: 'Add option',
213
+ default: {},
214
+ displayOptions: {
215
+ show: {
216
+ operation: [Model_1.EasyNodeOperationType.create],
217
+ resource: [Model_1.EasyNodeResourceType.accounts],
218
+ },
219
+ },
220
+ options: [...CommonAccountOptions, CustomFields_1.CustomFieldsOption],
221
+ },
222
+ {
223
+ displayName: 'Billing Fields',
224
+ name: 'accountPrimaryBillingCreateOptions',
225
+ type: 'collection',
226
+ placeholder: 'Add option',
227
+ default: {},
228
+ displayOptions: {
229
+ show: {
230
+ operation: [Model_1.EasyNodeOperationType.create],
231
+ resource: [Model_1.EasyNodeResourceType.accounts],
232
+ },
233
+ },
234
+ options: [...BillingAccountOptions],
235
+ },
236
+ {
237
+ displayName: 'Contact Fields',
238
+ name: 'accountContactBillingCreateOptions',
239
+ type: 'collection',
240
+ placeholder: 'Add option',
241
+ default: {},
242
+ displayOptions: {
243
+ show: {
244
+ operation: [Model_1.EasyNodeOperationType.create],
245
+ resource: [Model_1.EasyNodeResourceType.accounts],
246
+ },
247
+ },
248
+ options: [...BillingAccountOptions],
249
+ },
250
+ {
251
+ displayName: 'Update Fields',
252
+ name: 'accountsUpdateOptions',
253
+ type: 'collection',
254
+ placeholder: 'Add option',
255
+ default: {},
256
+ displayOptions: {
257
+ show: {
258
+ operation: [Model_1.EasyNodeOperationType.update],
259
+ resource: [Model_1.EasyNodeResourceType.accounts],
260
+ },
261
+ },
262
+ options: [...CommonAccountOptions, CustomFields_1.CustomFieldsOption],
263
+ },
264
+ {
265
+ displayName: 'Billing Fields',
266
+ name: 'accountPrimaryBillingUpdateOptions',
267
+ type: 'collection',
268
+ placeholder: 'Add option',
269
+ default: {},
270
+ displayOptions: {
271
+ show: {
272
+ operation: [Model_1.EasyNodeOperationType.update],
273
+ resource: [Model_1.EasyNodeResourceType.accounts],
274
+ },
275
+ },
276
+ options: [...BillingAccountOptions],
277
+ },
278
+ {
279
+ displayName: 'Contact Fields',
280
+ name: 'accountContactBillingUpdateOptions',
281
+ type: 'collection',
282
+ placeholder: 'Add option',
283
+ default: {},
284
+ displayOptions: {
285
+ show: {
286
+ operation: [Model_1.EasyNodeOperationType.update],
287
+ resource: [Model_1.EasyNodeResourceType.accounts],
288
+ },
289
+ },
290
+ options: [...BillingAccountOptions],
291
+ },
292
+ ];
293
+ //# sourceMappingURL=AccountFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountFields.js","sourceRoot":"","sources":["../../../../nodes/Easy8/fields/AccountFields.ts"],"names":[],"mappings":";;;AAAA,oCAAuE;AAEvE,iDAAoD;AAEpD,MAAM,oBAAoB,GAAsB;IAC9C;QACE,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ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Q,EAAE,CAAC,4BAAoB,CAAC,QAAQ,CAAC;aAC1C;SACF;QACD,OAAO,EAAE,CAAC,GAAG,oBAAoB,EAAE,iCAAkB,CAAC;KACvD;IAED;QACE,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,oCAAoC;QAC1C,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE,CAAC,6BAAqB,CAAC,MAAM,CAAC;gBACzC,QAAQ,EAAE,CAAC,4BAAoB,CAAC,QAAQ,CAAC;aAC1C;SACF;QACD,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;KACpC;IAED;QACE,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,oCAAoC;QAC1C,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE,CAAC,6BAAqB,CAAC,MAAM,CAAC;gBACzC,QAAQ,EAAE,CAAC,4BAAoB,CAAC,QAAQ,CAAC;aAC1C;SACF;QACD,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;KACpC;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const AttendanceFields: INodeProperties[];
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AttendanceFields = void 0;
4
+ const Model_1 = require("../Model");
5
+ const CommonAttendanceOptions = [
6
+ {
7
+ displayName: 'Departure',
8
+ name: 'departure',
9
+ type: 'dateTime',
10
+ default: '',
11
+ },
12
+ {
13
+ displayName: 'Description',
14
+ name: 'description',
15
+ type: 'string',
16
+ default: '',
17
+ },
18
+ {
19
+ displayName: 'Activity ID',
20
+ name: 'activityId',
21
+ type: 'number',
22
+ default: '',
23
+ },
24
+ ];
25
+ const AttendanceUpdateOptions = [
26
+ {
27
+ displayName: 'Arrival',
28
+ name: 'arrival',
29
+ type: 'dateTime',
30
+ default: '',
31
+ },
32
+ ];
33
+ exports.AttendanceFields = [
34
+ {
35
+ displayName: 'Operation',
36
+ name: 'operation',
37
+ type: 'options',
38
+ noDataExpression: true,
39
+ displayOptions: {
40
+ show: {
41
+ resource: [Model_1.EasyNodeResourceType.attendances],
42
+ },
43
+ },
44
+ default: 'get-many',
45
+ options: [
46
+ {
47
+ name: 'Get One',
48
+ description: 'Get a single attendance entity',
49
+ value: Model_1.EasyNodeOperationType.getOne,
50
+ action: 'Get one',
51
+ },
52
+ {
53
+ name: 'Get Many',
54
+ description: 'Get multiple attendance entities',
55
+ value: Model_1.EasyNodeOperationType.getMany,
56
+ action: 'Get many',
57
+ },
58
+ {
59
+ name: 'Create',
60
+ description: 'Create attendance entity',
61
+ value: Model_1.EasyNodeOperationType.create,
62
+ action: 'Create',
63
+ },
64
+ {
65
+ name: 'Update',
66
+ description: 'Update attendance entity',
67
+ value: Model_1.EasyNodeOperationType.update,
68
+ action: 'Update',
69
+ },
70
+ ],
71
+ },
72
+ {
73
+ displayName: 'Attendance ID',
74
+ name: 'id',
75
+ type: 'number',
76
+ displayOptions: {
77
+ show: {
78
+ operation: [Model_1.EasyNodeOperationType.getOne, Model_1.EasyNodeOperationType.update],
79
+ resource: [Model_1.EasyNodeResourceType.attendances],
80
+ },
81
+ },
82
+ default: '',
83
+ },
84
+ {
85
+ displayName: 'Easy8 Attendances Query Name or ID',
86
+ name: 'attendanceQueryId',
87
+ type: 'options',
88
+ description: 'Choose a query to filter the results. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
89
+ displayOptions: {
90
+ show: {
91
+ resource: [Model_1.EasyNodeResourceType.attendances],
92
+ operation: [Model_1.EasyNodeOperationType.getMany],
93
+ },
94
+ },
95
+ typeOptions: {
96
+ loadOptionsMethod: 'getEasyAttendanceQueries',
97
+ },
98
+ default: '',
99
+ },
100
+ {
101
+ displayName: 'Arrival',
102
+ name: 'arrival',
103
+ type: 'dateTime',
104
+ default: '',
105
+ displayOptions: {
106
+ show: {
107
+ operation: [Model_1.EasyNodeOperationType.create],
108
+ resource: [Model_1.EasyNodeResourceType.attendances],
109
+ },
110
+ },
111
+ },
112
+ {
113
+ displayName: 'Create Fields',
114
+ name: 'attendanceCreateOptions',
115
+ type: 'collection',
116
+ placeholder: 'Add option',
117
+ default: {},
118
+ displayOptions: {
119
+ show: {
120
+ operation: [Model_1.EasyNodeOperationType.create],
121
+ resource: [Model_1.EasyNodeResourceType.attendances],
122
+ },
123
+ },
124
+ options: [...CommonAttendanceOptions],
125
+ },
126
+ {
127
+ displayName: 'Update Fields',
128
+ name: 'attendanceUpdateOptions',
129
+ type: 'collection',
130
+ placeholder: 'Add option',
131
+ default: {},
132
+ displayOptions: {
133
+ show: {
134
+ operation: [Model_1.EasyNodeOperationType.update],
135
+ resource: [Model_1.EasyNodeResourceType.attendances],
136
+ },
137
+ },
138
+ options: [...AttendanceUpdateOptions, ...CommonAttendanceOptions],
139
+ },
140
+ ];
141
+ //# sourceMappingURL=AttendanceFields.js.map