Coverage for mindsdb / integrations / handlers / shopify_handler / models / marketing_events.py: 0%
18 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
1from .common import AliasesEnum
4class MarketingEvents(AliasesEnum):
5 """A class to represent a Shopify GraphQL marketing event.
6 Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketingEvent
7 Require `read_marketing_events` permission.
8 """
10 # app = "app"
11 channelHandle = "channelHandle"
12 description = "description"
13 endedAt = "endedAt"
14 id = "id"
15 # legacyResourceId = "legacyResourceId"
16 manageUrl = "manageUrl"
17 marketingChannelType = "marketingChannelType"
18 previewUrl = "previewUrl"
19 remoteId = "remoteId"
20 scheduledToEndAt = "scheduledToEndAt"
21 sourceAndMedium = "sourceAndMedium"
22 startedAt = "startedAt"
23 type = "type"
24 utmCampaign = "utmCampaign"
25 utmMedium = "utmMedium"
26 utmSource = "utmSource"
29columns = [
30 # {
31 # "TABLE_NAME": "marketing_events",
32 # "COLUMN_NAME": "app",
33 # "DATA_TYPE": "JSON",
34 # "COLUMN_DESCRIPTION": "The app that the marketing event is attributed to.",
35 # "IS_NULLABLE": False
36 # },
37 {
38 "TABLE_NAME": "marketing_events",
39 "COLUMN_NAME": "channelHandle",
40 "DATA_TYPE": "TEXT",
41 "COLUMN_DESCRIPTION": "The unique string identifier of the channel to which this activity belongs. For the correct handle for your channel, contact your partner manager.",
42 "IS_NULLABLE": None,
43 },
44 {
45 "TABLE_NAME": "marketing_events",
46 "COLUMN_NAME": "description",
47 "DATA_TYPE": "TEXT",
48 "COLUMN_DESCRIPTION": "A human-readable description of the marketing event.",
49 "IS_NULLABLE": None,
50 },
51 {
52 "TABLE_NAME": "marketing_events",
53 "COLUMN_NAME": "endedAt",
54 "DATA_TYPE": "TIMESTAMP",
55 "COLUMN_DESCRIPTION": "The date and time when the marketing event ended.",
56 "IS_NULLABLE": None,
57 },
58 {
59 "TABLE_NAME": "marketing_events",
60 "COLUMN_NAME": "id",
61 "DATA_TYPE": "TEXT",
62 "COLUMN_DESCRIPTION": "A globally-unique ID.",
63 "IS_NULLABLE": False,
64 },
65 # {
66 # "TABLE_NAME": "marketing_events",
67 # "COLUMN_NAME": "legacyResourceId",
68 # "DATA_TYPE": "INT",
69 # "COLUMN_DESCRIPTION": "The ID of the corresponding resource in the REST Admin API.",
70 # "IS_NULLABLE": False
71 # },
72 {
73 "TABLE_NAME": "marketing_events",
74 "COLUMN_NAME": "manageUrl",
75 "DATA_TYPE": "TEXT",
76 "COLUMN_DESCRIPTION": "The URL where the marketing event can be managed.",
77 "IS_NULLABLE": None,
78 },
79 {
80 "TABLE_NAME": "marketing_events",
81 "COLUMN_NAME": "marketingChannelType",
82 "DATA_TYPE": "TEXT",
83 "COLUMN_DESCRIPTION": "The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation.",
84 "IS_NULLABLE": None,
85 },
86 {
87 "TABLE_NAME": "marketing_events",
88 "COLUMN_NAME": "previewUrl",
89 "DATA_TYPE": "TEXT",
90 "COLUMN_DESCRIPTION": "The URL where the marketing event can be previewed.",
91 "IS_NULLABLE": None,
92 },
93 {
94 "TABLE_NAME": "marketing_events",
95 "COLUMN_NAME": "remoteId",
96 "DATA_TYPE": "TEXT",
97 "COLUMN_DESCRIPTION": "An optional ID that helps Shopify validate engagement data.",
98 "IS_NULLABLE": None,
99 },
100 {
101 "TABLE_NAME": "marketing_events",
102 "COLUMN_NAME": "scheduledToEndAt",
103 "DATA_TYPE": "TIMESTAMP",
104 "COLUMN_DESCRIPTION": "The date and time when the marketing event is scheduled to end.",
105 "IS_NULLABLE": None,
106 },
107 {
108 "TABLE_NAME": "marketing_events",
109 "COLUMN_NAME": "sourceAndMedium",
110 "DATA_TYPE": "TEXT",
111 "COLUMN_DESCRIPTION": "Where the MarketingEvent occurred and what kind of content was used. Because utmSource and utmMedium are often used interchangeably, this is based on a combination of marketingChannel, referringDomain, and type to provide a consistent representation for any given piece of marketing regardless of the app that created it.",
112 "IS_NULLABLE": False,
113 },
114 {
115 "TABLE_NAME": "marketing_events",
116 "COLUMN_NAME": "startedAt",
117 "DATA_TYPE": "TIMESTAMP",
118 "COLUMN_DESCRIPTION": "The date and time when the marketing event started.",
119 "IS_NULLABLE": False,
120 },
121 {
122 "TABLE_NAME": "marketing_events",
123 "COLUMN_NAME": "type",
124 "DATA_TYPE": "TEXT",
125 "COLUMN_DESCRIPTION": "The marketing event type.",
126 "IS_NULLABLE": False,
127 },
128 {
129 "TABLE_NAME": "marketing_events",
130 "COLUMN_NAME": "utmCampaign",
131 "DATA_TYPE": "TEXT",
132 "COLUMN_DESCRIPTION": "The name of the marketing campaign.",
133 "IS_NULLABLE": None,
134 },
135 {
136 "TABLE_NAME": "marketing_events",
137 "COLUMN_NAME": "utmMedium",
138 "DATA_TYPE": "TEXT",
139 "COLUMN_DESCRIPTION": "The medium that the marketing campaign is using. Example values: cpc, banner.",
140 "IS_NULLABLE": None,
141 },
142 {
143 "TABLE_NAME": "marketing_events",
144 "COLUMN_NAME": "utmSource",
145 "DATA_TYPE": "TEXT",
146 "COLUMN_DESCRIPTION": "The referrer of the marketing event. Example values: google, newsletter.",
147 "IS_NULLABLE": None,
148 },
149]