@segment/warehouse-destinations 1.10.1-staging-8a1459842.0 → 1.10.1-staging-f1b3c055d.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 (37) hide show
  1. package/dist/destinations/bigquery/generated-types.d.ts +3 -0
  2. package/dist/destinations/bigquery/generated-types.js +3 -0
  3. package/dist/destinations/bigquery/generated-types.js.map +1 -0
  4. package/dist/destinations/bigquery/index.d.ts +4 -0
  5. package/dist/destinations/bigquery/index.js +79 -0
  6. package/dist/destinations/bigquery/index.js.map +1 -0
  7. package/dist/destinations/bigquery/sendCustomEvent/audience-default-fields.d.ts +42 -0
  8. package/dist/destinations/bigquery/sendCustomEvent/audience-default-fields.js +30 -0
  9. package/dist/destinations/bigquery/sendCustomEvent/audience-default-fields.js.map +1 -0
  10. package/dist/destinations/bigquery/sendCustomEvent/generated-types.d.ts +9 -0
  11. package/dist/destinations/bigquery/sendCustomEvent/generated-types.js +3 -0
  12. package/dist/destinations/bigquery/sendCustomEvent/generated-types.js.map +1 -0
  13. package/dist/destinations/bigquery/sendCustomEvent/index.d.ts +5 -0
  14. package/dist/destinations/bigquery/sendCustomEvent/index.js +56 -0
  15. package/dist/destinations/bigquery/sendCustomEvent/index.js.map +1 -0
  16. package/dist/destinations/bigquery/sendCustomEvent/journeys-default-fields.d.ts +47 -0
  17. package/dist/destinations/bigquery/sendCustomEvent/journeys-default-fields.js +37 -0
  18. package/dist/destinations/bigquery/sendCustomEvent/journeys-default-fields.js.map +1 -0
  19. package/dist/destinations/redshift/generated-types.d.ts +3 -0
  20. package/dist/destinations/redshift/generated-types.js +3 -0
  21. package/dist/destinations/redshift/generated-types.js.map +1 -0
  22. package/dist/destinations/redshift/index.d.ts +4 -0
  23. package/dist/destinations/redshift/index.js +79 -0
  24. package/dist/destinations/redshift/index.js.map +1 -0
  25. package/dist/destinations/redshift/sendCustomEvent/audience-default-fields.d.ts +42 -0
  26. package/dist/destinations/redshift/sendCustomEvent/audience-default-fields.js +30 -0
  27. package/dist/destinations/redshift/sendCustomEvent/audience-default-fields.js.map +1 -0
  28. package/dist/destinations/redshift/sendCustomEvent/generated-types.d.ts +9 -0
  29. package/dist/destinations/redshift/sendCustomEvent/generated-types.js +3 -0
  30. package/dist/destinations/redshift/sendCustomEvent/generated-types.js.map +1 -0
  31. package/dist/destinations/redshift/sendCustomEvent/index.d.ts +5 -0
  32. package/dist/destinations/redshift/sendCustomEvent/index.js +56 -0
  33. package/dist/destinations/redshift/sendCustomEvent/index.js.map +1 -0
  34. package/dist/destinations/redshift/sendCustomEvent/journeys-default-fields.d.ts +47 -0
  35. package/dist/destinations/redshift/sendCustomEvent/journeys-default-fields.js +37 -0
  36. package/dist/destinations/redshift/sendCustomEvent/journeys-default-fields.js.map +1 -0
  37. package/package.json +3 -3
