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.
Files changed (96) hide show
  1. package/LICENSE +46 -0
  2. package/README.md +419 -0
  3. package/dist/credentials/SegmentApi.credentials.d.ts +10 -0
  4. package/dist/credentials/SegmentApi.credentials.d.ts.map +1 -0
  5. package/dist/credentials/SegmentApi.credentials.js +88 -0
  6. package/dist/credentials/SegmentApi.credentials.js.map +1 -0
  7. package/dist/index.d.ts +4 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +26 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/nodes/Segment/Segment.node.d.ts +6 -0
  12. package/dist/nodes/Segment/Segment.node.d.ts.map +1 -0
  13. package/dist/nodes/Segment/Segment.node.js +283 -0
  14. package/dist/nodes/Segment/Segment.node.js.map +1 -0
  15. package/dist/nodes/Segment/SegmentTrigger.node.d.ts +6 -0
  16. package/dist/nodes/Segment/SegmentTrigger.node.d.ts.map +1 -0
  17. package/dist/nodes/Segment/SegmentTrigger.node.js +257 -0
  18. package/dist/nodes/Segment/SegmentTrigger.node.js.map +1 -0
  19. package/dist/nodes/Segment/actions/audiences/index.d.ts +5 -0
  20. package/dist/nodes/Segment/actions/audiences/index.d.ts.map +1 -0
  21. package/dist/nodes/Segment/actions/audiences/index.js +304 -0
  22. package/dist/nodes/Segment/actions/audiences/index.js.map +1 -0
  23. package/dist/nodes/Segment/actions/auditTrail/index.d.ts +5 -0
  24. package/dist/nodes/Segment/actions/auditTrail/index.d.ts.map +1 -0
  25. package/dist/nodes/Segment/actions/auditTrail/index.js +192 -0
  26. package/dist/nodes/Segment/actions/auditTrail/index.js.map +1 -0
  27. package/dist/nodes/Segment/actions/catalog/index.d.ts +5 -0
  28. package/dist/nodes/Segment/actions/catalog/index.d.ts.map +1 -0
  29. package/dist/nodes/Segment/actions/catalog/index.js +144 -0
  30. package/dist/nodes/Segment/actions/catalog/index.js.map +1 -0
  31. package/dist/nodes/Segment/actions/computedTraits/index.d.ts +5 -0
  32. package/dist/nodes/Segment/actions/computedTraits/index.d.ts.map +1 -0
  33. package/dist/nodes/Segment/actions/computedTraits/index.js +257 -0
  34. package/dist/nodes/Segment/actions/computedTraits/index.js.map +1 -0
  35. package/dist/nodes/Segment/actions/destinations/index.d.ts +5 -0
  36. package/dist/nodes/Segment/actions/destinations/index.d.ts.map +1 -0
  37. package/dist/nodes/Segment/actions/destinations/index.js +297 -0
  38. package/dist/nodes/Segment/actions/destinations/index.js.map +1 -0
  39. package/dist/nodes/Segment/actions/functions/index.d.ts +5 -0
  40. package/dist/nodes/Segment/actions/functions/index.d.ts.map +1 -0
  41. package/dist/nodes/Segment/actions/functions/index.js +389 -0
  42. package/dist/nodes/Segment/actions/functions/index.js.map +1 -0
  43. package/dist/nodes/Segment/actions/labels/index.d.ts +5 -0
  44. package/dist/nodes/Segment/actions/labels/index.d.ts.map +1 -0
  45. package/dist/nodes/Segment/actions/labels/index.js +221 -0
  46. package/dist/nodes/Segment/actions/labels/index.js.map +1 -0
  47. package/dist/nodes/Segment/actions/regulations/index.d.ts +5 -0
  48. package/dist/nodes/Segment/actions/regulations/index.d.ts.map +1 -0
  49. package/dist/nodes/Segment/actions/regulations/index.js +322 -0
  50. package/dist/nodes/Segment/actions/regulations/index.js.map +1 -0
  51. package/dist/nodes/Segment/actions/sources/index.d.ts +5 -0
  52. package/dist/nodes/Segment/actions/sources/index.d.ts.map +1 -0
  53. package/dist/nodes/Segment/actions/sources/index.js +371 -0
  54. package/dist/nodes/Segment/actions/sources/index.js.map +1 -0
  55. package/dist/nodes/Segment/actions/spaces/index.d.ts +5 -0
  56. package/dist/nodes/Segment/actions/spaces/index.d.ts.map +1 -0
  57. package/dist/nodes/Segment/actions/spaces/index.js +328 -0
  58. package/dist/nodes/Segment/actions/spaces/index.js.map +1 -0
  59. package/dist/nodes/Segment/actions/track/index.d.ts +5 -0
  60. package/dist/nodes/Segment/actions/track/index.d.ts.map +1 -0
  61. package/dist/nodes/Segment/actions/track/index.js +499 -0
  62. package/dist/nodes/Segment/actions/track/index.js.map +1 -0
  63. package/dist/nodes/Segment/actions/trackingPlans/index.d.ts +5 -0
  64. package/dist/nodes/Segment/actions/trackingPlans/index.d.ts.map +1 -0
  65. package/dist/nodes/Segment/actions/trackingPlans/index.js +340 -0
  66. package/dist/nodes/Segment/actions/trackingPlans/index.js.map +1 -0
  67. package/dist/nodes/Segment/actions/transformations/index.d.ts +5 -0
  68. package/dist/nodes/Segment/actions/transformations/index.d.ts.map +1 -0
  69. package/dist/nodes/Segment/actions/transformations/index.js +280 -0
  70. package/dist/nodes/Segment/actions/transformations/index.js.map +1 -0
  71. package/dist/nodes/Segment/actions/users/index.d.ts +5 -0
  72. package/dist/nodes/Segment/actions/users/index.d.ts.map +1 -0
  73. package/dist/nodes/Segment/actions/users/index.js +233 -0
  74. package/dist/nodes/Segment/actions/users/index.js.map +1 -0
  75. package/dist/nodes/Segment/actions/warehouses/index.d.ts +5 -0
  76. package/dist/nodes/Segment/actions/warehouses/index.d.ts.map +1 -0
  77. package/dist/nodes/Segment/actions/warehouses/index.js +313 -0
  78. package/dist/nodes/Segment/actions/warehouses/index.js.map +1 -0
  79. package/dist/nodes/Segment/actions/workspace/index.d.ts +5 -0
  80. package/dist/nodes/Segment/actions/workspace/index.d.ts.map +1 -0
  81. package/dist/nodes/Segment/actions/workspace/index.js +100 -0
  82. package/dist/nodes/Segment/actions/workspace/index.js.map +1 -0
  83. package/dist/nodes/Segment/constants/index.d.ts +23 -0
  84. package/dist/nodes/Segment/constants/index.d.ts.map +1 -0
  85. package/dist/nodes/Segment/constants/index.js +720 -0
  86. package/dist/nodes/Segment/constants/index.js.map +1 -0
  87. package/dist/nodes/Segment/segment.svg +6 -0
  88. package/dist/nodes/Segment/transport/index.d.ts +35 -0
  89. package/dist/nodes/Segment/transport/index.d.ts.map +1 -0
  90. package/dist/nodes/Segment/transport/index.js +127 -0
  91. package/dist/nodes/Segment/transport/index.js.map +1 -0
  92. package/dist/nodes/Segment/utils/index.d.ts +67 -0
  93. package/dist/nodes/Segment/utils/index.d.ts.map +1 -0
  94. package/dist/nodes/Segment/utils/index.js +216 -0
  95. package/dist/nodes/Segment/utils/index.js.map +1 -0
  96. package/package.json +73 -0
