n8n-nodes-segment 1.0.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.
- package/LICENSE +46 -0
- package/README.md +419 -0
- package/dist/credentials/SegmentApi.credentials.d.ts +10 -0
- package/dist/credentials/SegmentApi.credentials.d.ts.map +1 -0
- package/dist/credentials/SegmentApi.credentials.js +88 -0
- package/dist/credentials/SegmentApi.credentials.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/Segment/Segment.node.d.ts +6 -0
- package/dist/nodes/Segment/Segment.node.d.ts.map +1 -0
- package/dist/nodes/Segment/Segment.node.js +283 -0
- package/dist/nodes/Segment/Segment.node.js.map +1 -0
- package/dist/nodes/Segment/SegmentTrigger.node.d.ts +6 -0
- package/dist/nodes/Segment/SegmentTrigger.node.d.ts.map +1 -0
- package/dist/nodes/Segment/SegmentTrigger.node.js +257 -0
- package/dist/nodes/Segment/SegmentTrigger.node.js.map +1 -0
- package/dist/nodes/Segment/actions/audiences/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/audiences/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/audiences/index.js +304 -0
- package/dist/nodes/Segment/actions/audiences/index.js.map +1 -0
- package/dist/nodes/Segment/actions/auditTrail/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/auditTrail/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/auditTrail/index.js +192 -0
- package/dist/nodes/Segment/actions/auditTrail/index.js.map +1 -0
- package/dist/nodes/Segment/actions/catalog/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/catalog/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/catalog/index.js +144 -0
- package/dist/nodes/Segment/actions/catalog/index.js.map +1 -0
- package/dist/nodes/Segment/actions/computedTraits/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/computedTraits/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/computedTraits/index.js +257 -0
- package/dist/nodes/Segment/actions/computedTraits/index.js.map +1 -0
- package/dist/nodes/Segment/actions/destinations/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/destinations/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/destinations/index.js +297 -0
- package/dist/nodes/Segment/actions/destinations/index.js.map +1 -0
- package/dist/nodes/Segment/actions/functions/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/functions/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/functions/index.js +389 -0
- package/dist/nodes/Segment/actions/functions/index.js.map +1 -0
- package/dist/nodes/Segment/actions/labels/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/labels/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/labels/index.js +221 -0
- package/dist/nodes/Segment/actions/labels/index.js.map +1 -0
- package/dist/nodes/Segment/actions/regulations/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/regulations/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/regulations/index.js +322 -0
- package/dist/nodes/Segment/actions/regulations/index.js.map +1 -0
- package/dist/nodes/Segment/actions/sources/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/sources/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/sources/index.js +371 -0
- package/dist/nodes/Segment/actions/sources/index.js.map +1 -0
- package/dist/nodes/Segment/actions/spaces/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/spaces/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/spaces/index.js +328 -0
- package/dist/nodes/Segment/actions/spaces/index.js.map +1 -0
- package/dist/nodes/Segment/actions/track/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/track/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/track/index.js +499 -0
- package/dist/nodes/Segment/actions/track/index.js.map +1 -0
- package/dist/nodes/Segment/actions/trackingPlans/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/trackingPlans/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/trackingPlans/index.js +340 -0
- package/dist/nodes/Segment/actions/trackingPlans/index.js.map +1 -0
- package/dist/nodes/Segment/actions/transformations/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/transformations/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/transformations/index.js +280 -0
- package/dist/nodes/Segment/actions/transformations/index.js.map +1 -0
- package/dist/nodes/Segment/actions/users/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/users/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/users/index.js +233 -0
- package/dist/nodes/Segment/actions/users/index.js.map +1 -0
- package/dist/nodes/Segment/actions/warehouses/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/warehouses/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/warehouses/index.js +313 -0
- package/dist/nodes/Segment/actions/warehouses/index.js.map +1 -0
- package/dist/nodes/Segment/actions/workspace/index.d.ts +5 -0
- package/dist/nodes/Segment/actions/workspace/index.d.ts.map +1 -0
- package/dist/nodes/Segment/actions/workspace/index.js +100 -0
- package/dist/nodes/Segment/actions/workspace/index.js.map +1 -0
- package/dist/nodes/Segment/constants/index.d.ts +23 -0
- package/dist/nodes/Segment/constants/index.d.ts.map +1 -0
- package/dist/nodes/Segment/constants/index.js +720 -0
- package/dist/nodes/Segment/constants/index.js.map +1 -0
- package/dist/nodes/Segment/segment.svg +6 -0
- package/dist/nodes/Segment/transport/index.d.ts +35 -0
- package/dist/nodes/Segment/transport/index.d.ts.map +1 -0
- package/dist/nodes/Segment/transport/index.js +127 -0
- package/dist/nodes/Segment/transport/index.js.map +1 -0
- package/dist/nodes/Segment/utils/index.d.ts +67 -0
- package/dist/nodes/Segment/utils/index.d.ts.map +1 -0
- package/dist/nodes/Segment/utils/index.js +216 -0
- package/dist/nodes/Segment/utils/index.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Velocity BPA, LLC
|
|
4
|
+
* Licensed under the Business Source License 1.1
|
|
5
|
+
* Commercial use requires a separate commercial license.
|
|
6
|
+
* See LICENSE file for details.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.usersFields = exports.usersOperations = void 0;
|
|
10
|
+
exports.executeUsers = executeUsers;
|
|
11
|
+
const transport_1 = require("../../transport");
|
|
12
|
+
exports.usersOperations = [
|
|
13
|
+
{
|
|
14
|
+
displayName: 'Operation',
|
|
15
|
+
name: 'operation',
|
|
16
|
+
type: 'options',
|
|
17
|
+
noDataExpression: true,
|
|
18
|
+
displayOptions: {
|
|
19
|
+
show: {
|
|
20
|
+
resource: ['users'],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
options: [
|
|
24
|
+
{
|
|
25
|
+
name: 'Delete',
|
|
26
|
+
value: 'delete',
|
|
27
|
+
description: 'Remove user from workspace',
|
|
28
|
+
action: 'Delete a user',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Get',
|
|
32
|
+
value: 'get',
|
|
33
|
+
description: 'Get a user by ID',
|
|
34
|
+
action: 'Get a user',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'Get Many',
|
|
38
|
+
value: 'getAll',
|
|
39
|
+
description: 'List all workspace users',
|
|
40
|
+
action: 'List all users',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Get Permissions',
|
|
44
|
+
value: 'getPermissions',
|
|
45
|
+
description: 'Get user permissions',
|
|
46
|
+
action: 'Get user permissions',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'Invite',
|
|
50
|
+
value: 'invite',
|
|
51
|
+
description: 'Invite a user to the workspace',
|
|
52
|
+
action: 'Invite a user',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'List Groups',
|
|
56
|
+
value: 'listGroups',
|
|
57
|
+
description: 'List user groups',
|
|
58
|
+
action: 'List user groups',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
default: 'getAll',
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
exports.usersFields = [
|
|
65
|
+
// User ID field
|
|
66
|
+
{
|
|
67
|
+
displayName: 'User ID',
|
|
68
|
+
name: 'userId',
|
|
69
|
+
type: 'string',
|
|
70
|
+
required: true,
|
|
71
|
+
default: '',
|
|
72
|
+
description: 'The unique identifier of the user',
|
|
73
|
+
displayOptions: {
|
|
74
|
+
show: {
|
|
75
|
+
resource: ['users'],
|
|
76
|
+
operation: ['get', 'delete', 'getPermissions'],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
// Invite fields
|
|
81
|
+
{
|
|
82
|
+
displayName: 'Email',
|
|
83
|
+
name: 'email',
|
|
84
|
+
type: 'string',
|
|
85
|
+
placeholder: 'name@email.com',
|
|
86
|
+
required: true,
|
|
87
|
+
default: '',
|
|
88
|
+
description: 'Email address to invite',
|
|
89
|
+
displayOptions: {
|
|
90
|
+
show: {
|
|
91
|
+
resource: ['users'],
|
|
92
|
+
operation: ['invite'],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
displayName: 'Permissions',
|
|
98
|
+
name: 'permissions',
|
|
99
|
+
type: 'multiOptions',
|
|
100
|
+
options: [
|
|
101
|
+
{
|
|
102
|
+
name: 'Destination Admin',
|
|
103
|
+
value: 'destination_admin',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'Function Admin',
|
|
107
|
+
value: 'function_admin',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'Read Only',
|
|
111
|
+
value: 'read_only',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'Source Admin',
|
|
115
|
+
value: 'source_admin',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'Tracking Plan Admin',
|
|
119
|
+
value: 'tracking_plan_admin',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'Warehouse Admin',
|
|
123
|
+
value: 'warehouse_admin',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'Workspace Member',
|
|
127
|
+
value: 'workspace_member',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'Workspace Owner',
|
|
131
|
+
value: 'workspace_owner',
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
default: ['workspace_member'],
|
|
135
|
+
description: 'Permissions to grant the invited user',
|
|
136
|
+
displayOptions: {
|
|
137
|
+
show: {
|
|
138
|
+
resource: ['users'],
|
|
139
|
+
operation: ['invite'],
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
// Pagination
|
|
144
|
+
{
|
|
145
|
+
displayName: 'Return All',
|
|
146
|
+
name: 'returnAll',
|
|
147
|
+
type: 'boolean',
|
|
148
|
+
default: false,
|
|
149
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
150
|
+
displayOptions: {
|
|
151
|
+
show: {
|
|
152
|
+
resource: ['users'],
|
|
153
|
+
operation: ['getAll', 'listGroups'],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
displayName: 'Limit',
|
|
159
|
+
name: 'limit',
|
|
160
|
+
type: 'number',
|
|
161
|
+
default: 50,
|
|
162
|
+
description: 'Max number of results to return',
|
|
163
|
+
typeOptions: {
|
|
164
|
+
minValue: 1,
|
|
165
|
+
maxValue: 200,
|
|
166
|
+
},
|
|
167
|
+
displayOptions: {
|
|
168
|
+
show: {
|
|
169
|
+
resource: ['users'],
|
|
170
|
+
operation: ['getAll', 'listGroups'],
|
|
171
|
+
returnAll: [false],
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
];
|
|
176
|
+
async function executeUsers(index) {
|
|
177
|
+
const operation = this.getNodeParameter('operation', index);
|
|
178
|
+
let response;
|
|
179
|
+
if (operation === 'getAll') {
|
|
180
|
+
const returnAll = this.getNodeParameter('returnAll', index);
|
|
181
|
+
if (returnAll) {
|
|
182
|
+
response = await transport_1.publicApiRequestAllItems.call(this, 'GET', '/users', 'users');
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
const limit = this.getNodeParameter('limit', index);
|
|
186
|
+
const result = await transport_1.publicApiRequest.call(this, 'GET', '/users', {}, { count: limit });
|
|
187
|
+
response = result.users;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
else if (operation === 'get') {
|
|
191
|
+
const userId = this.getNodeParameter('userId', index);
|
|
192
|
+
const result = await transport_1.publicApiRequest.call(this, 'GET', `/users/${userId}`);
|
|
193
|
+
response = result.user;
|
|
194
|
+
}
|
|
195
|
+
else if (operation === 'invite') {
|
|
196
|
+
const email = this.getNodeParameter('email', index);
|
|
197
|
+
const permissions = this.getNodeParameter('permissions', index);
|
|
198
|
+
const body = {
|
|
199
|
+
email,
|
|
200
|
+
permissions,
|
|
201
|
+
};
|
|
202
|
+
const result = await transport_1.publicApiRequest.call(this, 'POST', '/invites', body);
|
|
203
|
+
response = result;
|
|
204
|
+
}
|
|
205
|
+
else if (operation === 'delete') {
|
|
206
|
+
const userId = this.getNodeParameter('userId', index);
|
|
207
|
+
await transport_1.publicApiRequest.call(this, 'DELETE', `/users/${userId}`);
|
|
208
|
+
response = { success: true, userId };
|
|
209
|
+
}
|
|
210
|
+
else if (operation === 'getPermissions') {
|
|
211
|
+
const userId = this.getNodeParameter('userId', index);
|
|
212
|
+
response = await transport_1.publicApiRequest.call(this, 'GET', `/users/${userId}/permissions`);
|
|
213
|
+
}
|
|
214
|
+
else if (operation === 'listGroups') {
|
|
215
|
+
const returnAll = this.getNodeParameter('returnAll', index);
|
|
216
|
+
if (returnAll) {
|
|
217
|
+
response = await transport_1.publicApiRequestAllItems.call(this, 'GET', '/user-groups', 'userGroups');
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
const limit = this.getNodeParameter('limit', index);
|
|
221
|
+
const result = await transport_1.publicApiRequest.call(this, 'GET', '/user-groups', {}, { count: limit });
|
|
222
|
+
response = result.userGroups;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
throw new Error(`Unknown operation: ${operation}`);
|
|
227
|
+
}
|
|
228
|
+
const executionData = Array.isArray(response)
|
|
229
|
+
? response.map((item) => ({ json: item }))
|
|
230
|
+
: [{ json: response }];
|
|
231
|
+
return executionData;
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Segment/actions/users/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA2KH,oCAyEC;AAjPD,+CAA6E;AAEhE,QAAA,eAAe,GAAsB;IACjD;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,CAAC,OAAO,CAAC;aACnB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,4BAA4B;gBACzC,MAAM,EAAE,eAAe;aACvB;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,kBAAkB;gBAC/B,MAAM,EAAE,YAAY;aACpB;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,0BAA0B;gBACvC,MAAM,EAAE,gBAAgB;aACxB;YACD;gBACC,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EAAE,sBAAsB;gBACnC,MAAM,EAA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AAG,MAAM,CAAC,UAA2B,CAAC;QAC/C,CAAC;IACF,CAAC;SAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;QAC5C,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IAExB,OAAO,aAAa,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const warehousesOperations: INodeProperties[];
|
|
3
|
+
export declare const warehousesFields: INodeProperties[];
|
|
4
|
+
export declare function executeWarehouses(this: IExecuteFunctions, index: number): Promise<INodeExecutionData[]>;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../nodes/Segment/actions/warehouses/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAe,kBAAkB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAIxG,eAAO,MAAM,oBAAoB,EAAE,eAAe,EA+DjD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,EA2J7C,CAAC;AAEF,wBAAsB,iBAAiB,CACtC,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAyG/B"}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Velocity BPA, LLC
|
|
4
|
+
* Licensed under the Business Source License 1.1
|
|
5
|
+
* Commercial use requires a separate commercial license.
|
|
6
|
+
* See LICENSE file for details.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.warehousesFields = exports.warehousesOperations = void 0;
|
|
10
|
+
exports.executeWarehouses = executeWarehouses;
|
|
11
|
+
const transport_1 = require("../../transport");
|
|
12
|
+
const utils_1 = require("../../utils");
|
|
13
|
+
exports.warehousesOperations = [
|
|
14
|
+
{
|
|
15
|
+
displayName: 'Operation',
|
|
16
|
+
name: 'operation',
|
|
17
|
+
type: 'options',
|
|
18
|
+
noDataExpression: true,
|
|
19
|
+
displayOptions: {
|
|
20
|
+
show: {
|
|
21
|
+
resource: ['warehouses'],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
options: [
|
|
25
|
+
{
|
|
26
|
+
name: 'Add Source',
|
|
27
|
+
value: 'addSource',
|
|
28
|
+
description: 'Connect a source to a warehouse',
|
|
29
|
+
action: 'Add source to warehouse',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Create',
|
|
33
|
+
value: 'create',
|
|
34
|
+
description: 'Create a new warehouse connection',
|
|
35
|
+
action: 'Create a warehouse',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Delete',
|
|
39
|
+
value: 'delete',
|
|
40
|
+
description: 'Delete a warehouse',
|
|
41
|
+
action: 'Delete a warehouse',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'Get',
|
|
45
|
+
value: 'get',
|
|
46
|
+
description: 'Get a warehouse by ID',
|
|
47
|
+
action: 'Get a warehouse',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'Get Connection State',
|
|
51
|
+
value: 'getConnectionState',
|
|
52
|
+
description: 'Get warehouse connection status',
|
|
53
|
+
action: 'Get warehouse connection state',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'Get Many',
|
|
57
|
+
value: 'getAll',
|
|
58
|
+
description: 'List all warehouses',
|
|
59
|
+
action: 'List all warehouses',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'Remove Source',
|
|
63
|
+
value: 'removeSource',
|
|
64
|
+
description: 'Disconnect a source from a warehouse',
|
|
65
|
+
action: 'Remove source from warehouse',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'Update',
|
|
69
|
+
value: 'update',
|
|
70
|
+
description: 'Update warehouse settings',
|
|
71
|
+
action: 'Update a warehouse',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
default: 'getAll',
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
exports.warehousesFields = [
|
|
78
|
+
// Warehouse ID field
|
|
79
|
+
{
|
|
80
|
+
displayName: 'Warehouse ID',
|
|
81
|
+
name: 'warehouseId',
|
|
82
|
+
type: 'string',
|
|
83
|
+
required: true,
|
|
84
|
+
default: '',
|
|
85
|
+
description: 'The unique identifier of the warehouse',
|
|
86
|
+
displayOptions: {
|
|
87
|
+
show: {
|
|
88
|
+
resource: ['warehouses'],
|
|
89
|
+
operation: ['get', 'update', 'delete', 'getConnectionState', 'addSource', 'removeSource'],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
// Source ID for add/remove operations
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Source ID',
|
|
96
|
+
name: 'sourceId',
|
|
97
|
+
type: 'string',
|
|
98
|
+
required: true,
|
|
99
|
+
default: '',
|
|
100
|
+
description: 'The source ID to connect/disconnect',
|
|
101
|
+
displayOptions: {
|
|
102
|
+
show: {
|
|
103
|
+
resource: ['warehouses'],
|
|
104
|
+
operation: ['addSource', 'removeSource'],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
// Create fields
|
|
109
|
+
{
|
|
110
|
+
displayName: 'Metadata ID',
|
|
111
|
+
name: 'metadataId',
|
|
112
|
+
type: 'string',
|
|
113
|
+
required: true,
|
|
114
|
+
default: '',
|
|
115
|
+
description: 'The catalog metadata ID for the warehouse type (e.g., BigQuery, Snowflake)',
|
|
116
|
+
displayOptions: {
|
|
117
|
+
show: {
|
|
118
|
+
resource: ['warehouses'],
|
|
119
|
+
operation: ['create'],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
displayName: 'Warehouse Name',
|
|
125
|
+
name: 'name',
|
|
126
|
+
type: 'string',
|
|
127
|
+
default: '',
|
|
128
|
+
description: 'Display name for the warehouse',
|
|
129
|
+
displayOptions: {
|
|
130
|
+
show: {
|
|
131
|
+
resource: ['warehouses'],
|
|
132
|
+
operation: ['create'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
displayName: 'Enabled',
|
|
138
|
+
name: 'enabled',
|
|
139
|
+
type: 'boolean',
|
|
140
|
+
default: true,
|
|
141
|
+
description: 'Whether the warehouse is enabled',
|
|
142
|
+
displayOptions: {
|
|
143
|
+
show: {
|
|
144
|
+
resource: ['warehouses'],
|
|
145
|
+
operation: ['create'],
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
displayName: 'Settings (JSON)',
|
|
151
|
+
name: 'settings',
|
|
152
|
+
type: 'json',
|
|
153
|
+
required: true,
|
|
154
|
+
default: '{}',
|
|
155
|
+
description: 'Warehouse-specific connection settings as JSON (credentials, project ID, etc.)',
|
|
156
|
+
displayOptions: {
|
|
157
|
+
show: {
|
|
158
|
+
resource: ['warehouses'],
|
|
159
|
+
operation: ['create'],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
// Update fields
|
|
164
|
+
{
|
|
165
|
+
displayName: 'Update Fields',
|
|
166
|
+
name: 'updateFields',
|
|
167
|
+
type: 'collection',
|
|
168
|
+
placeholder: 'Add Field',
|
|
169
|
+
default: {},
|
|
170
|
+
displayOptions: {
|
|
171
|
+
show: {
|
|
172
|
+
resource: ['warehouses'],
|
|
173
|
+
operation: ['update'],
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
options: [
|
|
177
|
+
{
|
|
178
|
+
displayName: 'Name',
|
|
179
|
+
name: 'name',
|
|
180
|
+
type: 'string',
|
|
181
|
+
default: '',
|
|
182
|
+
description: 'Display name for the warehouse',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
displayName: 'Enabled',
|
|
186
|
+
name: 'enabled',
|
|
187
|
+
type: 'boolean',
|
|
188
|
+
default: true,
|
|
189
|
+
description: 'Whether the warehouse is enabled',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
displayName: 'Settings (JSON)',
|
|
193
|
+
name: 'settings',
|
|
194
|
+
type: 'json',
|
|
195
|
+
default: '{}',
|
|
196
|
+
description: 'Warehouse-specific settings as JSON',
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
},
|
|
200
|
+
// Pagination
|
|
201
|
+
{
|
|
202
|
+
displayName: 'Return All',
|
|
203
|
+
name: 'returnAll',
|
|
204
|
+
type: 'boolean',
|
|
205
|
+
default: false,
|
|
206
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
207
|
+
displayOptions: {
|
|
208
|
+
show: {
|
|
209
|
+
resource: ['warehouses'],
|
|
210
|
+
operation: ['getAll'],
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
displayName: 'Limit',
|
|
216
|
+
name: 'limit',
|
|
217
|
+
type: 'number',
|
|
218
|
+
default: 50,
|
|
219
|
+
description: 'Max number of results to return',
|
|
220
|
+
typeOptions: {
|
|
221
|
+
minValue: 1,
|
|
222
|
+
maxValue: 200,
|
|
223
|
+
},
|
|
224
|
+
displayOptions: {
|
|
225
|
+
show: {
|
|
226
|
+
resource: ['warehouses'],
|
|
227
|
+
operation: ['getAll'],
|
|
228
|
+
returnAll: [false],
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
];
|
|
233
|
+
async function executeWarehouses(index) {
|
|
234
|
+
const operation = this.getNodeParameter('operation', index);
|
|
235
|
+
let response;
|
|
236
|
+
if (operation === 'getAll') {
|
|
237
|
+
const returnAll = this.getNodeParameter('returnAll', index);
|
|
238
|
+
if (returnAll) {
|
|
239
|
+
response = await transport_1.publicApiRequestAllItems.call(this, 'GET', '/warehouses', 'warehouses');
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
const limit = this.getNodeParameter('limit', index);
|
|
243
|
+
const result = await transport_1.publicApiRequest.call(this, 'GET', '/warehouses', {}, { count: limit });
|
|
244
|
+
response = result.warehouses;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
else if (operation === 'get') {
|
|
248
|
+
const warehouseId = this.getNodeParameter('warehouseId', index);
|
|
249
|
+
const result = await transport_1.publicApiRequest.call(this, 'GET', `/warehouses/${warehouseId}`);
|
|
250
|
+
response = result.warehouse;
|
|
251
|
+
}
|
|
252
|
+
else if (operation === 'create') {
|
|
253
|
+
const metadataId = this.getNodeParameter('metadataId', index);
|
|
254
|
+
const name = this.getNodeParameter('name', index, '');
|
|
255
|
+
const enabled = this.getNodeParameter('enabled', index);
|
|
256
|
+
const settings = (0, utils_1.parseJson)(this.getNodeParameter('settings', index, '{}'));
|
|
257
|
+
const body = {
|
|
258
|
+
metadataId,
|
|
259
|
+
enabled,
|
|
260
|
+
settings,
|
|
261
|
+
};
|
|
262
|
+
if (name) {
|
|
263
|
+
body.name = name;
|
|
264
|
+
}
|
|
265
|
+
const result = await transport_1.publicApiRequest.call(this, 'POST', '/warehouses', body);
|
|
266
|
+
response = result.warehouse;
|
|
267
|
+
}
|
|
268
|
+
else if (operation === 'update') {
|
|
269
|
+
const warehouseId = this.getNodeParameter('warehouseId', index);
|
|
270
|
+
const updateFields = this.getNodeParameter('updateFields', index);
|
|
271
|
+
const body = {};
|
|
272
|
+
if (updateFields.name !== undefined) {
|
|
273
|
+
body.name = updateFields.name;
|
|
274
|
+
}
|
|
275
|
+
if (updateFields.enabled !== undefined) {
|
|
276
|
+
body.enabled = updateFields.enabled;
|
|
277
|
+
}
|
|
278
|
+
if (updateFields.settings) {
|
|
279
|
+
body.settings = (0, utils_1.parseJson)(updateFields.settings);
|
|
280
|
+
}
|
|
281
|
+
const result = await transport_1.publicApiRequest.call(this, 'PATCH', `/warehouses/${warehouseId}`, body);
|
|
282
|
+
response = result.warehouse;
|
|
283
|
+
}
|
|
284
|
+
else if (operation === 'delete') {
|
|
285
|
+
const warehouseId = this.getNodeParameter('warehouseId', index);
|
|
286
|
+
await transport_1.publicApiRequest.call(this, 'DELETE', `/warehouses/${warehouseId}`);
|
|
287
|
+
response = { success: true, warehouseId };
|
|
288
|
+
}
|
|
289
|
+
else if (operation === 'getConnectionState') {
|
|
290
|
+
const warehouseId = this.getNodeParameter('warehouseId', index);
|
|
291
|
+
response = await transport_1.publicApiRequest.call(this, 'GET', `/warehouses/${warehouseId}/connection-state`);
|
|
292
|
+
}
|
|
293
|
+
else if (operation === 'addSource') {
|
|
294
|
+
const warehouseId = this.getNodeParameter('warehouseId', index);
|
|
295
|
+
const sourceId = this.getNodeParameter('sourceId', index);
|
|
296
|
+
const result = await transport_1.publicApiRequest.call(this, 'POST', `/warehouses/${warehouseId}/connected-sources`, { sourceId });
|
|
297
|
+
response = result;
|
|
298
|
+
}
|
|
299
|
+
else if (operation === 'removeSource') {
|
|
300
|
+
const warehouseId = this.getNodeParameter('warehouseId', index);
|
|
301
|
+
const sourceId = this.getNodeParameter('sourceId', index);
|
|
302
|
+
await transport_1.publicApiRequest.call(this, 'DELETE', `/warehouses/${warehouseId}/connected-sources/${sourceId}`);
|
|
303
|
+
response = { success: true, warehouseId, sourceId };
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
throw new Error(`Unknown operation: ${operation}`);
|
|
307
|
+
}
|
|
308
|
+
const executionData = Array.isArray(response)
|
|
309
|
+
? response.map((item) => ({ json: item }))
|
|
310
|
+
: [{ json: response }];
|
|
311
|
+
return executionData;
|
|
312
|
+
}
|
|
313
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Segment/actions/warehouses/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAoOH,8CA4GC;AA7UD,+CAA6E;AAC7E,uCAAwC;AAE3B,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,CAAC,YAAY,CAAC;aACxB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,iCAAiC;gBAC9C,MAAM,EAAE,yBAAyB;aACjC;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mCAAmC;gBAChD,MAAM,EAAE,oBAAoB;aAC5B;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,oBAAoB;gBACjC,MAAM,EAAE,oBAAoB;aAC5B;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,uBAAuB;gBACpC,MAAM,EAAE,iBAAiB;aACzB;YACD;gBACC,IAAI,EAAE,sBAAsB;gBAC5B,KAAK,EAAE,oBAAoB;gBAC3B,WAAW,EAAE,iCAAiC;gBAC9C,MAAM,EAAE,gCAAgC;aACxC;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,qBAAqB;gBAClC,MAAM,EAAE,qBAAqB;aAC7B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AG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;QAC5C,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IAExB,OAAO,aAAa,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const workspaceOperations: INodeProperties[];
|
|
3
|
+
export declare const workspaceFields: INodeProperties[];
|
|
4
|
+
export declare function executeWorkspace(this: IExecuteFunctions, index: number): Promise<INodeExecutionData[]>;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../nodes/Segment/actions/workspace/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAe,kBAAkB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGxG,eAAO,MAAM,mBAAmB,EAAE,eAAe,EA2BhD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,EAiC5C,CAAC;AAEF,wBAAsB,gBAAgB,CACrC,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAiC/B"}
|