@segment/warehouse-destinations 1.5.1-staging-b62b494c1.0 → 1.5.1-staging-07bf58c29.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.
@@ -3,6 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const actions_core_1 = require("@segment/actions-core");
7
+ const audience_default_fields_1 = __importDefault(require("./sendCustomEvent/audience-default-fields"));
6
8
  const sendCustomEvent_1 = __importDefault(require("./sendCustomEvent"));
7
9
  const destination = {
8
10
  name: 'Snowflake',
@@ -16,6 +18,48 @@ const destination = {
16
18
  required: true
17
19
  }
18
20
  },
21
+ presets: [
22
+ {
23
+ name: 'Associated Entity Added',
24
+ partnerAction: 'sendCustomEvent',
25
+ mapping: {
26
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
27
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
28
+ },
29
+ type: 'specificEvent',
30
+ eventSlug: 'warehouse_entity_added_track'
31
+ },
32
+ {
33
+ name: 'Associated Entity Removed',
34
+ partnerAction: 'sendCustomEvent',
35
+ mapping: {
36
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
37
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
38
+ },
39
+ type: 'specificEvent',
40
+ eventSlug: 'warehouse_entity_removed_track'
41
+ },
42
+ {
43
+ name: 'Entities Audience Entered',
44
+ partnerAction: 'sendCustomEvent',
45
+ mapping: {
46
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
47
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
48
+ },
49
+ type: 'specificEvent',
50
+ eventSlug: 'warehouse_audience_entered_track'
51
+ },
52
+ {
53
+ name: 'Entities Exited',
54
+ partnerAction: 'trackEvent',
55
+ mapping: {
56
+ ...(0, actions_core_1.defaultValues)(sendCustomEvent_1.default.fields),
57
+ ...(0, actions_core_1.defaultValues)(audience_default_fields_1.default)
58
+ },
59
+ type: 'specificEvent',
60
+ eventSlug: 'warehouse_audience_exited_track'
61
+ }
62
+ ],
19
63
  actions: {
20
64
  sendCustomEvent: sendCustomEvent_1.default
21
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/snowflake/index.ts"],"names":[],"mappings":";;;;;AAGA,wEAA+C;AAE/C,MAAM,WAAW,GAA6C;IAC5D,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IAEjB,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,6DAA6D;YAC1E,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;KACF;IAED,OAAO,EAAE;QACP,eAAe,EAAf,yBAAe;KAChB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/snowflake/index.ts"],"names":[],"mappings":";;;;;AAEA,wDAAqD;AACrD,wGAA+E;AAE/E,wEAA+C;AAE/C,MAAM,WAAW,GAA6C;IAC5D,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IAEjB,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,6DAA6D;YAC1E,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;KACF;IAED,OAAO,EAAE;QACP;YACE,IAAI,EAAE,yBAAyB;YAC/B,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAuB,CAAC;aAC1C;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,8BAA8B;SAC1C;QACD;YACE,IAAI,EAAE,2BAA2B;YACjC,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAuB,CAAC;aAC1C;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,gCAAgC;SAC5C;QACD;YACE,IAAI,EAAE,2BAA2B;YACjC,aAAa,EAAE,iBAAiB;YAChC,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAuB,CAAC;aAC1C;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,kCAAkC;SAC9C;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,aAAa,EAAE,YAAY;YAC3B,OAAO,EAAE;gBACP,GAAG,IAAA,4BAAa,EAAC,yBAAe,CAAC,MAAM,CAAC;gBACxC,GAAG,IAAA,4BAAa,EAAC,iCAAuB,CAAC;aAC1C;YACD,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE,iCAAiC;SAC7C;KACF;IAED,OAAO,EAAE;QACP,eAAe,EAAf,yBAAe;KAChB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,39 @@
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
+ };
37
+ };
38
+ };
39
+ export default _default;
@@ -0,0 +1,29 @@
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 Snowflake.`,
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
+ }
27
+ }
28
+ };
29
+ //# sourceMappingURL=audience-default-fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audience-default-fields.js","sourceRoot":"","sources":["../../../../src/destinations/snowflake/sendCustomEvent/audience-default-fields.ts"],"names":[],"mappings":";;AAAA,kBAAe;IAEb,UAAU,EAAE;QACV,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,2CAA2C;QACxD,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;SAC3E;KACF;CACF,CAAA"}
@@ -1,12 +1,8 @@
1
1
  export interface Payload {
2
- messageId: string;
3
- event: string;
4
- type: string;
5
2
  properties: {
6
3
  [k: string]: unknown;
7
4
  };
8
- timestamp: string | number;
9
- originalTimestamp: string | number;
10
- sentAt?: string | number;
11
- receivedAt?: string | number;
5
+ messageId: string;
6
+ type: string;
7
+ receivedAt: string | number;
12
8
  }
@@ -4,30 +4,6 @@ const action = {
4
4
  title: 'Send Custom Event',
5
5
  description: 'Record custom events in Snowflake',
6
6
  fields: {
7
- messageId: {
8
- label: 'Message ID',
9
- description: 'Name of column for the unique identifier for the message.',
10
- type: 'string',
11
- required: true,
12
- default: { '@path': '$.messageId' },
13
- readOnly: true
14
- },
15
- event: {
16
- label: 'Table Name',
17
- description: 'Name of the table. This will be the event name.',
18
- type: 'string',
19
- required: true,
20
- default: { '@path': '$.event' },
21
- readOnly: true
22
- },
23
- type: {
24
- label: 'Event Type',
25
- description: 'The type of event',
26
- type: 'string',
27
- required: true,
28
- default: { '@path': '$.type' },
29
- readOnly: true
30
- },
31
7
  properties: {
32
8
  label: 'Columns',
33
9
  description: `Additional columns to write to Snowflake.`,
@@ -36,48 +12,30 @@ const action = {
36
12
  required: true,
37
13
  additionalProperties: true,
38
14
  default: {
39
- entity_context: {
40
- '@json': {
41
- mode: 'encode',
42
- value: {
43
- '@path': '$.properties.data_graph_entity_context'
44
- }
45
- }
46
- },
47
- user_id: { '@path': '$.userId' },
48
- audience_key: { '@path': '$.properties.audience_key' },
49
- personas_computation_key: { '@path': '$.context.personas.computation_key' },
50
- personas_computation_id: { '@path': '$.context.personas.computation_id' },
51
- personas_computationRun_id: { '@path': '$.context.personas.computation_run_id' },
52
- personas_activation_id: { '@path': '$.context.personas.event_emitter_id' }
15
+ user_id: { '@path': '$.userId' }
53
16
  }
54
17
  },
55
- timestamp: {
56
- label: 'Timestamp',
57
- description: 'Timestamp of the event',
58
- type: 'datetime',
18
+ messageId: {
19
+ label: 'ID',
20
+ description: 'Name of column for the unique identifier for the message.',
21
+ type: 'string',
59
22
  required: true,
60
- default: { '@path': '$.timestamp' }
23
+ default: { '@path': '$.messageId' },
24
+ readOnly: true
61
25
  },
62
- originalTimestamp: {
63
- label: 'Original Timestamp',
64
- description: 'Time on the client device when call was invoked.',
65
- type: 'datetime',
26
+ type: {
27
+ label: 'Event Type',
28
+ description: 'The type of event.',
29
+ type: 'string',
66
30
  required: true,
67
- default: { '@path': '$.originalTimestamp' }
68
- },
69
- sentAt: {
70
- label: 'Sent At',
71
- description: 'Time on client device when call was sent.',
72
- type: 'datetime',
73
- required: false,
74
- default: { '@path': '$.sentAt' }
31
+ default: { '@path': '$.type' },
32
+ readOnly: true
75
33
  },
76
34
  receivedAt: {
77
35
  label: 'Received At',
78
- description: 'Time on Segment server clock when call was received.',
36
+ description: 'Time when event was received.',
79
37
  type: 'datetime',
80
- required: false,
38
+ required: true,
81
39
  default: { '@path': '$.receivedAt' }
82
40
  }
83
41
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/snowflake/sendCustomEvent/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,mCAAmC;IAChD,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,YAAY;YACnB,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,KAAK,EAAE;YACL,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AAW,EAAE,kDAAkD;YAC/D,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;SAC5C;QACD,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,2CAA2C;YACxD,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SACjC;QACD,UAAU,EAAE;YACV,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,sDAAsD;YACnE,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,KAAK;YACf,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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/snowflake/sendCustomEvent/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,mCAAmC;IAChD,MAAM,EAAE;QAEN,UAAU,EAAE;YACV,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,2CAA2C;YACxD,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;SACf;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@segment/warehouse-destinations",
3
- "version": "1.5.1-staging-b62b494c1.0",
3
+ "version": "1.5.1-staging-07bf58c29.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.158.1-staging-b62b494c1.0",
28
+ "@segment/actions-core": "3.158.1-staging-07bf58c29.0",
29
29
  "globby": "^14.1.0"
30
30
  },
31
- "gitHead": "35e0b7190776e2dd12b6d5feca9f1d576f42c490"
31
+ "gitHead": "3cb1979bd40bb161f05dadc71693fcd805cf597e"
32
32
  }