@@ -0,0 +1,3 @@
1
+ export interface Settings {
2
+ warehouseId: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/bigquery/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { WarehouseDestinationDefinition } from '@segment/actions-core';
2
+ import { Settings } from './generated-types';
3
+ declare const destination: WarehouseDestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const actions_core_1 = require("@segment/actions-core");
7
+ const sendCustomEvent_1 = __importDefault(require("./sendCustomEvent"));
8
+ const journeys_default_fields_1 = __importDefault(require("./sendCustomEvent/journeys-default-fields"));
9
+ const audience_default_fields_1 = __importDefault(require("./sendCustomEvent/audience-default-fields"));
10
+ const destination = {
11
+ name: 'BigQuery',
12
+ slug: 'bigquery',
13
+ mode: 'warehouse',
14
+ settings: {
15
+ warehouseId: {
16
+ label: 'Warehouse ID',
17
+ description: 'The ID of the existing BigQuery warehouse instance to use.',
18
+ type: 'string',
19
+ required: true
20
+ }
21
+ },
22
+ presets: [
23
+ {
24
+ name: 'Linked Audience Entity Added',
25
+ partnerAction: 'sendCustomEvent',
26
+ mapping: {
27
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
28
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
29
+ },
30
+ type: 'specificEvent',
31
+ eventSlug: 'warehouse_entity_added_track'
32
+ },
33
+ {
34
+ name: 'Linked Audience Associated Entity Removed',
35
+ partnerAction: 'sendCustomEvent',
36
+ mapping: {
37
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
38
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
39
+ },
40
+ type: 'specificEvent',
41
+ eventSlug: 'warehouse_entity_removed_track'
42
+ },
43
+ {
44
+ name: 'Linked Audience Profile Entered',
45
+ partnerAction: 'sendCustomEvent',
46
+ mapping: {
47
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
48
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
49
+ },
50
+ type: 'specificEvent',
51
+ eventSlug: 'warehouse_audience_entered_track'
52
+ },
53
+ {
54
+ name: 'Linked Audience Profile Exited',
55
+ partnerAction: 'sendCustomEvent',
56
+ mapping: {
57
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
58
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
59
+ },
60
+ type: 'specificEvent',
61
+ eventSlug: 'warehouse_audience_exited_track'
62
+ },
63
+ {
64
+ name: 'Journeys Step Entered',
65
+ partnerAction: 'sendCustomEvent',
66
+ mapping: {
67
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
68
+ ...(0, actions_core_1.defaultValues)(journeys_default_fields_1.default)
69
+ },
70
+ type: 'specificEvent',
71
+ eventSlug: 'journeys_step_entered_track'
72
+ }
73
+ ],
74
+ actions: {
75
+ sendCustomEvent: sendCustomEvent_1.default
76
+ }
77
+ };
78
+ exports.default = destination;
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/bigquery/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAqD;AAGrD,wEAA+C;AAC/C,wGAA6E;AAC7E,wGAA6E;AAE7E,MAAM,WAAW,GAA6C;IAC5D,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,WAAW;IAEjB,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,4DAA4D;YACzE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;KACF;IAED,OAAO,EAAE;QACP;YACE,IAAI,EAAE,8BAA8B;YACpC,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAqB,CAAC;aACxC;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,8BAA8B;SAC1C;QACD;YACE,IAAI,EAAE,2CAA2C;YACjD,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAqB,CAAC;aACxC;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,gCAAgC;SAC5C;QACD;YACE,IAAI,EAAE,iCAAiC;YACvC,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAqB,CAAC;aACxC;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,kCAAkC;SAC9C;QACD;YACE,IAAI,EAAE,gCAAgC;YACtC,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAqB,CAAC;aACxC;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,iCAAiC;SAC7C;QACD;YACE,IAAI,EAAE,uBAAuB;YAC7B,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAqB,CAAC;aACxC;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,6BAA6B;SACzC;KACF;IAED,OAAO,EAAE;QACP,eAAe,EAAf,yBAAe;KAChB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,42 @@
1
+ declare const _default: {
2
+ properties: {
3
+ label: string;
4
+ description: string;
5
+ type: string;
6
+ defaultObjectUI: string;
7
+ required: boolean;
8
+ additionalProperties: boolean;
9
+ default: {
10
+ entity_context: {
11
+ '@json': {
12
+ mode: string;
13
+ value: {
14
+ '@path': string;
15
+ };
16
+ };
17
+ };
18
+ user_id: {
19
+ '@path': string;
20
+ };
21
+ audience_key: {
22
+ '@path': string;
23
+ };
24
+ personas_computation_key: {
25
+ '@path': string;
26
+ };
27
+ personas_computation_id: {
28
+ '@path': string;
29
+ };
30
+ personas_computation_run_id: {
31
+ '@path': string;
32
+ };
33
+ personas_activation_id: {
34
+ '@path': string;
35
+ };
36
+ event_name: {
37
+ '@path': string;
38
+ };
39
+ };
40
+ };
41
+ };
42
+ export default _default;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ properties: {
5
+ label: 'Columns',
6
+ description: `Additional columns to write to BigQuery.`,
7
+ type: 'object',
8
+ defaultObjectUI: 'keyvalue',
9
+ required: true,
10
+ additionalProperties: true,
11
+ default: {
12
+ entity_context: {
13
+ '@json': {
14
+ mode: 'encode',
15
+ value: {
16
+ '@path': '$.properties.data_graph_entity_context'
17
+ }
18
+ }
19
+ },
20
+ user_id: { '@path': '$.userId' },
21
+ audience_key: { '@path': '$.properties.audience_key' },
22
+ personas_computation_key: { '@path': '$.context.personas.computation_key' },
23
+ personas_computation_id: { '@path': '$.context.personas.computation_id' },
24
+ personas_computation_run_id: { '@path': '$.context.personas.computation_run_id' },
25
+ personas_activation_id: { '@path': '$.context.personas.event_emitter_id' },
26
+ event_name: { '@path': '$.event' }
27
+ }
28
+ }
29
+ };
30
+ //# sourceMappingURL=audience-default-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audience-default-fields.js","sourceRoot":"","sources":["../../../../src/destinations/bigquery/sendCustomEvent/audience-default-fields.ts"],"names":[],"mappings":";;AAAA,kBAAe;IAEb,UAAU,EAAE;QACV,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,QAAQ;QACd,eAAe,EAAE,UAAU;QAC3B,QAAQ,EAAE,IAAI;QACd,oBAAoB,EAAE,IAAI;QAC1B,OAAO,EAAE;YACP,cAAc,EAAE;gBACd,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE;wBACL,OAAO,EAAE,wCAAwC;qBAClD;iBACF;aACF;YACD,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;YAChC,YAAY,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE;YACtD,wBAAwB,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE;YAC3E,uBAAuB,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE;YACzE,2BAA2B,EAAE,EAAE,OAAO,EAAE,uCAAuC,EAAE;YACjF,sBAAsB,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE;YAC1E,UAAU,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SACnC;KACF;CACF,CAAA"}
@@ -0,0 +1,9 @@
1
+ export interface Payload {
2
+ event: string;
3
+ properties: {
4
+ [k: string]: unknown;
5
+ };
6
+ messageId: string;
7
+ type: string;
8
+ receivedAt: string | number;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/bigquery/sendCustomEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { ActionDefinition } from '@segment/actions-core/destination-kit';
2
+ import { Settings } from '../generated-types';
3
+ import { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const action = {
4
+ title: 'Send Custom Event',
5
+ description: 'Record custom events in BigQuery',
6
+ fields: {
7
+ event: {
8
+ label: 'Table Name',
9
+ description: 'The name of the table.',
10
+ type: 'string',
11
+ required: true,
12
+ default: { '@path': '$.event' },
13
+ unsafe_hidden: true
14
+ },
15
+ properties: {
16
+ label: 'Columns',
17
+ description: `Additional columns to write to BigQuery.`,
18
+ type: 'object',
19
+ defaultObjectUI: 'keyvalue',
20
+ required: true,
21
+ additionalProperties: true,
22
+ default: {
23
+ user_id: { '@path': '$.userId' }
24
+ }
25
+ },
26
+ messageId: {
27
+ label: 'ID',
28
+ description: 'Name of column for the unique identifier for the message.',
29
+ type: 'string',
30
+ required: true,
31
+ default: { '@path': '$.messageId' },
32
+ readOnly: true
33
+ },
34
+ type: {
35
+ label: 'Event Type',
36
+ description: 'The type of event.',
37
+ type: 'string',
38
+ required: true,
39
+ default: { '@path': '$.type' },
40
+ readOnly: true,
41
+ unsafe_hidden: true
42
+ },
43
+ receivedAt: {
44
+ label: 'Received At',
45
+ description: 'Time when event was received.',
46
+ type: 'datetime',
47
+ required: true,
48
+ default: { '@path': '$.receivedAt' }
49
+ }
50
+ },
51
+ perform: () => {
52
+ return undefined;
53
+ }
54
+ };
55
+ exports.default = action;
56
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/bigquery/sendCustomEvent/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,kCAAkC;IAC/C,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;YAC/B,aAAa,EAAE,IAAI;SACpB;QAED,UAAU,EAAE;YACV,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,0CAA0C;YACvD,IAAI,EAAE,QAAQ;YACd,eAAe,EAAE,UAAU;YAC3B,QAAQ,EAAE,IAAI;YACd,oBAAoB,EAAE,IAAI;YAC1B,OAAO,EAAE;gBACP,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;aACjC;SACF;QAED,SAAS,EAAE;YACT,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,2DAA2D;YACxE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;YACnC,QAAQ,EAAE,IAAI;SACf;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;YAC9B,QAAQ,EAAE,IAAI;YAGd,aAAa,EAAE,IAAI;SACpB;QACD,UAAU,EAAE;YACV,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,+BAA+B;YAC5C,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC;KACF;IACD,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO,SAAS,CAAA;IAClB,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,47 @@
1
+ declare const _default: {
2
+ properties: {
3
+ label: string;
4
+ description: string;
5
+ type: string;
6
+ defaultObjectUI: string;
7
+ required: boolean;
8
+ additionalProperties: boolean;
9
+ default: {
10
+ journey_metadata: {
11
+ '@json': {
12
+ mode: string;
13
+ value: {
14
+ '@path': string;
15
+ };
16
+ };
17
+ };
18
+ journey_context: {
19
+ '@json': {
20
+ mode: string;
21
+ value: {
22
+ '@path': string;
23
+ };
24
+ };
25
+ };
26
+ user_id: {
27
+ '@path': string;
28
+ };
29
+ personas_computation_key: {
30
+ '@path': string;
31
+ };
32
+ personas_computation_id: {
33
+ '@path': string;
34
+ };
35
+ personas_activation_id: {
36
+ '@path': string;
37
+ };
38
+ personas_computation_class: {
39
+ '@path': string;
40
+ };
41
+ event_name: {
42
+ '@path': string;
43
+ };
44
+ };
45
+ };
46
+ };
47
+ export default _default;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ properties: {
5
+ label: 'Columns',
6
+ description: `Additional columns to write to BigQuery.`,
7
+ type: 'object',
8
+ defaultObjectUI: 'keyvalue',
9
+ required: true,
10
+ additionalProperties: true,
11
+ default: {
12
+ journey_metadata: {
13
+ '@json': {
14
+ mode: 'encode',
15
+ value: {
16
+ '@path': '$.properties.journey_metadata'
17
+ }
18
+ }
19
+ },
20
+ journey_context: {
21
+ '@json': {
22
+ mode: 'encode',
23
+ value: {
24
+ '@path': '$.properties.journey_context'
25
+ }
26
+ }
27
+ },
28
+ user_id: { '@path': '$.userId' },
29
+ personas_computation_key: { '@path': '$.context.personas.computation_key' },
30
+ personas_computation_id: { '@path': '$.context.personas.computation_id' },
31
+ personas_activation_id: { '@path': '$.context.personas.event_emitter_id' },
32
+ personas_computation_class: { '@path': '$.context.personas.computation_class' },
33
+ event_name: { '@path': '$.event' }
34
+ }
35
+ }
36
+ };
37
+ //# sourceMappingURL=journeys-default-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"journeys-default-fields.js","sourceRoot":"","sources":["../../../../src/destinations/bigquery/sendCustomEvent/journeys-default-fields.ts"],"names":[],"mappings":";;AAAA,kBAAe;IAEb,UAAU,EAAE;QACV,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,QAAQ;QACd,eAAe,EAAE,UAAU;QAC3B,QAAQ,EAAE,IAAI;QACd,oBAAoB,EAAE,IAAI;QAC1B,OAAO,EAAE;YACP,gBAAgB,EAAE;gBAChB,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE;wBACL,OAAO,EAAE,+BAA+B;qBACzC;iBACF;aACF;YACD,eAAe,EAAE;gBACf,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE;wBACL,OAAO,EAAE,8BAA8B;qBACxC;iBACF;aACF;YACD,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;YAChC,wBAAwB,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE;YAC3E,uBAAuB,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE;YACzE,sBAAsB,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE;YAC1E,0BAA0B,EAAE,EAAE,OAAO,EAAE,sCAAsC,EAAE;YAC/E,UAAU,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SACnC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ export interface Settings {
2
+ warehouseId: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/redshift/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { WarehouseDestinationDefinition } from '@segment/actions-core';
2
+ import { Settings } from './generated-types';
3
+ declare const destination: WarehouseDestinationDefinition<Settings>;
4
+ export default destination;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const actions_core_1 = require("@segment/actions-core");
7
+ const sendCustomEvent_1 = __importDefault(require("./sendCustomEvent"));
8
+ const audience_default_fields_1 = __importDefault(require("./sendCustomEvent/audience-default-fields"));
9
+ const journeys_default_fields_1 = __importDefault(require("./sendCustomEvent/journeys-default-fields"));
10
+ const destination = {
11
+ name: 'Redshift',
12
+ slug: 'redshift',
13
+ mode: 'warehouse',
14
+ settings: {
15
+ warehouseId: {
16
+ label: 'Warehouse ID',
17
+ description: 'The ID of the existing Redshift warehouse instance to use.',
18
+ type: 'string',
19
+ required: true
20
+ }
21
+ },
22
+ presets: [
23
+ {
24
+ name: 'Linked Audience Entity Added',
25
+ partnerAction: 'sendCustomEvent',
26
+ mapping: {
27
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
28
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
29
+ },
30
+ type: 'specificEvent',
31
+ eventSlug: 'warehouse_entity_added_track'
32
+ },
33
+ {
34
+ name: 'Linked Audience Associated Entity Removed',
35
+ partnerAction: 'sendCustomEvent',
36
+ mapping: {
37
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
38
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
39
+ },
40
+ type: 'specificEvent',
41
+ eventSlug: 'warehouse_entity_removed_track'
42
+ },
43
+ {
44
+ name: 'Linked Audience Profile Entered',
45
+ partnerAction: 'sendCustomEvent',
46
+ mapping: {
47
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
48
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
49
+ },
50
+ type: 'specificEvent',
51
+ eventSlug: 'warehouse_audience_entered_track'
52
+ },
53
+ {
54
+ name: 'Linked Audience Profile Exited',
55
+ partnerAction: 'sendCustomEvent',
56
+ mapping: {
57
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
58
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
59
+ },
60
+ type: 'specificEvent',
61
+ eventSlug: 'warehouse_audience_exited_track'
62
+ },
63
+ {
64
+ name: 'Journeys Step Entered',
65
+ partnerAction: 'sendCustomEvent',
66
+ mapping: {
67
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
68
+ ...(0, actions_core_1.defaultValues)(journeys_default_fields_1.default)
69
+ },
70
+ type: 'specificEvent',
71
+ eventSlug: 'journeys_step_entered_track'
72
+ }
73
+ ],
74
+ actions: {
75
+ sendCustomEvent: sendCustomEvent_1.default
76
+ }
77
+ };
78
+ exports.default = destination;
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/redshift/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAqD;AAGrD,wEAA+C;AAC/C,wGAA6E;AAC7E,wGAA6E;AAE7E,MAAM,WAAW,GAA6C;IAC5D,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,WAAW;IAEjB,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,4DAA4D;YACzE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;KACF;IAED,OAAO,EAAE;QACP;YACE,IAAI,EAAE,8BAA8B;YACpC,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAqB,CAAC;aACxC;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,8BAA8B;SAC1C;QACD;YACE,IAAI,EAAE,2CAA2C;YACjD,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAqB,CAAC;aACxC;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,gCAAgC;SAC5C;QACD;YACE,IAAI,EAAE,iCAAiC;YACvC,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAqB,CAAC;aACxC;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,kCAAkC;SAC9C;QACD;YACE,IAAI,EAAE,gCAAgC;YACtC,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAqB,CAAC;aACxC;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,iCAAiC;SAC7C;QACD;YACE,IAAI,EAAE,uBAAuB;YAC7B,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAqB,CAAC;aACxC;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,6BAA6B;SACzC;KACF;IAED,OAAO,EAAE;QACP,eAAe,EAAf,yBAAe;KAChB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,42 @@
1
+ declare const _default: {
2
+ properties: {
3
+ label: string;
4
+ description: string;
5
+ type: string;
6
+ defaultObjectUI: string;
7
+ required: boolean;
8
+ additionalProperties: boolean;
9
+ default: {
10
+ entity_context: {
11
+ '@json': {
12
+ mode: string;
13
+ value: {
14
+ '@path': string;
15
+ };
16
+ };
17
+ };
18
+ user_id: {
19
+ '@path': string;
20
+ };
21
+ audience_key: {
22
+ '@path': string;
23
+ };
24
+ personas_computation_key: {
25
+ '@path': string;
26
+ };
27
+ personas_computation_id: {
28
+ '@path': string;
29
+ };
30
+ personas_computation_run_id: {
31
+ '@path': string;
32
+ };
33
+ personas_activation_id: {
34
+ '@path': string;
35
+ };
36
+ event_name: {
37
+ '@path': string;
38
+ };
39
+ };
40
+ };
41
+ };
42
+ export default _default;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ properties: {
5
+ label: 'Columns',
6
+ description: `Additional columns to write to Redshift.`,
7
+ type: 'object',
8
+ defaultObjectUI: 'keyvalue',
9
+ required: true,
10
+ additionalProperties: true,
11
+ default: {
12
+ entity_context: {
13
+ '@json': {
14
+ mode: 'encode',
15
+ value: {
16
+ '@path': '$.properties.data_graph_entity_context'
17
+ }
18
+ }
19
+ },
20
+ user_id: { '@path': '$.userId' },
21
+ audience_key: { '@path': '$.properties.audience_key' },
22
+ personas_computation_key: { '@path': '$.context.personas.computation_key' },
23
+ personas_computation_id: { '@path': '$.context.personas.computation_id' },
24
+ personas_computation_run_id: { '@path': '$.context.personas.computation_run_id' },
25
+ personas_activation_id: { '@path': '$.context.personas.event_emitter_id' },
26
+ event_name: { '@path': '$.event' }
27
+ }
28
+ }
29
+ };
30
+ //# sourceMappingURL=audience-default-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audience-default-fields.js","sourceRoot":"","sources":["../../../../src/destinations/redshift/sendCustomEvent/audience-default-fields.ts"],"names":[],"mappings":";;AAAA,kBAAe;IAEb,UAAU,EAAE;QACV,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,QAAQ;QACd,eAAe,EAAE,UAAU;QAC3B,QAAQ,EAAE,IAAI;QACd,oBAAoB,EAAE,IAAI;QAC1B,OAAO,EAAE;YACP,cAAc,EAAE;gBACd,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE;wBACL,OAAO,EAAE,wCAAwC;qBAClD;iBACF;aACF;YACD,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;YAChC,YAAY,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE;YACtD,wBAAwB,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE;YAC3E,uBAAuB,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE;YACzE,2BAA2B,EAAE,EAAE,OAAO,EAAE,uCAAuC,EAAE;YACjF,sBAAsB,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE;YAC1E,UAAU,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SACnC;KACF;CACF,CAAA"}
@@ -0,0 +1,9 @@
1
+ export interface Payload {
2
+ event: string;
3
+ properties: {
4
+ [k: string]: unknown;
5
+ };
6
+ messageId: string;
7
+ type: string;
8
+ receivedAt: string | number;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/redshift/sendCustomEvent/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const action = {
4
+ title: 'Send Custom Event',
5
+ description: 'Record custom events in Redshift',
6
+ fields: {
7
+ event: {
8
+ label: 'Table Name',
9
+ description: 'The name of the table.',
10
+ type: 'string',
11
+ required: true,
12
+ default: { '@path': '$.event' },
13
+ unsafe_hidden: true
14
+ },
15
+ properties: {
16
+ label: 'Columns',
17
+ description: `Additional columns to write to Redshift.`,
18
+ type: 'object',
19
+ defaultObjectUI: 'keyvalue',
20
+ required: true,
21
+ additionalProperties: true,
22
+ default: {
23
+ user_id: { '@path': '$.userId' }
24
+ }
25
+ },
26
+ messageId: {
27
+ label: 'ID',
28
+ description: 'Name of column for the unique identifier for the message.',
29
+ type: 'string',
30
+ required: true,
31
+ default: { '@path': '$.messageId' },
32
+ readOnly: true
33
+ },
34
+ type: {
35
+ label: 'Event Type',
36
+ description: 'The type of event.',
37
+ type: 'string',
38
+ required: true,
39
+ default: { '@path': '$.type' },
40
+ readOnly: true,
41
+ unsafe_hidden: true
42
+ },
43
+ receivedAt: {
44
+ label: 'Received At',
45
+ description: 'Time when event was received.',
46
+ type: 'datetime',
47
+ required: true,
48
+ default: { '@path': '$.receivedAt' }
49
+ }
50
+ },
51
+ perform: () => {
52
+ return undefined;
53
+ }
54
+ };
55
+ exports.default = action;
56
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/redshift/sendCustomEvent/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,kCAAkC;IAC/C,MAAM,EAAE;QACN,KAAK,EAAE;YACL,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;YAC/B,aAAa,EAAE,IAAI;SACpB;QAED,UAAU,EAAE;YACV,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,0CAA0C;YACvD,IAAI,EAAE,QAAQ;YACd,eAAe,EAAE,UAAU;YAC3B,QAAQ,EAAE,IAAI;YACd,oBAAoB,EAAE,IAAI;YAC1B,OAAO,EAAE;gBACP,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;aACjC;SACF;QAED,SAAS,EAAE;YACT,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,2DAA2D;YACxE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;YACnC,QAAQ,EAAE,IAAI;SACf;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;YAC9B,QAAQ,EAAE,IAAI;YAGd,aAAa,EAAE,IAAI;SACpB;QACD,UAAU,EAAE;YACV,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,+BAA+B;YAC5C,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC;KACF;IACD,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO,SAAS,CAAA;IAClB,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,47 @@
1
+ declare const _default: {
2
+ properties: {
3
+ label: string;
4
+ description: string;
5
+ type: string;
6
+ defaultObjectUI: string;
7
+ required: boolean;
8
+ additionalProperties: boolean;
9
+ default: {
10
+ journey_metadata: {
11
+ '@json': {
12
+ mode: string;
13
+ value: {
14
+ '@path': string;
15
+ };
16
+ };
17
+ };
18
+ journey_context: {
19
+ '@json': {
20
+ mode: string;
21
+ value: {
22
+ '@path': string;
23
+ };
24
+ };
25
+ };
26
+ user_id: {
27
+ '@path': string;
28
+ };
29
+ personas_computation_key: {
30
+ '@path': string;
31
+ };
32
+ personas_computation_id: {
33
+ '@path': string;
34
+ };
35
+ personas_activation_id: {
36
+ '@path': string;
37
+ };
38
+ personas_computation_class: {
39
+ '@path': string;
40
+ };
41
+ event_name: {
42
+ '@path': string;
43
+ };
44
+ };
45
+ };
46
+ };
47
+ export default _default;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ properties: {
5
+ label: 'Columns',
6
+ description: `Additional columns to write to Redshift.`,
7
+ type: 'object',
8
+ defaultObjectUI: 'keyvalue',
9
+ required: true,
10
+ additionalProperties: true,
11
+ default: {
12
+ journey_metadata: {
13
+ '@json': {
14
+ mode: 'encode',
15
+ value: {
16
+ '@path': '$.properties.journey_metadata'
17
+ }
18
+ }
19
+ },
20
+ journey_context: {
21
+ '@json': {
22
+ mode: 'encode',
23
+ value: {
24
+ '@path': '$.properties.journey_context'
25
+ }
26
+ }
27
+ },
28
+ user_id: { '@path': '$.userId' },
29
+ personas_computation_key: { '@path': '$.context.personas.computation_key' },
30
+ personas_computation_id: { '@path': '$.context.personas.computation_id' },
31
+ personas_activation_id: { '@path': '$.context.personas.event_emitter_id' },
32
+ personas_computation_class: { '@path': '$.context.personas.computation_class' },
33
+ event_name: { '@path': '$.event' }
34
+ }
35
+ }
36
+ };
37
+ //# sourceMappingURL=journeys-default-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"journeys-default-fields.js","sourceRoot":"","sources":["../../../../src/destinations/redshift/sendCustomEvent/journeys-default-fields.ts"],"names":[],"mappings":";;AAAA,kBAAe;IAEb,UAAU,EAAE;QACV,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,0CAA0C;QACvD,IAAI,EAAE,QAAQ;QACd,eAAe,EAAE,UAAU;QAC3B,QAAQ,EAAE,IAAI;QACd,oBAAoB,EAAE,IAAI;QAC1B,OAAO,EAAE;YACP,gBAAgB,EAAE;gBAChB,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE;wBACL,OAAO,EAAE,+BAA+B;qBACzC;iBACF;aACF;YACD,eAAe,EAAE;gBACf,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE;wBACL,OAAO,EAAE,8BAA8B;qBACxC;iBACF;aACF;YACD,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;YAChC,wBAAwB,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE;YAC3E,uBAAuB,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE;YACzE,sBAAsB,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE;YAC1E,0BAA0B,EAAE,EAAE,OAAO,EAAE,sCAAsC,EAAE;YAC/E,UAAU,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;SACnC;KACF;CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@segment/warehouse-destinations",
3
- "version": "1.10.1-staging-8a1459842.0",
3
+ "version": "1.10.1-staging-f1b3c055d.0",
4
4
  "description": "Definitions for warehouse destinations. Only used for definitions - should not be imported for anything other than types.",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -25,8 +25,8 @@
25
25
  "engineStrict": true,
26
26
  "license": "MIT",
27
27
  "dependencies": {
28
- "@segment/actions-core": "3.160.1-staging-806482af2.0",
28
+ "@segment/actions-core": "3.160.1-staging-8e44525ae.0",
29
29
  "globby": "^14.1.0"
30
30
  },
31
- "gitHead": "8e44525ae806c643c41dce5de1d7919a977114ab"
31
+ "gitHead": "944a89feaa061693999eb1a597ae38665de7cf25"
32
32
  }