@@ -0,0 +1,283 @@
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.Segment = void 0;
10
+ const n8n_workflow_1 = require("n8n-workflow");
11
+ // Import track resource
12
+ const track_1 = require("./actions/track");
13
+ // Import sources resource
14
+ const sources_1 = require("./actions/sources");
15
+ // Import destinations resource
16
+ const destinations_1 = require("./actions/destinations");
17
+ // Import warehouses resource
18
+ const warehouses_1 = require("./actions/warehouses");
19
+ // Import tracking plans resource
20
+ const trackingPlans_1 = require("./actions/trackingPlans");
21
+ // Import functions resource
22
+ const functions_1 = require("./actions/functions");
23
+ // Import spaces resource
24
+ const spaces_1 = require("./actions/spaces");
25
+ // Import users resource
26
+ const users_1 = require("./actions/users");
27
+ // Import regulations resource
28
+ const regulations_1 = require("./actions/regulations");
29
+ // Import catalog resource
30
+ const catalog_1 = require("./actions/catalog");
31
+ // Import transformations resource
32
+ const transformations_1 = require("./actions/transformations");
33
+ // Import computed traits resource
34
+ const computedTraits_1 = require("./actions/computedTraits");
35
+ // Import audiences resource
36
+ const audiences_1 = require("./actions/audiences");
37
+ // Import labels resource
38
+ const labels_1 = require("./actions/labels");
39
+ // Import audit trail resource
40
+ const auditTrail_1 = require("./actions/auditTrail");
41
+ // Import workspace resource
42
+ const workspace_1 = require("./actions/workspace");
43
+ // Runtime licensing notice - logged once per load
44
+ const LICENSE_NOTICE = `[Velocity BPA Licensing Notice]
45
+
46
+ This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).
47
+
48
+ Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.
49
+
50
+ For licensing information, visit https://velobpa.com/licensing or contact licensing@velobpa.com.`;
51
+ let licenseNoticeLogged = false;
52
+ function logLicenseNotice() {
53
+ if (!licenseNoticeLogged) {
54
+ console.warn(LICENSE_NOTICE);
55
+ licenseNoticeLogged = true;
56
+ }
57
+ }
58
+ class Segment {
59
+ constructor() {
60
+ this.description = {
61
+ displayName: 'Segment',
62
+ name: 'segment',
63
+ icon: 'file:segment.svg',
64
+ group: ['transform'],
65
+ version: 1,
66
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
67
+ description: 'Interact with Segment Customer Data Platform',
68
+ defaults: {
69
+ name: 'Segment',
70
+ },
71
+ inputs: ['main'],
72
+ outputs: ['main'],
73
+ credentials: [
74
+ {
75
+ name: 'segmentApi',
76
+ required: true,
77
+ },
78
+ ],
79
+ properties: [
80
+ {
81
+ displayName: 'Resource',
82
+ name: 'resource',
83
+ type: 'options',
84
+ noDataExpression: true,
85
+ options: [
86
+ {
87
+ name: 'Audience',
88
+ value: 'audiences',
89
+ description: 'Manage Personas audiences',
90
+ },
91
+ {
92
+ name: 'Audit Trail',
93
+ value: 'auditTrail',
94
+ description: 'View audit events',
95
+ },
96
+ {
97
+ name: 'Catalog',
98
+ value: 'catalog',
99
+ description: 'Browse integration catalog',
100
+ },
101
+ {
102
+ name: 'Computed Trait',
103
+ value: 'computedTraits',
104
+ description: 'Manage computed traits',
105
+ },
106
+ {
107
+ name: 'Destination',
108
+ value: 'destinations',
109
+ description: 'Manage destinations',
110
+ },
111
+ {
112
+ name: 'Function',
113
+ value: 'functions',
114
+ description: 'Manage custom functions',
115
+ },
116
+ {
117
+ name: 'Label',
118
+ value: 'labels',
119
+ description: 'Manage labels',
120
+ },
121
+ {
122
+ name: 'Regulation',
123
+ value: 'regulations',
124
+ description: 'Privacy and GDPR compliance',
125
+ },
126
+ {
127
+ name: 'Source',
128
+ value: 'sources',
129
+ description: 'Manage sources',
130
+ },
131
+ {
132
+ name: 'Space',
133
+ value: 'spaces',
134
+ description: 'Manage Personas spaces',
135
+ },
136
+ {
137
+ name: 'Track',
138
+ value: 'track',
139
+ description: 'Send tracking events',
140
+ },
141
+ {
142
+ name: 'Tracking Plan',
143
+ value: 'trackingPlans',
144
+ description: 'Manage tracking plans',
145
+ },
146
+ {
147
+ name: 'Transformation',
148
+ value: 'transformations',
149
+ description: 'Manage transformations',
150
+ },
151
+ {
152
+ name: 'User',
153
+ value: 'users',
154
+ description: 'Manage workspace users',
155
+ },
156
+ {
157
+ name: 'Warehouse',
158
+ value: 'warehouses',
159
+ description: 'Manage data warehouses',
160
+ },
161
+ {
162
+ name: 'Workspace',
163
+ value: 'workspace',
164
+ description: 'Get workspace info',
165
+ },
166
+ ],
167
+ default: 'track',
168
+ },
169
+ // Operations and fields for each resource
170
+ ...track_1.trackOperations,
171
+ ...track_1.trackFields,
172
+ ...sources_1.sourcesOperations,
173
+ ...sources_1.sourcesFields,
174
+ ...destinations_1.destinationsOperations,
175
+ ...destinations_1.destinationsFields,
176
+ ...warehouses_1.warehousesOperations,
177
+ ...warehouses_1.warehousesFields,
178
+ ...trackingPlans_1.trackingPlansOperations,
179
+ ...trackingPlans_1.trackingPlansFields,
180
+ ...functions_1.functionsOperations,
181
+ ...functions_1.functionsFields,
182
+ ...spaces_1.spacesOperations,
183
+ ...spaces_1.spacesFields,
184
+ ...users_1.usersOperations,
185
+ ...users_1.usersFields,
186
+ ...regulations_1.regulationsOperations,
187
+ ...regulations_1.regulationsFields,
188
+ ...catalog_1.catalogOperations,
189
+ ...catalog_1.catalogFields,
190
+ ...transformations_1.transformationsOperations,
191
+ ...transformations_1.transformationsFields,
192
+ ...computedTraits_1.computedTraitsOperations,
193
+ ...computedTraits_1.computedTraitsFields,
194
+ ...audiences_1.audiencesOperations,
195
+ ...audiences_1.audiencesFields,
196
+ ...labels_1.labelsOperations,
197
+ ...labels_1.labelsFields,
198
+ ...auditTrail_1.auditTrailOperations,
199
+ ...auditTrail_1.auditTrailFields,
200
+ ...workspace_1.workspaceOperations,
201
+ ...workspace_1.workspaceFields,
202
+ ],
203
+ };
204
+ }
205
+ async execute() {
206
+ // Log license notice once per load
207
+ logLicenseNotice();
208
+ const items = this.getInputData();
209
+ const returnData = [];
210
+ const resource = this.getNodeParameter('resource', 0);
211
+ for (let i = 0; i < items.length; i++) {
212
+ try {
213
+ let result = [];
214
+ switch (resource) {
215
+ case 'track':
216
+ result = await track_1.executeTrack.call(this, i);
217
+ break;
218
+ case 'sources':
219
+ result = await sources_1.executeSources.call(this, i);
220
+ break;
221
+ case 'destinations':
222
+ result = await destinations_1.executeDestinations.call(this, i);
223
+ break;
224
+ case 'warehouses':
225
+ result = await warehouses_1.executeWarehouses.call(this, i);
226
+ break;
227
+ case 'trackingPlans':
228
+ result = await trackingPlans_1.executeTrackingPlans.call(this, i);
229
+ break;
230
+ case 'functions':
231
+ result = await functions_1.executeFunctions.call(this, i);
232
+ break;
233
+ case 'spaces':
234
+ result = await spaces_1.executeSpaces.call(this, i);
235
+ break;
236
+ case 'users':
237
+ result = await users_1.executeUsers.call(this, i);
238
+ break;
239
+ case 'regulations':
240
+ result = await regulations_1.executeRegulations.call(this, i);
241
+ break;
242
+ case 'catalog':
243
+ result = await catalog_1.executeCatalog.call(this, i);
244
+ break;
245
+ case 'transformations':
246
+ result = await transformations_1.executeTransformations.call(this, i);
247
+ break;
248
+ case 'computedTraits':
249
+ result = await computedTraits_1.executeComputedTraits.call(this, i);
250
+ break;
251
+ case 'audiences':
252
+ result = await audiences_1.executeAudiences.call(this, i);
253
+ break;
254
+ case 'labels':
255
+ result = await labels_1.executeLabels.call(this, i);
256
+ break;
257
+ case 'auditTrail':
258
+ result = await auditTrail_1.executeAuditTrail.call(this, i);
259
+ break;
260
+ case 'workspace':
261
+ result = await workspace_1.executeWorkspace.call(this, i);
262
+ break;
263
+ default:
264
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown resource: ${resource}`, {
265
+ itemIndex: i,
266
+ });
267
+ }
268
+ returnData.push(...result);
269
+ }
270
+ catch (error) {
271
+ if (this.continueOnFail()) {
272
+ const executionErrorData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } });
273
+ returnData.push(...executionErrorData);
274
+ continue;
275
+ }
276
+ throw error;
277
+ }
278
+ }
279
+ return [returnData];
280
+ }
281
+ }
282
+ exports.Segment = Segment;
283
+ //# sourceMappingURL=Segment.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Segment.node.js","sourceRoot":"","sources":["../../../nodes/Segment/Segment.node.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAQH,+CAAkD;AAElD,wBAAwB;AACxB,2CAA6E;AAE7E,0BAA0B;AAC1B,+CAAqF;AAErF,+BAA+B;AAC/B,yDAAyG;AAEzG,6BAA6B;AAC7B,qDAAiG;AAEjG,iCAAiC;AACjC,2DAA6G;AAE7G,4BAA4B;AAC5B,mDAA6F;AAE7F,yBAAyB;AACzB,6CAAiF;AAEjF,wBAAwB;AACxB,2CAA6E;AAE7E,8BAA8B;AAC9B,uDAAqG;AAErG,0BAA0B;AAC1B,+CAAqF;AAErF,kCAAkC;AAClC,+DAAqH;AAErH,kCAAkC;AAClC,6DAAiH;AAEjH,4BAA4B;AAC5B,mDAA6F;AAE7F,yBAAyB;AACzB,6CAAiF;AAEjF,8BAA8B;AAC9B,qDAAiG;AAEjG,4BAA4B;AAC5B,mDAA6F;AAE7F,kDAAkD;AAClD,MAAM,cAAc,GAAG;;;;;;iGAM0E,CAAC;AAElG,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC,SAAS,gBAAgB;IACxB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC7B,mBAAmB,GAAG,IAAI,CAAC;IAC5B,CAAC;AACF,CAAC;AAED,MAAa,OAAO;IAApB;QACC,gBAAW,GA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AM,4BAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;wBAC9C,MAAM;oBACP;wBACC,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,qBAAqB,QAAQ,EAAE,EAAE;4BAC7E,SAAS,EAAE,CAAC;yBACZ,CAAC,CAAC;gBACL,CAAC;gBAED,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;YAC5B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,0BAA0B,CACjE,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,EACjE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CACzB,CAAC;oBACF,UAAU,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC;oBACvC,SAAS;gBACV,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AArOD,0BAqOC"}
@@ -0,0 +1,6 @@
1
+ import type { INodeType, INodeTypeDescription, IPollFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare class SegmentTrigger implements INodeType {
3
+ description: INodeTypeDescription;
4
+ poll(this: IPollFunctions): Promise<INodeExecutionData[][] | null>;
5
+ }
6
+ //# sourceMappingURL=SegmentTrigger.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentTrigger.node.d.ts","sourceRoot":"","sources":["../../../nodes/Segment/SegmentTrigger.node.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAEX,SAAS,EACT,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,MAAM,cAAc,CAAC;AAsBtB,qBAAa,cAAe,YAAW,SAAS;IAC/C,WAAW,EAAE,oBAAoB,CAsH/B;IAEI,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,GAAG,IAAI,CAAC;CA2KxE"}
@@ -0,0 +1,257 @@
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.SegmentTrigger = void 0;
10
+ const n8n_workflow_1 = require("n8n-workflow");
11
+ const transport_1 = require("./transport");
12
+ // Runtime licensing notice - logged once per load
13
+ const LICENSE_NOTICE = `[Velocity BPA Licensing Notice]
14
+
15
+ This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).
16
+
17
+ Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.
18
+
19
+ For licensing information, visit https://velobpa.com/licensing or contact licensing@velobpa.com.`;
20
+ let licenseNoticeLogged = false;
21
+ function logLicenseNotice() {
22
+ if (!licenseNoticeLogged) {
23
+ console.warn(LICENSE_NOTICE);
24
+ licenseNoticeLogged = true;
25
+ }
26
+ }
27
+ class SegmentTrigger {
28
+ constructor() {
29
+ this.description = {
30
+ displayName: 'Segment Trigger',
31
+ name: 'segmentTrigger',
32
+ icon: 'file:segment.svg',
33
+ group: ['trigger'],
34
+ version: 1,
35
+ subtitle: '={{$parameter["event"]}}',
36
+ description: 'Poll Segment for changes',
37
+ defaults: {
38
+ name: 'Segment Trigger',
39
+ },
40
+ inputs: [],
41
+ outputs: ['main'],
42
+ polling: true,
43
+ credentials: [
44
+ {
45
+ name: 'segmentApi',
46
+ required: true,
47
+ },
48
+ ],
49
+ properties: [
50
+ {
51
+ displayName: 'Event',
52
+ name: 'event',
53
+ type: 'options',
54
+ options: [
55
+ {
56
+ name: 'Source Created',
57
+ value: 'sourceCreated',
58
+ description: 'Trigger when a new source is created',
59
+ },
60
+ {
61
+ name: 'Source Updated',
62
+ value: 'sourceUpdated',
63
+ description: 'Trigger when a source is updated',
64
+ },
65
+ {
66
+ name: 'Destination Created',
67
+ value: 'destinationCreated',
68
+ description: 'Trigger when a new destination is created',
69
+ },
70
+ {
71
+ name: 'Destination Updated',
72
+ value: 'destinationUpdated',
73
+ description: 'Trigger when a destination is updated',
74
+ },
75
+ {
76
+ name: 'Tracking Plan Created',
77
+ value: 'trackingPlanCreated',
78
+ description: 'Trigger when a new tracking plan is created',
79
+ },
80
+ {
81
+ name: 'Tracking Plan Updated',
82
+ value: 'trackingPlanUpdated',
83
+ description: 'Trigger when a tracking plan is updated',
84
+ },
85
+ {
86
+ name: 'Audience Created',
87
+ value: 'audienceCreated',
88
+ description: 'Trigger when a new audience is created',
89
+ },
90
+ {
91
+ name: 'Function Deployed',
92
+ value: 'functionDeployed',
93
+ description: 'Trigger when a function is deployed',
94
+ },
95
+ {
96
+ name: 'Audit Event',
97
+ value: 'auditEvent',
98
+ description: 'Trigger on new audit events',
99
+ },
100
+ ],
101
+ default: 'sourceCreated',
102
+ description: 'The event to listen for',
103
+ },
104
+ {
105
+ displayName: 'Space ID',
106
+ name: 'spaceId',
107
+ type: 'string',
108
+ default: '',
109
+ description: 'The Personas space ID (required for audience events)',
110
+ displayOptions: {
111
+ show: {
112
+ event: ['audienceCreated'],
113
+ },
114
+ },
115
+ },
116
+ {
117
+ displayName: 'Audit Event Filter',
118
+ name: 'auditFilter',
119
+ type: 'collection',
120
+ placeholder: 'Add Filter',
121
+ default: {},
122
+ displayOptions: {
123
+ show: {
124
+ event: ['auditEvent'],
125
+ },
126
+ },
127
+ options: [
128
+ {
129
+ displayName: 'Resource Type',
130
+ name: 'resourceType',
131
+ type: 'options',
132
+ options: [
133
+ { name: 'All', value: '' },
134
+ { name: 'Source', value: 'source' },
135
+ { name: 'Destination', value: 'destination' },
136
+ { name: 'Tracking Plan', value: 'tracking_plan' },
137
+ { name: 'Function', value: 'function' },
138
+ { name: 'Warehouse', value: 'warehouse' },
139
+ { name: 'User', value: 'user' },
140
+ ],
141
+ default: '',
142
+ description: 'Filter by resource type',
143
+ },
144
+ ],
145
+ },
146
+ ],
147
+ };
148
+ }
149
+ async poll() {
150
+ // Log license notice once per load
151
+ logLicenseNotice();
152
+ const event = this.getNodeParameter('event');
153
+ const webhookData = this.getWorkflowStaticData('node');
154
+ const now = new Date().toISOString();
155
+ const lastPoll = webhookData.lastPoll || now;
156
+ let items = [];
157
+ try {
158
+ switch (event) {
159
+ case 'sourceCreated':
160
+ case 'sourceUpdated': {
161
+ const sources = await transport_1.publicApiRequestAllItems.call(this, 'GET', '/sources', 'sources');
162
+ items = sources.filter((source) => {
163
+ const createdAt = source.createdAt;
164
+ const updatedAt = source.updatedAt;
165
+ if (event === 'sourceCreated') {
166
+ return createdAt && new Date(createdAt) > new Date(lastPoll);
167
+ }
168
+ else {
169
+ return updatedAt && new Date(updatedAt) > new Date(lastPoll);
170
+ }
171
+ });
172
+ break;
173
+ }
174
+ case 'destinationCreated':
175
+ case 'destinationUpdated': {
176
+ // First get all sources to get their destinations
177
+ const sources = await transport_1.publicApiRequestAllItems.call(this, 'GET', '/sources', 'sources');
178
+ for (const source of sources) {
179
+ const sourceId = source.id;
180
+ const destinations = await transport_1.publicApiRequestAllItems.call(this, 'GET', `/sources/${sourceId}/destinations`, 'destinations');
181
+ const filtered = destinations.filter((dest) => {
182
+ const createdAt = dest.createdAt;
183
+ const updatedAt = dest.updatedAt;
184
+ if (event === 'destinationCreated') {
185
+ return createdAt && new Date(createdAt) > new Date(lastPoll);
186
+ }
187
+ else {
188
+ return updatedAt && new Date(updatedAt) > new Date(lastPoll);
189
+ }
190
+ });
191
+ items.push(...filtered);
192
+ }
193
+ break;
194
+ }
195
+ case 'trackingPlanCreated':
196
+ case 'trackingPlanUpdated': {
197
+ const trackingPlans = await transport_1.publicApiRequestAllItems.call(this, 'GET', '/tracking-plans', 'trackingPlans');
198
+ items = trackingPlans.filter((plan) => {
199
+ const createdAt = plan.createdAt;
200
+ const updatedAt = plan.updatedAt;
201
+ if (event === 'trackingPlanCreated') {
202
+ return createdAt && new Date(createdAt) > new Date(lastPoll);
203
+ }
204
+ else {
205
+ return updatedAt && new Date(updatedAt) > new Date(lastPoll);
206
+ }
207
+ });
208
+ break;
209
+ }
210
+ case 'audienceCreated': {
211
+ const spaceId = this.getNodeParameter('spaceId');
212
+ if (!spaceId) {
213
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Space ID is required for audience events');
214
+ }
215
+ const audiences = await transport_1.publicApiRequestAllItems.call(this, 'GET', `/spaces/${spaceId}/audiences`, 'audiences');
216
+ items = audiences.filter((audience) => {
217
+ const createdAt = audience.createdAt;
218
+ return createdAt && new Date(createdAt) > new Date(lastPoll);
219
+ });
220
+ break;
221
+ }
222
+ case 'functionDeployed': {
223
+ const functions = await transport_1.publicApiRequestAllItems.call(this, 'GET', '/functions', 'functions');
224
+ items = functions.filter((func) => {
225
+ const deployedAt = func.deployedAt;
226
+ return deployedAt && new Date(deployedAt) > new Date(lastPoll);
227
+ });
228
+ break;
229
+ }
230
+ case 'auditEvent': {
231
+ const auditFilter = this.getNodeParameter('auditFilter', {});
232
+ const qs = {
233
+ startDate: lastPoll,
234
+ };
235
+ if (auditFilter.resourceType) {
236
+ qs.resourceType = auditFilter.resourceType;
237
+ }
238
+ items = await transport_1.publicApiRequestAllItems.call(this, 'GET', '/audit-events', 'auditEvents', {}, qs);
239
+ break;
240
+ }
241
+ default:
242
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown event: ${event}`);
243
+ }
244
+ // Update last poll time
245
+ webhookData.lastPoll = now;
246
+ if (items.length === 0) {
247
+ return null;
248
+ }
249
+ return [items.map((item) => ({ json: item }))];
250
+ }
251
+ catch (error) {
252
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to poll Segment: ${error.message}`);
253
+ }
254
+ }
255
+ }
256
+ exports.SegmentTrigger = SegmentTrigger;
257
+ //# sourceMappingURL=SegmentTrigger.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentTrigger.node.js","sourceRoot":"","sources":["../../../nodes/Segment/SegmentTrigger.node.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AASH,+CAAkD;AAClD,2CAAuD;AAEvD,kDAAkD;AAClD,MAAM,cAAc,GAAG;;;;;;iGAM0E,CAAC;AAElG,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC,SAAS,gBAAgB;IACxB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC7B,mBAAmB,GAAG,IAAI,CAAC;IAC5B,CAAC;AACF,CAAC;AAED,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,0BAA0B;YACpC,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE;gBACT,IAAI,EAAE,iBAAiB;aACvB;YACD,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,YAAY;oBAClB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,OAAO;oBACpB,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,gBAAgB;4BACtB,KAAK,EAAE,eAAe;4BACtB,WAAW,EAAE,sCAAsC;yBACnD;wBACD;4BACC,IAAI,EAAE,gBAAgB;4BACtB,KAAK,EAAE,eAAe;4BACtB,WAAW,EAAE,kCAAkC;yBAC/C;wBACD;4BAC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C,OAAO,EAAE,EAAE,kBAAkB,KAAK,EAAE,CAAC,CAAC;YAC1E,CAAC;YAED,wBAAwB;YACxB,WAAW,CAAC,QAAQ,GAAG,GAAG,CAAC;YAE3B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACxB,OAAO,IAAI,CAAC;YACb,CAAC;YAED,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,2BAA4B,KAAe,CAAC,OAAO,EAAE,CACrD,CAAC;QACH,CAAC;IACF,CAAC;CACD;AApSD,wCAoSC"}
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const audiencesOperations: INodeProperties[];
3
+ export declare const audiencesFields: INodeProperties[];
4
+ export declare function executeAudiences(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/audiences/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAe,kBAAkB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGxG,eAAO,MAAM,mBAAmB,EAAE,eAAe,EAmDhD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,EA0K5C,CAAC;AAEF,wBAAsB,gBAAgB,CACrC,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,kBAAkB,EAAE,CAAC,CA0G/B"}