n8n-nodes-smartsuite 2.0.6
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.
- package/LICENSE +21 -0
- package/README.md +163 -0
- package/dist/credentials/SmartSuiteApi.credentials.d.ts +8 -0
- package/dist/credentials/SmartSuiteApi.credentials.js +38 -0
- package/dist/credentials/SmartSuiteApi.credentials.js.map +1 -0
- package/dist/credentials/SmartSuiteApi.svg +6 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/SmartSuite/SmartSuite.node.d.ts +27 -0
- package/dist/nodes/SmartSuite/SmartSuite.node.js +108 -0
- package/dist/nodes/SmartSuite/SmartSuite.node.js.map +1 -0
- package/dist/nodes/SmartSuite/SmartSuite.node.json +48 -0
- package/dist/nodes/SmartSuite/SmartSuiteTrigger.node.d.ts +23 -0
- package/dist/nodes/SmartSuite/SmartSuiteTrigger.node.js +173 -0
- package/dist/nodes/SmartSuite/SmartSuiteTrigger.node.js.map +1 -0
- package/dist/nodes/SmartSuite/SmartSuiteTrigger.node.json +14 -0
- package/dist/nodes/SmartSuite/__tests__/actions/api/makeApiRequest.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/api/makeApiRequest.test.js +74 -0
- package/dist/nodes/SmartSuite/__tests__/actions/api/makeApiRequest.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/orgManagement/getCurrentUser.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/orgManagement/getCurrentUser.test.js +22 -0
- package/dist/nodes/SmartSuite/__tests__/actions/orgManagement/getCurrentUser.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/orgManagement/listMembers.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/orgManagement/listMembers.test.js +70 -0
- package/dist/nodes/SmartSuite/__tests__/actions/orgManagement/listMembers.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/orgManagement/listTeams.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/orgManagement/listTeams.test.js +43 -0
- package/dist/nodes/SmartSuite/__tests__/actions/orgManagement/listTeams.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/createRecord.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/createRecord.test.js +178 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/createRecord.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/deleteRecord.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/deleteRecord.test.js +159 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/deleteRecord.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/getRecord.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/getRecord.test.js +127 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/getRecord.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/listRecord.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/listRecord.test.js +162 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/listRecord.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/searchRecord.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/searchRecord.test.js +210 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/searchRecord.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/updateRecord.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/updateRecord.test.js +198 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/updateRecord.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/upsertRecord.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/upsertRecord.test.js +138 -0
- package/dist/nodes/SmartSuite/__tests__/actions/record/upsertRecord.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/solution/getSolution.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/solution/getSolution.test.js +57 -0
- package/dist/nodes/SmartSuite/__tests__/actions/solution/getSolution.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/solution/listSolution.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/solution/listSolution.test.js +48 -0
- package/dist/nodes/SmartSuite/__tests__/actions/solution/listSolution.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/createTable.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/createTable.test.js +50 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/createTable.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/createTableField.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/createTableField.test.js +93 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/createTableField.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/getTable.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/getTable.test.js +70 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/getTable.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/listTable.test.d.ts +1 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/listTable.test.js +78 -0
- package/dist/nodes/SmartSuite/__tests__/actions/table/listTable.test.js.map +1 -0
- package/dist/nodes/SmartSuite/__tests__/helpers/mockResourceInputs.d.ts +10 -0
- package/dist/nodes/SmartSuite/__tests__/helpers/mockResourceInputs.js +26 -0
- package/dist/nodes/SmartSuite/__tests__/helpers/mockResourceInputs.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/api/ApiRequestDescription.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/api/ApiRequestDescription.js +185 -0
- package/dist/nodes/SmartSuite/actions/api/ApiRequestDescription.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/api/makeApiRequest.operation.d.ts +3 -0
- package/dist/nodes/SmartSuite/actions/api/makeApiRequest.operation.js +65 -0
- package/dist/nodes/SmartSuite/actions/api/makeApiRequest.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/OrgManagementDescription.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/OrgManagementDescription.js +21 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/OrgManagementDescription.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/getCurrentUser.operation.d.ts +18 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/getCurrentUser.operation.js +39 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/getCurrentUser.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/listMembers.operation.d.ts +18 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/listMembers.operation.js +41 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/listMembers.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/listTeams.operation.d.ts +18 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/listTeams.operation.js +41 -0
- package/dist/nodes/SmartSuite/actions/orgManagement/listTeams.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/record/RecordDescription.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/record/RecordDescription.js +370 -0
- package/dist/nodes/SmartSuite/actions/record/RecordDescription.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/record/createRecord.operation.d.ts +87 -0
- package/dist/nodes/SmartSuite/actions/record/createRecord.operation.js +55 -0
- package/dist/nodes/SmartSuite/actions/record/createRecord.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/record/deleteRecord.operation.d.ts +24 -0
- package/dist/nodes/SmartSuite/actions/record/deleteRecord.operation.js +49 -0
- package/dist/nodes/SmartSuite/actions/record/deleteRecord.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/record/getRecord.operation.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/record/getRecord.operation.js +31 -0
- package/dist/nodes/SmartSuite/actions/record/getRecord.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/record/listRecord.operation.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/record/listRecord.operation.js +52 -0
- package/dist/nodes/SmartSuite/actions/record/listRecord.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/record/searchRecord.operation.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/record/searchRecord.operation.js +77 -0
- package/dist/nodes/SmartSuite/actions/record/searchRecord.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/record/updateRecord.operation.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/record/updateRecord.operation.js +42 -0
- package/dist/nodes/SmartSuite/actions/record/updateRecord.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/record/upsertRecord.operation.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/record/upsertRecord.operation.js +66 -0
- package/dist/nodes/SmartSuite/actions/record/upsertRecord.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/solution/SolutionDescription.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/solution/SolutionDescription.js +54 -0
- package/dist/nodes/SmartSuite/actions/solution/SolutionDescription.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/solution/getSolution.operation.d.ts +3 -0
- package/dist/nodes/SmartSuite/actions/solution/getSolution.operation.js +25 -0
- package/dist/nodes/SmartSuite/actions/solution/getSolution.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/solution/listSolution.operation.d.ts +3 -0
- package/dist/nodes/SmartSuite/actions/solution/listSolution.operation.js +54 -0
- package/dist/nodes/SmartSuite/actions/solution/listSolution.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/table/TableDescription.d.ts +6 -0
- package/dist/nodes/SmartSuite/actions/table/TableDescription.js +153 -0
- package/dist/nodes/SmartSuite/actions/table/TableDescription.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/table/createTable.operation.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/table/createTable.operation.js +45 -0
- package/dist/nodes/SmartSuite/actions/table/createTable.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/table/createTableField.operation.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/table/createTableField.operation.js +49 -0
- package/dist/nodes/SmartSuite/actions/table/createTableField.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/table/getTable.operation.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/table/getTable.operation.js +23 -0
- package/dist/nodes/SmartSuite/actions/table/getTable.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/actions/table/listTable.operation.d.ts +2 -0
- package/dist/nodes/SmartSuite/actions/table/listTable.operation.js +42 -0
- package/dist/nodes/SmartSuite/actions/table/listTable.operation.js.map +1 -0
- package/dist/nodes/SmartSuite/helpers/getFilterOptions.d.ts +11 -0
- package/dist/nodes/SmartSuite/helpers/getFilterOptions.js +376 -0
- package/dist/nodes/SmartSuite/helpers/getFilterOptions.js.map +1 -0
- package/dist/nodes/SmartSuite/helpers/getValidFilters.d.ts +6 -0
- package/dist/nodes/SmartSuite/helpers/getValidFilters.js +47 -0
- package/dist/nodes/SmartSuite/helpers/getValidFilters.js.map +1 -0
- package/dist/nodes/SmartSuite/helpers/utils.d.ts +21 -0
- package/dist/nodes/SmartSuite/helpers/utils.js +62 -0
- package/dist/nodes/SmartSuite/helpers/utils.js.map +1 -0
- package/dist/nodes/SmartSuite/helpers/validation.d.ts +9 -0
- package/dist/nodes/SmartSuite/helpers/validation.js +41 -0
- package/dist/nodes/SmartSuite/helpers/validation.js.map +1 -0
- package/dist/nodes/SmartSuite/index.d.ts +2 -0
- package/dist/nodes/SmartSuite/index.js +12 -0
- package/dist/nodes/SmartSuite/index.js.map +1 -0
- package/dist/nodes/SmartSuite/methods/listSearch.d.ts +11 -0
- package/dist/nodes/SmartSuite/methods/listSearch.js +81 -0
- package/dist/nodes/SmartSuite/methods/listSearch.js.map +1 -0
- package/dist/nodes/SmartSuite/methods/loadOptions.d.ts +30 -0
- package/dist/nodes/SmartSuite/methods/loadOptions.js +133 -0
- package/dist/nodes/SmartSuite/methods/loadOptions.js.map +1 -0
- package/dist/nodes/SmartSuite/methods/resourceMapping.d.ts +48 -0
- package/dist/nodes/SmartSuite/methods/resourceMapping.js +122 -0
- package/dist/nodes/SmartSuite/methods/resourceMapping.js.map +1 -0
- package/dist/nodes/SmartSuite/methods/router.d.ts +2 -0
- package/dist/nodes/SmartSuite/methods/router.js +65 -0
- package/dist/nodes/SmartSuite/methods/router.js.map +1 -0
- package/dist/nodes/SmartSuite/shared/__testHelpers__/mockExecuteFunctions.d.ts +9 -0
- package/dist/nodes/SmartSuite/shared/__testHelpers__/mockExecuteFunctions.js +84 -0
- package/dist/nodes/SmartSuite/shared/__testHelpers__/mockExecuteFunctions.js.map +1 -0
- package/dist/nodes/SmartSuite/shared/resourceInputs.d.ts +15 -0
- package/dist/nodes/SmartSuite/shared/resourceInputs.js +112 -0
- package/dist/nodes/SmartSuite/shared/resourceInputs.js.map +1 -0
- package/dist/nodes/SmartSuite/smartsuite.svg +6 -0
- package/dist/nodes/SmartSuite/transport/smartSuiteApi.d.ts +12 -0
- package/dist/nodes/SmartSuite/transport/smartSuiteApi.js +111 -0
- package/dist/nodes/SmartSuite/transport/smartSuiteApi.js.map +1 -0
- package/dist/nodes/SmartSuite/types.d.ts +11 -0
- package/dist/nodes/SmartSuite/types.js +4 -0
- package/dist/nodes/SmartSuite/types.js.map +1 -0
- package/package.json +99 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// src/nodes/SmartSuite/helpers/getFilterOptions.ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.filterOptionsByFieldType = void 0;
|
|
5
|
+
exports.getFilterOptionsForFieldType = getFilterOptionsForFieldType;
|
|
6
|
+
/**
|
|
7
|
+
* A lookup table of valid comparison operators for each SmartSuite field type,
|
|
8
|
+
* sourced directly from your "Field Type–Operators Across" spreadsheet.
|
|
9
|
+
*/
|
|
10
|
+
exports.filterOptionsByFieldType = {
|
|
11
|
+
textfield: [
|
|
12
|
+
'is',
|
|
13
|
+
'is_not',
|
|
14
|
+
'is_empty',
|
|
15
|
+
'is_not_empty',
|
|
16
|
+
'contains',
|
|
17
|
+
'not_contains',
|
|
18
|
+
],
|
|
19
|
+
addressfield: [
|
|
20
|
+
'is',
|
|
21
|
+
'is_not',
|
|
22
|
+
'is_empty',
|
|
23
|
+
'is_not_empty',
|
|
24
|
+
'contains',
|
|
25
|
+
'not_contains',
|
|
26
|
+
],
|
|
27
|
+
checklistfield: [
|
|
28
|
+
'is_empty',
|
|
29
|
+
'is_not_empty',
|
|
30
|
+
],
|
|
31
|
+
colorpickerfield: [
|
|
32
|
+
'is',
|
|
33
|
+
'is_not',
|
|
34
|
+
'is_empty',
|
|
35
|
+
'is_not_empty',
|
|
36
|
+
'contains',
|
|
37
|
+
'not_contains',
|
|
38
|
+
],
|
|
39
|
+
emailfield: [
|
|
40
|
+
'is',
|
|
41
|
+
'is_not',
|
|
42
|
+
'is_empty',
|
|
43
|
+
'is_not_empty',
|
|
44
|
+
'contains',
|
|
45
|
+
'not_contains',
|
|
46
|
+
],
|
|
47
|
+
fullnamefield: [
|
|
48
|
+
'is',
|
|
49
|
+
'is_not',
|
|
50
|
+
'is_empty',
|
|
51
|
+
'is_not_empty',
|
|
52
|
+
'contains',
|
|
53
|
+
'not_contains',
|
|
54
|
+
],
|
|
55
|
+
ipaddressfield: [
|
|
56
|
+
'is',
|
|
57
|
+
'is_not',
|
|
58
|
+
'is_empty',
|
|
59
|
+
'is_not_empty',
|
|
60
|
+
'contains',
|
|
61
|
+
'not_contains',
|
|
62
|
+
],
|
|
63
|
+
linkfield: [
|
|
64
|
+
'is',
|
|
65
|
+
'is_not',
|
|
66
|
+
'is_empty',
|
|
67
|
+
'is_not_empty',
|
|
68
|
+
'contains',
|
|
69
|
+
'not_contains',
|
|
70
|
+
],
|
|
71
|
+
phonefield: [
|
|
72
|
+
'is',
|
|
73
|
+
'is_not',
|
|
74
|
+
'is_empty',
|
|
75
|
+
'is_not_empty',
|
|
76
|
+
'contains',
|
|
77
|
+
'not_contains',
|
|
78
|
+
],
|
|
79
|
+
recordtitlefield: [
|
|
80
|
+
'is',
|
|
81
|
+
'is_not',
|
|
82
|
+
'is_empty',
|
|
83
|
+
'is_not_empty',
|
|
84
|
+
'contains',
|
|
85
|
+
'not_contains',
|
|
86
|
+
],
|
|
87
|
+
richtextareafield: [
|
|
88
|
+
'is_empty',
|
|
89
|
+
'is_not_empty',
|
|
90
|
+
],
|
|
91
|
+
socialnetworkfield: [
|
|
92
|
+
'is',
|
|
93
|
+
'is_not',
|
|
94
|
+
'is_empty',
|
|
95
|
+
'is_not_empty',
|
|
96
|
+
'contains',
|
|
97
|
+
'not_contains',
|
|
98
|
+
],
|
|
99
|
+
textareafield: [
|
|
100
|
+
'is',
|
|
101
|
+
'is_not',
|
|
102
|
+
'is_empty',
|
|
103
|
+
'is_not_empty',
|
|
104
|
+
'contains',
|
|
105
|
+
'not_contains',
|
|
106
|
+
],
|
|
107
|
+
currencyfield: [
|
|
108
|
+
'is_empty',
|
|
109
|
+
'is_not_empty',
|
|
110
|
+
'is_equal_to',
|
|
111
|
+
'is_not_equal_to',
|
|
112
|
+
'is_greater_than',
|
|
113
|
+
'is_less_than',
|
|
114
|
+
'is_equal_or_greater_than',
|
|
115
|
+
'is_equal_or_less_than',
|
|
116
|
+
],
|
|
117
|
+
numberfield: [
|
|
118
|
+
'is_empty',
|
|
119
|
+
'is_not_empty',
|
|
120
|
+
'is_equal_to',
|
|
121
|
+
'is_not_equal_to',
|
|
122
|
+
'is_greater_than',
|
|
123
|
+
'is_less_than',
|
|
124
|
+
'is_equal_or_greater_than',
|
|
125
|
+
'is_equal_or_less_than',
|
|
126
|
+
],
|
|
127
|
+
numbersliderfield: [
|
|
128
|
+
'is_empty',
|
|
129
|
+
'is_not_empty',
|
|
130
|
+
'is_equal_to',
|
|
131
|
+
'is_not_equal_to',
|
|
132
|
+
'is_greater_than',
|
|
133
|
+
'is_less_than',
|
|
134
|
+
'is_equal_or_greater_than',
|
|
135
|
+
'is_equal_or_less_than',
|
|
136
|
+
],
|
|
137
|
+
percentcompletefield: [
|
|
138
|
+
'is_empty',
|
|
139
|
+
'is_not_empty',
|
|
140
|
+
'is_equal_to',
|
|
141
|
+
'is_not_equal_to',
|
|
142
|
+
'is_greater_than',
|
|
143
|
+
'is_less_than',
|
|
144
|
+
'is_equal_or_greater_than',
|
|
145
|
+
'is_equal_or_less_than',
|
|
146
|
+
],
|
|
147
|
+
percentfield: [
|
|
148
|
+
'is_empty',
|
|
149
|
+
'is_not_empty',
|
|
150
|
+
'is_equal_to',
|
|
151
|
+
'is_not_equal_to',
|
|
152
|
+
'is_greater_than',
|
|
153
|
+
'is_less_than',
|
|
154
|
+
'is_equal_or_greater_than',
|
|
155
|
+
'is_equal_or_less_than',
|
|
156
|
+
],
|
|
157
|
+
ratingfield: [
|
|
158
|
+
'is_empty',
|
|
159
|
+
'is_not_empty',
|
|
160
|
+
'is_equal_to',
|
|
161
|
+
'is_not_equal_to',
|
|
162
|
+
'is_greater_than',
|
|
163
|
+
'is_less_than',
|
|
164
|
+
'is_equal_or_greater_than',
|
|
165
|
+
'is_equal_or_less_than',
|
|
166
|
+
],
|
|
167
|
+
votefield: [
|
|
168
|
+
'is_empty',
|
|
169
|
+
'is_not_empty',
|
|
170
|
+
'is_equal_to',
|
|
171
|
+
'is_not_equal_to',
|
|
172
|
+
'is_greater_than',
|
|
173
|
+
'is_less_than',
|
|
174
|
+
'is_equal_or_greater_than',
|
|
175
|
+
'is_equal_or_less_than',
|
|
176
|
+
],
|
|
177
|
+
countfield: [
|
|
178
|
+
'is_empty',
|
|
179
|
+
'is_not_empty',
|
|
180
|
+
'is_equal_to',
|
|
181
|
+
'is_not_equal_to',
|
|
182
|
+
'is_greater_than',
|
|
183
|
+
'is_less_than',
|
|
184
|
+
'is_equal_or_greater_than',
|
|
185
|
+
'is_equal_or_less_than',
|
|
186
|
+
],
|
|
187
|
+
singleselectfield: [
|
|
188
|
+
'is',
|
|
189
|
+
'is_not',
|
|
190
|
+
'is_empty',
|
|
191
|
+
'is_not_empty',
|
|
192
|
+
'is_any_of',
|
|
193
|
+
'is_none_of',
|
|
194
|
+
],
|
|
195
|
+
multipleselectfield: [
|
|
196
|
+
'is_empty',
|
|
197
|
+
'is_not_empty',
|
|
198
|
+
'has_any_of',
|
|
199
|
+
'has_all_of',
|
|
200
|
+
'is_exactly',
|
|
201
|
+
'has_none_of',
|
|
202
|
+
],
|
|
203
|
+
statusfield: [
|
|
204
|
+
'is',
|
|
205
|
+
'is_not',
|
|
206
|
+
'is_empty',
|
|
207
|
+
'is_not_empty',
|
|
208
|
+
'is_any_of',
|
|
209
|
+
'is_none_of',
|
|
210
|
+
],
|
|
211
|
+
tagsfield: [
|
|
212
|
+
'is_empty',
|
|
213
|
+
'is_not_empty',
|
|
214
|
+
'has_any_of',
|
|
215
|
+
'has_all_of',
|
|
216
|
+
'is_exactly',
|
|
217
|
+
'has_none_of',
|
|
218
|
+
],
|
|
219
|
+
yesnofield: [
|
|
220
|
+
'is',
|
|
221
|
+
],
|
|
222
|
+
datefield: [
|
|
223
|
+
'is',
|
|
224
|
+
'is_not',
|
|
225
|
+
'is_empty',
|
|
226
|
+
'is_not_empty',
|
|
227
|
+
'is_before',
|
|
228
|
+
'is_on_or_before',
|
|
229
|
+
'is_on_or_after',
|
|
230
|
+
],
|
|
231
|
+
daterangefield: [
|
|
232
|
+
'is',
|
|
233
|
+
'is_not',
|
|
234
|
+
'is_empty',
|
|
235
|
+
'is_not_empty',
|
|
236
|
+
'is_before',
|
|
237
|
+
'is_on_or_before',
|
|
238
|
+
'is_on_or_after',
|
|
239
|
+
],
|
|
240
|
+
duedatefield: [
|
|
241
|
+
'is',
|
|
242
|
+
'is_not',
|
|
243
|
+
'is_empty',
|
|
244
|
+
'is_not_empty',
|
|
245
|
+
'is_before',
|
|
246
|
+
'is_on_or_before',
|
|
247
|
+
'is_on_or_after',
|
|
248
|
+
'is_overdue',
|
|
249
|
+
'is_not_overdue',
|
|
250
|
+
],
|
|
251
|
+
durationfield: [
|
|
252
|
+
'is_empty',
|
|
253
|
+
'is_not_empty',
|
|
254
|
+
'is_equal_to',
|
|
255
|
+
'is_not_equal_to',
|
|
256
|
+
'is_greater_than',
|
|
257
|
+
'is_less_than',
|
|
258
|
+
'is_equal_or_greater_than',
|
|
259
|
+
'is_equal_or_less_than',
|
|
260
|
+
],
|
|
261
|
+
timefield: [
|
|
262
|
+
'is_empty',
|
|
263
|
+
'is_not_empty',
|
|
264
|
+
'is_equal_to',
|
|
265
|
+
'is_not_equal_to',
|
|
266
|
+
'is_greater_than',
|
|
267
|
+
'is_less_than',
|
|
268
|
+
'is_equal_or_greater_than',
|
|
269
|
+
'is_equal_or_less_than',
|
|
270
|
+
],
|
|
271
|
+
timetrackingfield: [
|
|
272
|
+
'is_empty',
|
|
273
|
+
'is_not_empty',
|
|
274
|
+
'is_equal_to',
|
|
275
|
+
'is_not_equal_to',
|
|
276
|
+
'is_greater_than',
|
|
277
|
+
'is_less_than',
|
|
278
|
+
'is_equal_or_greater_than',
|
|
279
|
+
'is_equal_or_less_than',
|
|
280
|
+
],
|
|
281
|
+
rollupfield: [
|
|
282
|
+
'is_empty',
|
|
283
|
+
'is_not_empty',
|
|
284
|
+
'is_equal_to',
|
|
285
|
+
'is_not_equal_to',
|
|
286
|
+
'is_greater_than',
|
|
287
|
+
'is_less_than',
|
|
288
|
+
'is_equal_or_greater_than',
|
|
289
|
+
'is_equal_or_less_than',
|
|
290
|
+
],
|
|
291
|
+
filefield: [
|
|
292
|
+
'is_empty',
|
|
293
|
+
'is_not_empty',
|
|
294
|
+
'file_name_contains',
|
|
295
|
+
'file_type_is',
|
|
296
|
+
],
|
|
297
|
+
signaturefield: [
|
|
298
|
+
'is_empty',
|
|
299
|
+
'is_not_empty',
|
|
300
|
+
],
|
|
301
|
+
recordidfield: [
|
|
302
|
+
'is',
|
|
303
|
+
'is_not',
|
|
304
|
+
'contains',
|
|
305
|
+
'not_contains',
|
|
306
|
+
],
|
|
307
|
+
firstcreatedfield: [
|
|
308
|
+
'is',
|
|
309
|
+
'is_not',
|
|
310
|
+
'contains',
|
|
311
|
+
'is_before',
|
|
312
|
+
'is_on_or_before',
|
|
313
|
+
'is_on_or_after',
|
|
314
|
+
],
|
|
315
|
+
lastupdatedfield: [
|
|
316
|
+
'is',
|
|
317
|
+
'is_not',
|
|
318
|
+
'contains',
|
|
319
|
+
'is_before',
|
|
320
|
+
'is_on_or_before',
|
|
321
|
+
'is_on_or_after',
|
|
322
|
+
],
|
|
323
|
+
commentscountfield: [
|
|
324
|
+
'is_empty',
|
|
325
|
+
'is_not_empty',
|
|
326
|
+
'is_equal_to',
|
|
327
|
+
'is_not_equal_to',
|
|
328
|
+
'is_greater_than',
|
|
329
|
+
'is_less_than',
|
|
330
|
+
'is_equal_or_greater_than',
|
|
331
|
+
'is_equal_or_less_than',
|
|
332
|
+
],
|
|
333
|
+
linkedrecordfield: [
|
|
334
|
+
'is_empty',
|
|
335
|
+
'is_not_empty',
|
|
336
|
+
'contains',
|
|
337
|
+
'not_contains',
|
|
338
|
+
'has_any_of',
|
|
339
|
+
'has_all_of',
|
|
340
|
+
'is_exactly',
|
|
341
|
+
'has_none_of',
|
|
342
|
+
],
|
|
343
|
+
userfield: [
|
|
344
|
+
'is_empty',
|
|
345
|
+
'is_not_empty',
|
|
346
|
+
'has_any_of',
|
|
347
|
+
'has_all_of',
|
|
348
|
+
'is_exactly',
|
|
349
|
+
'has_none_of',
|
|
350
|
+
],
|
|
351
|
+
autonumberfield: [
|
|
352
|
+
'is_equal_to',
|
|
353
|
+
'is_not_equal_to',
|
|
354
|
+
'is_greater_than',
|
|
355
|
+
'is_less_than',
|
|
356
|
+
'is_equal_or_greater_than',
|
|
357
|
+
'is_equal_or_less_than',
|
|
358
|
+
],
|
|
359
|
+
subitemsfield: [
|
|
360
|
+
'is_equal_to',
|
|
361
|
+
'is_not_equal_to',
|
|
362
|
+
'is_greater_than',
|
|
363
|
+
'is_less_than',
|
|
364
|
+
'is_equal_or_greater_than',
|
|
365
|
+
'is_equal_or_less_than',
|
|
366
|
+
],
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* Returns the list of valid filter comparison operators
|
|
370
|
+
* for a given SmartSuite field type.
|
|
371
|
+
* If the type is unknown, returns an empty array.
|
|
372
|
+
*/
|
|
373
|
+
function getFilterOptionsForFieldType(fieldType) {
|
|
374
|
+
return exports.filterOptionsByFieldType[fieldType] ?? [];
|
|
375
|
+
}
|
|
376
|
+
//# sourceMappingURL=getFilterOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFilterOptions.js","sourceRoot":"","sources":["../../../../src/nodes/SmartSuite/helpers/getFilterOptions.ts"],"names":[],"mappings":";AAAA,mDAAmD;;;AAkXnD,oEAEC;AAlXD;;;GAGG;AACU,QAAA,wBAAwB,GAA6B;IAChE,SAAS,EAAE;QACT,IAAI;QACJ,QAAQ;QACR,UAAU;QACV,cAAc;QACd,UAAU;QACV,cAAc;KACf;IACD,YAAY,EAAE;QACZ,IAAI;QACJ,QAAQ;QACR,UAAU;QACV,cAAc;QACd,UAAU;QACV,cAAc;KACf;IACD,cAAc,EAAE;QACd,UAAU;QACV,cAAc;KACf;IACD,gBAAgB,EAAE;QAChB,IAAI;QACJ,QAAQ;QACR,UAAU;QACV,cAAc;QACd,UAAU;QACV,cAAc;KACf;IACD,UAAU,EAAE;QACV,IAAI;QACJ,QAAQ;QACR,UAAU;QACV,cAAc;QACd,UAAU;QACV,cAAc;KACf;IACD,aAAa,EAAE;QACb,IAAI;QACJ,QAAQ;QACR,UAAU;QACV,cAAc;QACd,UAAU;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,iBAAiB;QACjB,iBAAiB;QACjB,cAAc;QACd,0BAA0B;QAC1B,uBAAuB;KACxB;CACF,CAAC;AAEF;;;;GAIG;AACH,SAAgB,4BAA4B,CAAC,SAAiB;IAC5D,OAAO,gCAAwB,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
/**
|
|
3
|
+
* Return the full list of all supported filter operators,
|
|
4
|
+
* each with a subtitle‐style description for the dropdown.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getAllFilterConditions(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// src/nodes/SmartSuite/helpers/getValidFilters.ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getAllFilterConditions = getAllFilterConditions;
|
|
5
|
+
/**
|
|
6
|
+
* Return the full list of all supported filter operators,
|
|
7
|
+
* each with a subtitle‐style description for the dropdown.
|
|
8
|
+
*/
|
|
9
|
+
async function getAllFilterConditions() {
|
|
10
|
+
const ops = [
|
|
11
|
+
['contains', 'String contains the value (most fields)'],
|
|
12
|
+
['not_contains', 'String does not contains value (most fields)'],
|
|
13
|
+
['is', 'Equal to date (date fields)'],
|
|
14
|
+
['is_not', 'Not equal to date (date fields)'],
|
|
15
|
+
['is_empty', 'Field has no value (most fields)'],
|
|
16
|
+
['is_not_empty', 'Field has some value (most fields)'],
|
|
17
|
+
['has_all_of', 'Arrays, multiple select, linked record'],
|
|
18
|
+
['has_any_of', 'Arrays, multiple select, linked record'],
|
|
19
|
+
['has_none_of', 'Multiple select, linked record'],
|
|
20
|
+
['is_any_of', 'Status & single select'],
|
|
21
|
+
['is_before', 'Before date (date fields)'],
|
|
22
|
+
['is_equal_or_greater_than', 'Numeric field'],
|
|
23
|
+
['is_equal_or_less_than', 'Numeric field'],
|
|
24
|
+
['is_equal_to', 'Numeric field'],
|
|
25
|
+
['is_exactly', 'Multiple select, linked record'],
|
|
26
|
+
['is_greater_than', 'Numeric field'],
|
|
27
|
+
['is_less_than', 'Numeric field'],
|
|
28
|
+
['is_not_equal_to', 'Numeric field'],
|
|
29
|
+
['is_not_overdue', 'Due date'],
|
|
30
|
+
['is_none_of', 'Status & single select'],
|
|
31
|
+
['is_on_or_after', 'Date field'],
|
|
32
|
+
['is_on_or_before', 'Date field'],
|
|
33
|
+
['is_overdue', 'Due date'],
|
|
34
|
+
['file_name_contains', 'Files & Images'],
|
|
35
|
+
['file_type_is', 'Files & Images'],
|
|
36
|
+
];
|
|
37
|
+
return ops.map(([value, description]) => ({
|
|
38
|
+
name: value
|
|
39
|
+
.split('_')
|
|
40
|
+
.map((w) => w[0].toUpperCase() + w.slice(1))
|
|
41
|
+
.join(' '),
|
|
42
|
+
value,
|
|
43
|
+
description,
|
|
44
|
+
default: value,
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=getValidFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getValidFilters.js","sourceRoot":"","sources":["../../../../src/nodes/SmartSuite/helpers/getValidFilters.ts"],"names":[],"mappings":";AAAA,kDAAkD;;AAQlD,wDAwCC;AA5CD;;;GAGG;AACI,KAAK,UAAU,sBAAsB;IAG1C,MAAM,GAAG,GAA4B;QACnC,CAAC,UAAU,EAAc,yCAAyC,CAAC;QACnE,CAAC,cAAc,EAAU,8CAA8C,CAAC;QACxE,CAAC,IAAI,EAAoB,6BAA6B,CAAC;QACvD,CAAC,QAAQ,EAAgB,iCAAiC,CAAC;QAC3D,CAAC,UAAU,EAAc,kCAAkC,CAAC;QAC5D,CAAC,cAAc,EAAU,oCAAoC,CAAC;QAC9D,CAAC,YAAY,EAAY,wCAAwC,CAAC;QAClE,CAAC,YAAY,EAAY,wCAAwC,CAAC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
|
+
export declare function asIdString(input: unknown): string;
|
|
6
|
+
/**
|
|
7
|
+
* Debug logger (gated by SMARTSUITE_DEBUG / SMARTSUITE_DEBUG_LEVEL).
|
|
8
|
+
*/
|
|
9
|
+
export declare function debugLog(msg: string, data?: unknown, level?: number): void;
|
|
10
|
+
/**
|
|
11
|
+
* Validate a resourceLocator (list/id): throw NodeOperationError if missing or invalid.
|
|
12
|
+
*/
|
|
13
|
+
export declare function requireParam(this: IExecuteFunctions, paramName: string, label: string, itemIndex?: number, pattern?: RegExp, patternMessage?: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Fields that SmartSuite manages internally (cannot be set via API).
|
|
16
|
+
*/
|
|
17
|
+
export declare const RESERVED_FIELDS: readonly ["autonumber", "count", "first_created", "formula", "last_updated", "record_id", "rollup", "vote"];
|
|
18
|
+
/**
|
|
19
|
+
* Test whether a field-slug is one of those reserved.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isReservedField(slug: string): boolean;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// src/nodes/SmartSuite/helpers/utils.ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RESERVED_FIELDS = void 0;
|
|
5
|
+
exports.asIdString = asIdString;
|
|
6
|
+
exports.debugLog = debugLog;
|
|
7
|
+
exports.requireParam = requireParam;
|
|
8
|
+
exports.isReservedField = isReservedField;
|
|
9
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
10
|
+
/**
|
|
11
|
+
* Flattens an n8n “resourceLocator” value into its raw ID string.
|
|
12
|
+
*/
|
|
13
|
+
function asIdString(input) {
|
|
14
|
+
if (typeof input === 'object' && input !== null && 'value' in input) {
|
|
15
|
+
return input.value;
|
|
16
|
+
}
|
|
17
|
+
return String(input ?? '');
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Debug logger (gated by SMARTSUITE_DEBUG / SMARTSUITE_DEBUG_LEVEL).
|
|
21
|
+
*/
|
|
22
|
+
function debugLog(msg, data, level = 1) {
|
|
23
|
+
const envDebug = process.env.SMARTSUITE_DEBUG?.toLowerCase() === 'true';
|
|
24
|
+
const envLevel = parseInt(process.env.SMARTSUITE_DEBUG_LEVEL || '1', 10);
|
|
25
|
+
if (!envDebug || envLevel < level)
|
|
26
|
+
return;
|
|
27
|
+
console.log('[SmartSuite DEBUG]', msg, ...(data !== undefined ? [data] : []));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Validate a resourceLocator (list/id): throw NodeOperationError if missing or invalid.
|
|
31
|
+
*/
|
|
32
|
+
function requireParam(paramName, label, itemIndex = 0, pattern, patternMessage) {
|
|
33
|
+
const raw = this.getNodeParameter(paramName, itemIndex);
|
|
34
|
+
const id = asIdString(raw);
|
|
35
|
+
if (!id) {
|
|
36
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `${label} must be selected.`, { itemIndex });
|
|
37
|
+
}
|
|
38
|
+
if (pattern && !pattern.test(id)) {
|
|
39
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), patternMessage ?? `${label} must be valid.`, { itemIndex });
|
|
40
|
+
}
|
|
41
|
+
return id;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Fields that SmartSuite manages internally (cannot be set via API).
|
|
45
|
+
*/
|
|
46
|
+
exports.RESERVED_FIELDS = [
|
|
47
|
+
'autonumber',
|
|
48
|
+
'count',
|
|
49
|
+
'first_created',
|
|
50
|
+
'formula',
|
|
51
|
+
'last_updated',
|
|
52
|
+
'record_id',
|
|
53
|
+
'rollup',
|
|
54
|
+
'vote',
|
|
55
|
+
];
|
|
56
|
+
/**
|
|
57
|
+
* Test whether a field-slug is one of those reserved.
|
|
58
|
+
*/
|
|
59
|
+
function isReservedField(slug) {
|
|
60
|
+
return exports.RESERVED_FIELDS.includes(slug);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|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AC;QACR,MAAM,IAAI,iCAAkB,CAC1B,IAAI,CAAC,OAAO,EAAE,EACd,GAAG,KAAK,oBAAoB,EAC5B,EAAE,SAAS,EAAE,CACd,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,iCAAkB,CAC1B,IAAI,CAAC,OAAO,EAAE,EACd,cAAc,IAAI,GAAG,KAAK,iBAAiB,EAC3C,EAAE,SAAS,EAAE,CACd,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;GAEG;AACU,QAAA,eAAe,GAAG;IAC7B,YAAY;IACZ,OAAO;IACP,eAAe;IACf,SAAS;IACT,cAAc;IACd,WAAW;IACX,QAAQ;IACR,MAAM;CACE,CAAC;AAEX;;GAEG;AACH,SAAgB,eAAe,CAAC,IAAY;IAC1C,OAAQ,uBAAqC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
/**
|
|
3
|
+
* Ensures solutionId is present, then verifies it exists.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getSolutionId(this: IExecuteFunctions, itemIndex?: number): Promise<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Ensures tableId is present, then verifies it exists.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getTableId(this: IExecuteFunctions, itemIndex?: number): Promise<string>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// src/nodes/SmartSuite/helpers/validation.ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getSolutionId = getSolutionId;
|
|
5
|
+
exports.getTableId = getTableId;
|
|
6
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
7
|
+
const utils_1 = require("./utils");
|
|
8
|
+
const smartSuiteApi_1 = require("../transport/smartSuiteApi");
|
|
9
|
+
/**
|
|
10
|
+
* Ensures solutionId is present, then verifies it exists.
|
|
11
|
+
*/
|
|
12
|
+
async function getSolutionId(itemIndex = 0) {
|
|
13
|
+
const id = utils_1.requireParam.call(this, 'solutionId', 'Solution', itemIndex);
|
|
14
|
+
try {
|
|
15
|
+
await smartSuiteApi_1.apiRequest.call(this, 'GET', `/solutions/${id}/`);
|
|
16
|
+
}
|
|
17
|
+
catch (err) {
|
|
18
|
+
if (err.message.includes('404')) {
|
|
19
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Solution not found for ID "${id}".`, { itemIndex });
|
|
20
|
+
}
|
|
21
|
+
throw err;
|
|
22
|
+
}
|
|
23
|
+
return id;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Ensures tableId is present, then verifies it exists.
|
|
27
|
+
*/
|
|
28
|
+
async function getTableId(itemIndex = 0) {
|
|
29
|
+
const id = utils_1.requireParam.call(this, 'tableId', 'Table', itemIndex);
|
|
30
|
+
try {
|
|
31
|
+
await smartSuiteApi_1.apiRequest.call(this, 'GET', `/applications/${id}`);
|
|
32
|
+
}
|
|
33
|
+
catch (err) {
|
|
34
|
+
if (err.message.includes('404')) {
|
|
35
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Table not found for ID "${id}".`, { itemIndex });
|
|
36
|
+
}
|
|
37
|
+
throw err;
|
|
38
|
+
}
|
|
39
|
+
return id;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../src/nodes/SmartSuite/helpers/validation.ts"],"names":[],"mappings":";AAAA,6CAA6C;;AAU7C,sCAkBC;AAKD,gCAkBC;AAhDD,+CAAkD;AAClD,mCAAuC;AACvC,8DAAwD;AAExD;;GAEG;AACI,KAAK,UAAU,aAAa,CAEjC,SAAS,GAA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= (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.triggerClass = exports.nodeClass = void 0;
|
|
8
|
+
var SmartSuite_node_1 = require("./SmartSuite.node");
|
|
9
|
+
Object.defineProperty(exports, "nodeClass", { enumerable: true, get: function () { return __importDefault(SmartSuite_node_1).default; } });
|
|
10
|
+
var SmartSuiteTrigger_node_1 = require("./SmartSuiteTrigger.node");
|
|
11
|
+
Object.defineProperty(exports, "triggerClass", { enumerable: true, get: function () { return __importDefault(SmartSuiteTrigger_node_1).default; } });
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nodes/SmartSuite/index.ts"],"names":[],"mappings":";AAAA,gCAAgC;;;;;;AAEhC,qDAA4D;AAAnD,6HAAA,OAAO,OAAa;AAC7B,mEAAmE;AAA1D,uIAAA,OAAO,OAAgB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
|
|
2
|
+
export declare const solutionSearch: (this: ILoadOptionsFunctions, filter?: string) => Promise<INodeListSearchResult>;
|
|
3
|
+
export declare const tableSearch: (this: ILoadOptionsFunctions, filter?: string) => Promise<INodeListSearchResult>;
|
|
4
|
+
export declare const searchTableFields: (this: ILoadOptionsFunctions, filter?: string) => Promise<INodeListSearchResult>;
|
|
5
|
+
export declare const searchTableFieldsMutable: (this: ILoadOptionsFunctions, filter?: string) => Promise<INodeListSearchResult>;
|
|
6
|
+
export declare const listSearch: {
|
|
7
|
+
solutionSearch: (this: ILoadOptionsFunctions, filter?: string) => Promise<INodeListSearchResult>;
|
|
8
|
+
tableSearch: (this: ILoadOptionsFunctions, filter?: string) => Promise<INodeListSearchResult>;
|
|
9
|
+
searchTableFields: (this: ILoadOptionsFunctions, filter?: string) => Promise<INodeListSearchResult>;
|
|
10
|
+
searchTableFieldsMutable: (this: ILoadOptionsFunctions, filter?: string) => Promise<INodeListSearchResult>;
|
|
11
|
+
};
|