@segment/warehouse-destinations 1.0.1-staging-dbf70accf.0 → 1.1.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.
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
timestamp: string;
|
|
3
2
|
messageId: string;
|
|
4
3
|
event: string;
|
|
5
4
|
type: string;
|
|
6
5
|
properties: {
|
|
7
6
|
[k: string]: unknown;
|
|
8
7
|
};
|
|
8
|
+
timestamp: string | number;
|
|
9
|
+
originalTimestamp: string | number;
|
|
10
|
+
sentAt?: string | number;
|
|
11
|
+
receivedAt?: string | number;
|
|
9
12
|
}
|
|
@@ -4,13 +4,6 @@ const action = {
|
|
|
4
4
|
title: 'Send Custom Event',
|
|
5
5
|
description: 'Record custom events in Snowflake',
|
|
6
6
|
fields: {
|
|
7
|
-
timestamp: {
|
|
8
|
-
label: 'Timestamp',
|
|
9
|
-
description: 'Timestamp of the event',
|
|
10
|
-
type: 'string',
|
|
11
|
-
required: true,
|
|
12
|
-
default: { '@path': '$.timestamp' }
|
|
13
|
-
},
|
|
14
7
|
messageId: {
|
|
15
8
|
label: 'Message ID',
|
|
16
9
|
description: 'Name of column for the unique identifier for the message.',
|
|
@@ -43,7 +36,7 @@ const action = {
|
|
|
43
36
|
required: true,
|
|
44
37
|
additionalProperties: true,
|
|
45
38
|
default: {
|
|
46
|
-
|
|
39
|
+
entity_context: {
|
|
47
40
|
'@json': {
|
|
48
41
|
mode: 'encode',
|
|
49
42
|
value: {
|
|
@@ -51,43 +44,41 @@ const action = {
|
|
|
51
44
|
}
|
|
52
45
|
}
|
|
53
46
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
audienceKey: {
|
|
61
|
-
label: 'Audience Key',
|
|
62
|
-
description: 'The Kky of the audience.',
|
|
63
|
-
type: 'string',
|
|
64
|
-
default: { '@path': '$.properties.audience_key' }
|
|
65
|
-
},
|
|
66
|
-
personasComputationKey: {
|
|
67
|
-
label: 'Personas Computation Key',
|
|
68
|
-
description: 'Computation key set by Segment Personas.',
|
|
69
|
-
type: 'string',
|
|
70
|
-
default: { '@path': '$.context.personas.computation_key' }
|
|
71
|
-
},
|
|
72
|
-
personasComputationId: {
|
|
73
|
-
label: 'Personas Computation ID',
|
|
74
|
-
description: 'Computation ID set by Segment Personas.',
|
|
75
|
-
type: 'string',
|
|
76
|
-
default: { '@path': '$.context.personas.computation_id' }
|
|
77
|
-
},
|
|
78
|
-
personasComputationRunId: {
|
|
79
|
-
label: 'Personas Computation Run ID',
|
|
80
|
-
description: 'Unique ID for this run, set by Segment Personas.',
|
|
81
|
-
type: 'string',
|
|
82
|
-
default: { '@path': '$.context.personas.computation_run_id' }
|
|
83
|
-
},
|
|
84
|
-
personasActivationId: {
|
|
85
|
-
label: 'Personas Activation ID',
|
|
86
|
-
description: 'ID of the activation, set by Segment Personas.',
|
|
87
|
-
type: 'string',
|
|
88
|
-
default: { '@path': '$.context.personas.event_emitter_id' }
|
|
89
|
-
}
|
|
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' }
|
|
90
53
|
}
|
|
54
|
+
},
|
|
55
|
+
timestamp: {
|
|
56
|
+
label: 'Timestamp',
|
|
57
|
+
description: 'Timestamp of the event',
|
|
58
|
+
type: 'datetime',
|
|
59
|
+
required: true,
|
|
60
|
+
default: { '@path': '$.timestamp' }
|
|
61
|
+
},
|
|
62
|
+
originalTimestamp: {
|
|
63
|
+
label: 'Original Timestamp',
|
|
64
|
+
description: 'Time on the client device when call was invoked.',
|
|
65
|
+
type: 'datetime',
|
|
66
|
+
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' }
|
|
75
|
+
},
|
|
76
|
+
receivedAt: {
|
|
77
|
+
label: 'Received At',
|
|
78
|
+
description: 'Time on Segment server clock when call was received.',
|
|
79
|
+
type: 'datetime',
|
|
80
|
+
required: false,
|
|
81
|
+
default: { '@path': '$.receivedAt' }
|
|
91
82
|
}
|
|
92
83
|
},
|
|
93
84
|
perform: () => {
|
|
@@ -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,
|
|
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,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,iDAAiD;YAC9D,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,E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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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segment/warehouse-destinations",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.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",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"@segment/actions-core": "^3.152.0",
|
|
29
29
|
"globby": "^14.1.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "d1d20f8750c257e4e5558ac1c5e3a76440092732"
|
|
32
32
|
}
|