@keystrokehq/segment 0.0.9 → 0.0.16-integration-id-canonicalization.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/README.md +52 -173
- package/dist/{client.mjs → client-DQfeZzLR.mjs} +28 -3
- package/dist/credential-sets/index.d.mts +2 -0
- package/dist/credential-sets/index.mjs +3 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +5 -1
- package/dist/operations/index.d.mts +2 -0
- package/dist/operations/index.mjs +3 -0
- package/dist/schemas/index.mjs +1 -1
- package/dist/segment.credential-set-BTTrkHO7.mjs +33 -0
- package/dist/{integration-CeShwMIi.d.mts → segment.credential-set-BgROtI_9.d.mts} +28 -37
- package/dist/{triggers.d.mts → triggers/index.d.mts} +72 -6
- package/dist/{triggers.mjs → triggers/index.mjs} +136 -7
- package/dist/workspace-list-spaces.operation-DKWX3vl5.mjs +5200 -0
- package/dist/workspace-list-spaces.operation-QbDIgfRG.d.mts +6548 -0
- package/package.json +11 -123
- package/dist/_official/index.d.mts +0 -2
- package/dist/_official/index.mjs +0 -3
- package/dist/_runtime/index.d.mts +0 -1
- package/dist/_runtime/index.mjs +0 -1
- package/dist/audiences.d.mts +0 -282
- package/dist/audiences.mjs +0 -205
- package/dist/client.d.mts +0 -90
- package/dist/computed-traits.d.mts +0 -215
- package/dist/computed-traits.mjs +0 -149
- package/dist/connection.d.mts +0 -2
- package/dist/connection.mjs +0 -3
- package/dist/crud-DV9e4Spi.mjs +0 -140
- package/dist/deletion-suppression.d.mts +0 -191
- package/dist/deletion-suppression.mjs +0 -103
- package/dist/delivery-overview.d.mts +0 -79
- package/dist/delivery-overview.mjs +0 -54
- package/dist/destination-filters.d.mts +0 -190
- package/dist/destination-filters.mjs +0 -115
- package/dist/destinations.d.mts +0 -473
- package/dist/destinations.mjs +0 -257
- package/dist/edge-functions.d.mts +0 -168
- package/dist/edge-functions.mjs +0 -72
- package/dist/errors-4FGnrowW.mjs +0 -27
- package/dist/events-catalog.d.mts +0 -111
- package/dist/events-catalog.mjs +0 -65
- package/dist/events.d.mts +0 -167
- package/dist/events.mjs +0 -134
- package/dist/factory-DRwj5eiU.mjs +0 -7
- package/dist/functions.d.mts +0 -347
- package/dist/functions.mjs +0 -180
- package/dist/iam-groups.d.mts +0 -284
- package/dist/iam-groups.mjs +0 -144
- package/dist/iam-users.d.mts +0 -205
- package/dist/iam-users.mjs +0 -91
- package/dist/integration-B9FOjHPc.mjs +0 -115
- package/dist/labels.d.mts +0 -100
- package/dist/labels.mjs +0 -58
- package/dist/monitoring.d.mts +0 -182
- package/dist/monitoring.mjs +0 -88
- package/dist/profiles-sync.d.mts +0 -127
- package/dist/profiles-sync.mjs +0 -89
- package/dist/profiles.d.mts +0 -197
- package/dist/profiles.mjs +0 -137
- package/dist/reverse-etl.d.mts +0 -448
- package/dist/reverse-etl.mjs +0 -228
- package/dist/roles.d.mts +0 -48
- package/dist/roles.mjs +0 -25
- package/dist/sources.d.mts +0 -560
- package/dist/sources.mjs +0 -259
- package/dist/tracking-plans.d.mts +0 -351
- package/dist/tracking-plans.mjs +0 -160
- package/dist/tracking.d.mts +0 -499
- package/dist/tracking.mjs +0 -255
- package/dist/transformations.d.mts +0 -188
- package/dist/transformations.mjs +0 -83
- package/dist/usage.d.mts +0 -70
- package/dist/usage.mjs +0 -55
- package/dist/verification.d.mts +0 -17
- package/dist/verification.mjs +0 -51
- package/dist/warehouses.d.mts +0 -341
- package/dist/warehouses.mjs +0 -176
- package/dist/workspaces.d.mts +0 -95
- package/dist/workspaces.mjs +0 -67
- /package/dist/{common-CdGiJbjq.mjs → common-DUU0airJ.mjs} +0 -0
package/dist/events-catalog.mjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { a as segmentLooseObjectSchema } from "./common-CdGiJbjq.mjs";
|
|
2
|
-
import { n as crudList } from "./crud-DV9e4Spi.mjs";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
|
|
5
|
-
//#region src/events-catalog.ts
|
|
6
|
-
/**
|
|
7
|
-
* segment/events-catalog.ts — workspace-wide event volume/violations/schema.
|
|
8
|
-
* 3 actions (PLAN § 6.16).
|
|
9
|
-
*/
|
|
10
|
-
const eventVolumeSchema = segmentLooseObjectSchema({
|
|
11
|
-
sourceId: z.string().optional(),
|
|
12
|
-
date: z.string().optional(),
|
|
13
|
-
eventName: z.string().optional(),
|
|
14
|
-
count: z.number().optional()
|
|
15
|
-
});
|
|
16
|
-
const eventViolationSchema = segmentLooseObjectSchema({
|
|
17
|
-
eventName: z.string().optional(),
|
|
18
|
-
violationCount: z.number().optional(),
|
|
19
|
-
sourceId: z.string().optional(),
|
|
20
|
-
trackingPlanId: z.string().optional()
|
|
21
|
-
});
|
|
22
|
-
const eventSchemaEntry = segmentLooseObjectSchema({
|
|
23
|
-
eventName: z.string().optional(),
|
|
24
|
-
schema: z.record(z.string(), z.unknown()).optional(),
|
|
25
|
-
sourceId: z.string().optional()
|
|
26
|
-
});
|
|
27
|
-
const listEventVolume = crudList({
|
|
28
|
-
id: "segment.events.listVolume",
|
|
29
|
-
name: "List event volume",
|
|
30
|
-
description: "Workspace event volume per source/event/day.",
|
|
31
|
-
path: "/events/volume",
|
|
32
|
-
itemsKey: "volume",
|
|
33
|
-
item: eventVolumeSchema,
|
|
34
|
-
extraInput: {
|
|
35
|
-
startTime: z.iso.datetime({ offset: true }).optional(),
|
|
36
|
-
endTime: z.iso.datetime({ offset: true }).optional(),
|
|
37
|
-
sourceId: z.string().optional()
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
const listEventViolations = crudList({
|
|
41
|
-
id: "segment.events.listViolations",
|
|
42
|
-
name: "List event violations",
|
|
43
|
-
description: "Tracking-plan violations observed workspace-wide.",
|
|
44
|
-
path: "/events/violations",
|
|
45
|
-
itemsKey: "violations",
|
|
46
|
-
item: eventViolationSchema,
|
|
47
|
-
extraInput: {
|
|
48
|
-
startTime: z.iso.datetime({ offset: true }).optional(),
|
|
49
|
-
endTime: z.iso.datetime({ offset: true }).optional(),
|
|
50
|
-
sourceId: z.string().optional(),
|
|
51
|
-
trackingPlanId: z.string().optional()
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
const listEventSchema = crudList({
|
|
55
|
-
id: "segment.events.listSchema",
|
|
56
|
-
name: "List event schema",
|
|
57
|
-
description: "Inferred event schema per source.",
|
|
58
|
-
path: "/events/schema",
|
|
59
|
-
itemsKey: "schema",
|
|
60
|
-
item: eventSchemaEntry,
|
|
61
|
-
extraInput: { sourceId: z.string().optional() }
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
//#endregion
|
|
65
|
-
export { listEventSchema, listEventViolations, listEventVolume };
|
package/dist/events.d.mts
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
//#region src/events.d.ts
|
|
4
|
-
/** Loose envelope a Segment Webhook destination delivers for Engage
|
|
5
|
-
* audiences: the destination wraps the Engage event as a Segment "track"
|
|
6
|
-
* call with properties carrying audience state. */
|
|
7
|
-
declare const segmentAudienceWebhookEnvelopeSchema: z.ZodObject<{
|
|
8
|
-
type: z.ZodOptional<z.ZodString>;
|
|
9
|
-
event: z.ZodOptional<z.ZodString>;
|
|
10
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
11
|
-
anonymousId: z.ZodOptional<z.ZodString>;
|
|
12
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
13
|
-
timestamp: z.ZodOptional<z.ZodString>;
|
|
14
|
-
traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
15
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
16
|
-
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
17
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
18
|
-
/** Monitoring alert webhook envelope (fired for delivery-failure spikes,
|
|
19
|
-
* function invocation errors, etc.). */
|
|
20
|
-
declare const segmentMonitoringAlertEnvelopeSchema: z.ZodObject<{
|
|
21
|
-
id: z.ZodOptional<z.ZodString>;
|
|
22
|
-
subscriptionId: z.ZodOptional<z.ZodString>;
|
|
23
|
-
eventType: z.ZodOptional<z.ZodString>;
|
|
24
|
-
severity: z.ZodOptional<z.ZodString>;
|
|
25
|
-
firedAt: z.ZodOptional<z.ZodString>;
|
|
26
|
-
message: z.ZodOptional<z.ZodString>;
|
|
27
|
-
sourceId: z.ZodOptional<z.ZodString>;
|
|
28
|
-
destinationId: z.ZodOptional<z.ZodString>;
|
|
29
|
-
functionId: z.ZodOptional<z.ZodString>;
|
|
30
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
31
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
32
|
-
declare const segmentAudienceEventSchema: z.ZodObject<{
|
|
33
|
-
type: z.ZodEnum<{
|
|
34
|
-
entered: "entered";
|
|
35
|
-
exited: "exited";
|
|
36
|
-
}>;
|
|
37
|
-
audienceKey: z.ZodString;
|
|
38
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
39
|
-
anonymousId: z.ZodOptional<z.ZodString>;
|
|
40
|
-
profileId: z.ZodOptional<z.ZodString>;
|
|
41
|
-
traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
42
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
43
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
44
|
-
timestamp: z.ZodOptional<z.ZodString>;
|
|
45
|
-
raw: z.ZodObject<{
|
|
46
|
-
type: z.ZodOptional<z.ZodString>;
|
|
47
|
-
event: z.ZodOptional<z.ZodString>;
|
|
48
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
49
|
-
anonymousId: z.ZodOptional<z.ZodString>;
|
|
50
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
51
|
-
timestamp: z.ZodOptional<z.ZodString>;
|
|
52
|
-
traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
53
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
54
|
-
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
55
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
56
|
-
}, z.core.$strip>;
|
|
57
|
-
type SegmentAudienceEvent = z.infer<typeof segmentAudienceEventSchema>;
|
|
58
|
-
declare const segmentComputedTraitEventSchema: z.ZodObject<{
|
|
59
|
-
traitKey: z.ZodString;
|
|
60
|
-
value: z.ZodUnknown;
|
|
61
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
62
|
-
profileId: z.ZodOptional<z.ZodString>;
|
|
63
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
64
|
-
timestamp: z.ZodOptional<z.ZodString>;
|
|
65
|
-
raw: z.ZodObject<{
|
|
66
|
-
type: z.ZodOptional<z.ZodString>;
|
|
67
|
-
event: z.ZodOptional<z.ZodString>;
|
|
68
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
69
|
-
anonymousId: z.ZodOptional<z.ZodString>;
|
|
70
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
71
|
-
timestamp: z.ZodOptional<z.ZodString>;
|
|
72
|
-
traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
73
|
-
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
74
|
-
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
75
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
76
|
-
}, z.core.$strip>;
|
|
77
|
-
type SegmentComputedTraitEvent = z.infer<typeof segmentComputedTraitEventSchema>;
|
|
78
|
-
declare const segmentMonitoringEventSchema: z.ZodObject<{
|
|
79
|
-
alertId: z.ZodString;
|
|
80
|
-
eventType: z.ZodString;
|
|
81
|
-
severity: z.ZodOptional<z.ZodString>;
|
|
82
|
-
firedAt: z.ZodOptional<z.ZodString>;
|
|
83
|
-
sourceId: z.ZodOptional<z.ZodString>;
|
|
84
|
-
destinationId: z.ZodOptional<z.ZodString>;
|
|
85
|
-
functionId: z.ZodOptional<z.ZodString>;
|
|
86
|
-
message: z.ZodOptional<z.ZodString>;
|
|
87
|
-
raw: z.ZodObject<{
|
|
88
|
-
id: z.ZodOptional<z.ZodString>;
|
|
89
|
-
subscriptionId: z.ZodOptional<z.ZodString>;
|
|
90
|
-
eventType: z.ZodOptional<z.ZodString>;
|
|
91
|
-
severity: z.ZodOptional<z.ZodString>;
|
|
92
|
-
firedAt: z.ZodOptional<z.ZodString>;
|
|
93
|
-
message: z.ZodOptional<z.ZodString>;
|
|
94
|
-
sourceId: z.ZodOptional<z.ZodString>;
|
|
95
|
-
destinationId: z.ZodOptional<z.ZodString>;
|
|
96
|
-
functionId: z.ZodOptional<z.ZodString>;
|
|
97
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
98
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
99
|
-
}, z.core.$strip>;
|
|
100
|
-
type SegmentMonitoringEvent = z.infer<typeof segmentMonitoringEventSchema>;
|
|
101
|
-
declare const segmentReverseEtlRunEventSchema: z.ZodObject<{
|
|
102
|
-
runId: z.ZodString;
|
|
103
|
-
modelId: z.ZodString;
|
|
104
|
-
status: z.ZodEnum<{
|
|
105
|
-
IN_PROGRESS: "IN_PROGRESS";
|
|
106
|
-
SUCCEEDED: "SUCCEEDED";
|
|
107
|
-
FAILED: "FAILED";
|
|
108
|
-
}>;
|
|
109
|
-
startedAt: z.ZodOptional<z.ZodString>;
|
|
110
|
-
finishedAt: z.ZodOptional<z.ZodString>;
|
|
111
|
-
error: z.ZodOptional<z.ZodString>;
|
|
112
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
113
|
-
}, z.core.$strip>;
|
|
114
|
-
type SegmentReverseEtlRunEvent = z.infer<typeof segmentReverseEtlRunEventSchema>;
|
|
115
|
-
declare const segmentFunctionVersionEventSchema: z.ZodObject<{
|
|
116
|
-
functionId: z.ZodString;
|
|
117
|
-
versionId: z.ZodString;
|
|
118
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
119
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
120
|
-
}, z.core.$strip>;
|
|
121
|
-
type SegmentFunctionVersionEvent = z.infer<typeof segmentFunctionVersionEventSchema>;
|
|
122
|
-
declare const segmentAudienceSyncEventSchema: z.ZodObject<{
|
|
123
|
-
syncId: z.ZodString;
|
|
124
|
-
audienceId: z.ZodString;
|
|
125
|
-
spaceId: z.ZodString;
|
|
126
|
-
status: z.ZodEnum<{
|
|
127
|
-
success: "success";
|
|
128
|
-
partial: "partial";
|
|
129
|
-
failed: "failed";
|
|
130
|
-
}>;
|
|
131
|
-
finishedAt: z.ZodOptional<z.ZodString>;
|
|
132
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
133
|
-
}, z.core.$strip>;
|
|
134
|
-
type SegmentAudienceSyncEvent = z.infer<typeof segmentAudienceSyncEventSchema>;
|
|
135
|
-
declare const segmentSourceCreatedEventSchema: z.ZodObject<{
|
|
136
|
-
sourceId: z.ZodString;
|
|
137
|
-
name: z.ZodOptional<z.ZodString>;
|
|
138
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
139
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
140
|
-
}, z.core.$strip>;
|
|
141
|
-
type SegmentSourceCreatedEvent = z.infer<typeof segmentSourceCreatedEventSchema>;
|
|
142
|
-
declare const segmentDestinationCreatedEventSchema: z.ZodObject<{
|
|
143
|
-
destinationId: z.ZodString;
|
|
144
|
-
name: z.ZodOptional<z.ZodString>;
|
|
145
|
-
sourceId: z.ZodOptional<z.ZodString>;
|
|
146
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
147
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
148
|
-
}, z.core.$strip>;
|
|
149
|
-
type SegmentDestinationCreatedEvent = z.infer<typeof segmentDestinationCreatedEventSchema>;
|
|
150
|
-
declare const segmentTrackingPlanViolationEventSchema: z.ZodObject<{
|
|
151
|
-
violationId: z.ZodString;
|
|
152
|
-
eventName: z.ZodOptional<z.ZodString>;
|
|
153
|
-
trackingPlanId: z.ZodOptional<z.ZodString>;
|
|
154
|
-
sourceId: z.ZodOptional<z.ZodString>;
|
|
155
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
156
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
157
|
-
}, z.core.$strip>;
|
|
158
|
-
type SegmentTrackingPlanViolationEvent = z.infer<typeof segmentTrackingPlanViolationEventSchema>;
|
|
159
|
-
declare const segmentDeletionRegulationEventSchema: z.ZodObject<{
|
|
160
|
-
regulationId: z.ZodString;
|
|
161
|
-
regulationType: z.ZodOptional<z.ZodString>;
|
|
162
|
-
finishedAt: z.ZodOptional<z.ZodString>;
|
|
163
|
-
raw: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
164
|
-
}, z.core.$strip>;
|
|
165
|
-
type SegmentDeletionRegulationEvent = z.infer<typeof segmentDeletionRegulationEventSchema>;
|
|
166
|
-
//#endregion
|
|
167
|
-
export { SegmentAudienceEvent, SegmentAudienceSyncEvent, SegmentComputedTraitEvent, SegmentDeletionRegulationEvent, SegmentDestinationCreatedEvent, SegmentFunctionVersionEvent, SegmentMonitoringEvent, SegmentReverseEtlRunEvent, SegmentSourceCreatedEvent, SegmentTrackingPlanViolationEvent, segmentAudienceEventSchema, segmentAudienceSyncEventSchema, segmentAudienceWebhookEnvelopeSchema, segmentComputedTraitEventSchema, segmentDeletionRegulationEventSchema, segmentDestinationCreatedEventSchema, segmentFunctionVersionEventSchema, segmentMonitoringAlertEnvelopeSchema, segmentMonitoringEventSchema, segmentReverseEtlRunEventSchema, segmentSourceCreatedEventSchema, segmentTrackingPlanViolationEventSchema };
|
package/dist/events.mjs
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { a as segmentLooseObjectSchema } from "./common-CdGiJbjq.mjs";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//#region src/events.ts
|
|
5
|
-
/**
|
|
6
|
-
* segment/events.ts
|
|
7
|
-
*
|
|
8
|
-
* Curated trigger-event schemas. Segment does not publish a unified webhook
|
|
9
|
-
* event catalog — each destination shape (Webhook destination, Monitoring
|
|
10
|
-
* alert webhook, Functions runtime webhook) carries its own body. We define
|
|
11
|
-
* the author-visible shapes here and parse the raw payload into them in
|
|
12
|
-
* `triggers.ts`.
|
|
13
|
-
*/
|
|
14
|
-
/** Loose envelope a Segment Webhook destination delivers for Engage
|
|
15
|
-
* audiences: the destination wraps the Engage event as a Segment "track"
|
|
16
|
-
* call with properties carrying audience state. */
|
|
17
|
-
const segmentAudienceWebhookEnvelopeSchema = segmentLooseObjectSchema({
|
|
18
|
-
type: z.string().optional(),
|
|
19
|
-
event: z.string().optional(),
|
|
20
|
-
userId: z.string().optional(),
|
|
21
|
-
anonymousId: z.string().optional(),
|
|
22
|
-
messageId: z.string().optional(),
|
|
23
|
-
timestamp: z.string().optional(),
|
|
24
|
-
traits: z.record(z.string(), z.unknown()).optional(),
|
|
25
|
-
properties: z.record(z.string(), z.unknown()).optional(),
|
|
26
|
-
context: z.record(z.string(), z.unknown()).optional()
|
|
27
|
-
});
|
|
28
|
-
/** Monitoring alert webhook envelope (fired for delivery-failure spikes,
|
|
29
|
-
* function invocation errors, etc.). */
|
|
30
|
-
const segmentMonitoringAlertEnvelopeSchema = segmentLooseObjectSchema({
|
|
31
|
-
id: z.string().optional(),
|
|
32
|
-
subscriptionId: z.string().optional(),
|
|
33
|
-
eventType: z.string().optional(),
|
|
34
|
-
severity: z.string().optional(),
|
|
35
|
-
firedAt: z.string().optional(),
|
|
36
|
-
message: z.string().optional(),
|
|
37
|
-
sourceId: z.string().optional(),
|
|
38
|
-
destinationId: z.string().optional(),
|
|
39
|
-
functionId: z.string().optional(),
|
|
40
|
-
metadata: z.record(z.string(), z.unknown()).optional()
|
|
41
|
-
});
|
|
42
|
-
const segmentAudienceEventSchema = z.object({
|
|
43
|
-
type: z.enum(["entered", "exited"]),
|
|
44
|
-
audienceKey: z.string(),
|
|
45
|
-
userId: z.string().optional(),
|
|
46
|
-
anonymousId: z.string().optional(),
|
|
47
|
-
profileId: z.string().optional(),
|
|
48
|
-
traits: z.record(z.string(), z.unknown()).optional(),
|
|
49
|
-
properties: z.record(z.string(), z.unknown()).optional(),
|
|
50
|
-
messageId: z.string().optional(),
|
|
51
|
-
timestamp: z.string().optional(),
|
|
52
|
-
raw: segmentAudienceWebhookEnvelopeSchema
|
|
53
|
-
});
|
|
54
|
-
const segmentComputedTraitEventSchema = z.object({
|
|
55
|
-
traitKey: z.string(),
|
|
56
|
-
value: z.unknown(),
|
|
57
|
-
userId: z.string().optional(),
|
|
58
|
-
profileId: z.string().optional(),
|
|
59
|
-
messageId: z.string().optional(),
|
|
60
|
-
timestamp: z.string().optional(),
|
|
61
|
-
raw: segmentAudienceWebhookEnvelopeSchema
|
|
62
|
-
});
|
|
63
|
-
const segmentMonitoringEventSchema = z.object({
|
|
64
|
-
alertId: z.string(),
|
|
65
|
-
eventType: z.string(),
|
|
66
|
-
severity: z.string().optional(),
|
|
67
|
-
firedAt: z.string().optional(),
|
|
68
|
-
sourceId: z.string().optional(),
|
|
69
|
-
destinationId: z.string().optional(),
|
|
70
|
-
functionId: z.string().optional(),
|
|
71
|
-
message: z.string().optional(),
|
|
72
|
-
raw: segmentMonitoringAlertEnvelopeSchema
|
|
73
|
-
});
|
|
74
|
-
const segmentReverseEtlRunEventSchema = z.object({
|
|
75
|
-
runId: z.string(),
|
|
76
|
-
modelId: z.string(),
|
|
77
|
-
status: z.enum([
|
|
78
|
-
"IN_PROGRESS",
|
|
79
|
-
"SUCCEEDED",
|
|
80
|
-
"FAILED"
|
|
81
|
-
]),
|
|
82
|
-
startedAt: z.string().optional(),
|
|
83
|
-
finishedAt: z.string().optional(),
|
|
84
|
-
error: z.string().optional(),
|
|
85
|
-
raw: z.record(z.string(), z.unknown())
|
|
86
|
-
});
|
|
87
|
-
const segmentFunctionVersionEventSchema = z.object({
|
|
88
|
-
functionId: z.string(),
|
|
89
|
-
versionId: z.string(),
|
|
90
|
-
createdAt: z.string().optional(),
|
|
91
|
-
raw: z.record(z.string(), z.unknown())
|
|
92
|
-
});
|
|
93
|
-
const segmentAudienceSyncEventSchema = z.object({
|
|
94
|
-
syncId: z.string(),
|
|
95
|
-
audienceId: z.string(),
|
|
96
|
-
spaceId: z.string(),
|
|
97
|
-
status: z.enum([
|
|
98
|
-
"success",
|
|
99
|
-
"partial",
|
|
100
|
-
"failed"
|
|
101
|
-
]),
|
|
102
|
-
finishedAt: z.string().optional(),
|
|
103
|
-
raw: z.record(z.string(), z.unknown())
|
|
104
|
-
});
|
|
105
|
-
const segmentSourceCreatedEventSchema = z.object({
|
|
106
|
-
sourceId: z.string(),
|
|
107
|
-
name: z.string().optional(),
|
|
108
|
-
createdAt: z.string().optional(),
|
|
109
|
-
raw: z.record(z.string(), z.unknown())
|
|
110
|
-
});
|
|
111
|
-
const segmentDestinationCreatedEventSchema = z.object({
|
|
112
|
-
destinationId: z.string(),
|
|
113
|
-
name: z.string().optional(),
|
|
114
|
-
sourceId: z.string().optional(),
|
|
115
|
-
createdAt: z.string().optional(),
|
|
116
|
-
raw: z.record(z.string(), z.unknown())
|
|
117
|
-
});
|
|
118
|
-
const segmentTrackingPlanViolationEventSchema = z.object({
|
|
119
|
-
violationId: z.string(),
|
|
120
|
-
eventName: z.string().optional(),
|
|
121
|
-
trackingPlanId: z.string().optional(),
|
|
122
|
-
sourceId: z.string().optional(),
|
|
123
|
-
messageId: z.string().optional(),
|
|
124
|
-
raw: z.record(z.string(), z.unknown())
|
|
125
|
-
});
|
|
126
|
-
const segmentDeletionRegulationEventSchema = z.object({
|
|
127
|
-
regulationId: z.string(),
|
|
128
|
-
regulationType: z.string().optional(),
|
|
129
|
-
finishedAt: z.string().optional(),
|
|
130
|
-
raw: z.record(z.string(), z.unknown())
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
//#endregion
|
|
134
|
-
export { segmentAudienceEventSchema, segmentAudienceSyncEventSchema, segmentAudienceWebhookEnvelopeSchema, segmentComputedTraitEventSchema, segmentDeletionRegulationEventSchema, segmentDestinationCreatedEventSchema, segmentFunctionVersionEventSchema, segmentMonitoringAlertEnvelopeSchema, segmentMonitoringEventSchema, segmentReverseEtlRunEventSchema, segmentSourceCreatedEventSchema, segmentTrackingPlanViolationEventSchema };
|