@happyvertical/smrt-marketing 0.61.3 → 0.61.5
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/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +314 -160
- package/dist/models/Campaign.d.ts.map +1 -1
- package/dist/models/CampaignChannel.d.ts.map +1 -1
- package/dist/models/CampaignMetricSnapshot.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +5 -5
- package/package.json +7 -7
package/dist/manifest.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-marketing",
|
|
5
|
-
"packageVersion": "0.61.
|
|
5
|
+
"packageVersion": "0.61.5",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-marketing:CampaignChannelCollection": {
|
|
8
8
|
"name": "campaignchannelcollection",
|
|
9
9
|
"className": "CampaignChannelCollection",
|
|
10
10
|
"qualifiedName": "@happyvertical/smrt-marketing:CampaignChannelCollection",
|
|
11
11
|
"collection": "campaignchannels",
|
|
12
|
-
"filePath": "
|
|
12
|
+
"filePath": "src/collections/CampaignChannelCollection.ts",
|
|
13
13
|
"packageName": "@happyvertical/smrt-marketing",
|
|
14
14
|
"fields": {},
|
|
15
15
|
"methods": {
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"className": "CampaignCollection",
|
|
209
209
|
"qualifiedName": "@happyvertical/smrt-marketing:CampaignCollection",
|
|
210
210
|
"collection": "campaigns",
|
|
211
|
-
"filePath": "
|
|
211
|
+
"filePath": "src/collections/CampaignCollection.ts",
|
|
212
212
|
"packageName": "@happyvertical/smrt-marketing",
|
|
213
213
|
"fields": {},
|
|
214
214
|
"methods": {
|
|
@@ -428,7 +428,7 @@
|
|
|
428
428
|
],
|
|
429
429
|
"schema": {
|
|
430
430
|
"tableName": "campaigns",
|
|
431
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"campaigns\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"campaign_key\" TEXT NOT NULL DEFAULT '',\n \"name\" TEXT
|
|
431
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"campaigns\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"campaign_key\" TEXT NOT NULL DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"objective\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'draft',\n \"start_at\" TIMESTAMP,\n \"end_at\" TIMESTAMP,\n \"budget_cents\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"metadata\" TEXT DEFAULT '{}'\n);",
|
|
432
432
|
"columns": {
|
|
433
433
|
"_sync_origin_device_id": {
|
|
434
434
|
"type": "TEXT"
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
},
|
|
482
482
|
"name": {
|
|
483
483
|
"type": "TEXT",
|
|
484
|
-
"notNull":
|
|
484
|
+
"notNull": false,
|
|
485
485
|
"unique": false,
|
|
486
486
|
"default": ""
|
|
487
487
|
},
|
|
@@ -566,7 +566,7 @@
|
|
|
566
566
|
]
|
|
567
567
|
}
|
|
568
568
|
],
|
|
569
|
-
"version": "
|
|
569
|
+
"version": "b9c3e76d"
|
|
570
570
|
},
|
|
571
571
|
"importPath": "@happyvertical/smrt-marketing"
|
|
572
572
|
},
|
|
@@ -575,7 +575,7 @@
|
|
|
575
575
|
"className": "CampaignMetricSnapshotCollection",
|
|
576
576
|
"qualifiedName": "@happyvertical/smrt-marketing:CampaignMetricSnapshotCollection",
|
|
577
577
|
"collection": "campaignmetricsnapshots",
|
|
578
|
-
"filePath": "
|
|
578
|
+
"filePath": "src/collections/CampaignMetricSnapshotCollection.ts",
|
|
579
579
|
"packageName": "@happyvertical/smrt-marketing",
|
|
580
580
|
"fields": {},
|
|
581
581
|
"methods": {
|
|
@@ -680,7 +680,7 @@
|
|
|
680
680
|
],
|
|
681
681
|
"schema": {
|
|
682
682
|
"tableName": "campaign_metric_snapshots",
|
|
683
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"campaign_metric_snapshots\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"campaign_id\" UUID NOT NULL,\n \"campaign_channel_id\" UUID,\n \"period_start\" TIMESTAMP NOT NULL,\n \"period_end\" TIMESTAMP NOT NULL,\n \"spend_cents\" INTEGER DEFAULT 0,\n \"impressions\" INTEGER DEFAULT 0,\n \"clicks\" INTEGER DEFAULT 0,\n \"conversions\" INTEGER DEFAULT 0,\n \"leads\" INTEGER DEFAULT 0,\n \"revenue_cents\" INTEGER,\n \"source\" TEXT
|
|
683
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"campaign_metric_snapshots\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"campaign_id\" UUID NOT NULL,\n \"campaign_channel_id\" UUID,\n \"period_start\" TIMESTAMP NOT NULL,\n \"period_end\" TIMESTAMP NOT NULL,\n \"spend_cents\" INTEGER DEFAULT 0,\n \"impressions\" INTEGER DEFAULT 0,\n \"clicks\" INTEGER DEFAULT 0,\n \"conversions\" INTEGER DEFAULT 0,\n \"leads\" INTEGER DEFAULT 0,\n \"revenue_cents\" INTEGER,\n \"source\" TEXT DEFAULT '',\n \"dedupe_key\" TEXT NOT NULL DEFAULT ''\n);",
|
|
684
684
|
"columns": {
|
|
685
685
|
"_sync_origin_device_id": {
|
|
686
686
|
"type": "TEXT"
|
|
@@ -790,7 +790,7 @@
|
|
|
790
790
|
},
|
|
791
791
|
"source": {
|
|
792
792
|
"type": "TEXT",
|
|
793
|
-
"notNull":
|
|
793
|
+
"notNull": false,
|
|
794
794
|
"unique": false,
|
|
795
795
|
"default": ""
|
|
796
796
|
},
|
|
@@ -838,7 +838,7 @@
|
|
|
838
838
|
]
|
|
839
839
|
}
|
|
840
840
|
],
|
|
841
|
-
"version": "
|
|
841
|
+
"version": "20d170ef"
|
|
842
842
|
},
|
|
843
843
|
"importPath": "@happyvertical/smrt-marketing"
|
|
844
844
|
},
|
|
@@ -847,15 +847,12 @@
|
|
|
847
847
|
"className": "Campaign",
|
|
848
848
|
"qualifiedName": "@happyvertical/smrt-marketing:Campaign",
|
|
849
849
|
"collection": "campaigns",
|
|
850
|
-
"filePath": "
|
|
850
|
+
"filePath": "src/models/Campaign.ts",
|
|
851
851
|
"packageName": "@happyvertical/smrt-marketing",
|
|
852
852
|
"fields": {
|
|
853
853
|
"tenantId": {
|
|
854
854
|
"type": "text",
|
|
855
|
-
"required": false,
|
|
856
855
|
"_meta": {
|
|
857
|
-
"sqlType": "UUID",
|
|
858
|
-
"nullable": true,
|
|
859
856
|
"__tenancy": {
|
|
860
857
|
"isTenantIdField": true,
|
|
861
858
|
"autoFilter": true,
|
|
@@ -865,94 +862,151 @@
|
|
|
865
862
|
"mode": "optional",
|
|
866
863
|
"field": "tenantId",
|
|
867
864
|
"allowSuperAdminBypass": false
|
|
868
|
-
}
|
|
869
|
-
|
|
865
|
+
},
|
|
866
|
+
"__statedOptions": [
|
|
867
|
+
"sqlType",
|
|
868
|
+
"nullable",
|
|
869
|
+
"__tenancy",
|
|
870
|
+
"required"
|
|
871
|
+
],
|
|
872
|
+
"sqlType": "UUID",
|
|
873
|
+
"nullable": true,
|
|
874
|
+
"required": false
|
|
875
|
+
},
|
|
876
|
+
"required": false
|
|
870
877
|
},
|
|
871
878
|
"customerId": {
|
|
872
879
|
"type": "crossPackageRef",
|
|
873
|
-
"required": false,
|
|
874
|
-
"related": "@happyvertical/smrt-commerce:Customer",
|
|
875
|
-
"description": "The customer this campaign is run for, if any.",
|
|
876
880
|
"_meta": {
|
|
881
|
+
"__statedOptions": [
|
|
882
|
+
"description",
|
|
883
|
+
"nullable",
|
|
884
|
+
"validate",
|
|
885
|
+
"related",
|
|
886
|
+
"required"
|
|
887
|
+
],
|
|
877
888
|
"description": "The customer this campaign is run for, if any.",
|
|
889
|
+
"nullable": true,
|
|
878
890
|
"validate": true,
|
|
879
|
-
"
|
|
880
|
-
}
|
|
891
|
+
"required": false
|
|
892
|
+
},
|
|
893
|
+
"required": false,
|
|
894
|
+
"related": "@happyvertical/smrt-commerce:Customer",
|
|
895
|
+
"description": "The customer this campaign is run for, if any."
|
|
881
896
|
},
|
|
882
897
|
"campaignKey": {
|
|
883
898
|
"type": "text",
|
|
884
|
-
"required": true,
|
|
885
|
-
"default": "",
|
|
886
|
-
"description": "A short reference of your own for this campaign, kept the same once it is in use.",
|
|
887
899
|
"_meta": {
|
|
900
|
+
"__statedOptions": [
|
|
901
|
+
"required",
|
|
902
|
+
"requiredFor",
|
|
903
|
+
"description",
|
|
904
|
+
"default"
|
|
905
|
+
],
|
|
888
906
|
"required": true,
|
|
889
|
-
"description": "A short reference of your own for this campaign, kept the same once it is in use."
|
|
890
|
-
|
|
907
|
+
"description": "A short reference of your own for this campaign, kept the same once it is in use.",
|
|
908
|
+
"requiredFor": "identity"
|
|
909
|
+
},
|
|
910
|
+
"required": true,
|
|
911
|
+
"default": "",
|
|
912
|
+
"description": "A short reference of your own for this campaign, kept the same once it is in use."
|
|
891
913
|
},
|
|
892
914
|
"name": {
|
|
893
915
|
"type": "text",
|
|
894
|
-
"required": true,
|
|
895
|
-
"default": "",
|
|
896
|
-
"description": "What the campaign is called.",
|
|
897
916
|
"_meta": {
|
|
898
|
-
"
|
|
917
|
+
"__statedOptions": [
|
|
918
|
+
"required",
|
|
919
|
+
"description",
|
|
920
|
+
"default"
|
|
921
|
+
],
|
|
922
|
+
"required": false,
|
|
899
923
|
"description": "What the campaign is called."
|
|
900
|
-
}
|
|
924
|
+
},
|
|
925
|
+
"required": false,
|
|
926
|
+
"default": "",
|
|
927
|
+
"description": "What the campaign is called."
|
|
901
928
|
},
|
|
902
929
|
"objective": {
|
|
903
930
|
"type": "text",
|
|
904
|
-
"required": false,
|
|
905
|
-
"default": "",
|
|
906
|
-
"description": "What the campaign is meant to achieve, such as awareness or new leads.",
|
|
907
931
|
"_meta": {
|
|
932
|
+
"__statedOptions": [
|
|
933
|
+
"description",
|
|
934
|
+
"default"
|
|
935
|
+
],
|
|
908
936
|
"description": "What the campaign is meant to achieve, such as awareness or new leads."
|
|
909
|
-
}
|
|
937
|
+
},
|
|
938
|
+
"required": false,
|
|
939
|
+
"default": "",
|
|
940
|
+
"description": "What the campaign is meant to achieve, such as awareness or new leads."
|
|
910
941
|
},
|
|
911
942
|
"status": {
|
|
912
943
|
"type": "text",
|
|
913
|
-
"required": false,
|
|
914
|
-
"default": "draft",
|
|
915
|
-
"description": "Where the campaign stands, from draft through active to completed and archived.",
|
|
916
944
|
"_meta": {
|
|
945
|
+
"__statedOptions": [
|
|
946
|
+
"description",
|
|
947
|
+
"default"
|
|
948
|
+
],
|
|
917
949
|
"description": "Where the campaign stands, from draft through active to completed and archived."
|
|
918
|
-
}
|
|
950
|
+
},
|
|
951
|
+
"required": false,
|
|
952
|
+
"default": "draft",
|
|
953
|
+
"description": "Where the campaign stands, from draft through active to completed and archived."
|
|
919
954
|
},
|
|
920
955
|
"startAt": {
|
|
921
956
|
"type": "datetime",
|
|
922
|
-
"required": false,
|
|
923
|
-
"description": "When the campaign starts.",
|
|
924
957
|
"_meta": {
|
|
958
|
+
"__statedOptions": [
|
|
959
|
+
"description"
|
|
960
|
+
],
|
|
925
961
|
"description": "When the campaign starts."
|
|
926
|
-
}
|
|
962
|
+
},
|
|
963
|
+
"required": false,
|
|
964
|
+
"description": "When the campaign starts."
|
|
927
965
|
},
|
|
928
966
|
"endAt": {
|
|
929
967
|
"type": "datetime",
|
|
930
|
-
"required": false,
|
|
931
|
-
"description": "When the campaign ends.",
|
|
932
968
|
"_meta": {
|
|
969
|
+
"__statedOptions": [
|
|
970
|
+
"description"
|
|
971
|
+
],
|
|
933
972
|
"description": "When the campaign ends."
|
|
934
|
-
}
|
|
973
|
+
},
|
|
974
|
+
"required": false,
|
|
975
|
+
"description": "When the campaign ends."
|
|
935
976
|
},
|
|
936
977
|
"budgetCents": {
|
|
937
978
|
"type": "integer",
|
|
938
|
-
"required": false,
|
|
939
|
-
"default": 0,
|
|
940
|
-
"description": "The total you plan to spend on the campaign, in cents.",
|
|
941
979
|
"_meta": {
|
|
980
|
+
"__statedOptions": [
|
|
981
|
+
"description",
|
|
982
|
+
"default"
|
|
983
|
+
],
|
|
942
984
|
"description": "The total you plan to spend on the campaign, in cents."
|
|
943
|
-
}
|
|
985
|
+
},
|
|
986
|
+
"required": false,
|
|
987
|
+
"default": 0,
|
|
988
|
+
"description": "The total you plan to spend on the campaign, in cents."
|
|
944
989
|
},
|
|
945
990
|
"currency": {
|
|
946
991
|
"type": "text",
|
|
947
|
-
"required": false,
|
|
948
|
-
"default": "USD",
|
|
949
|
-
"description": "The currency every amount on this campaign is in.",
|
|
950
992
|
"_meta": {
|
|
993
|
+
"__statedOptions": [
|
|
994
|
+
"description",
|
|
995
|
+
"default"
|
|
996
|
+
],
|
|
951
997
|
"description": "The currency every amount on this campaign is in."
|
|
952
|
-
}
|
|
998
|
+
},
|
|
999
|
+
"required": false,
|
|
1000
|
+
"default": "USD",
|
|
1001
|
+
"description": "The currency every amount on this campaign is in."
|
|
953
1002
|
},
|
|
954
1003
|
"metadata": {
|
|
955
1004
|
"type": "text",
|
|
1005
|
+
"_meta": {
|
|
1006
|
+
"__statedOptions": [
|
|
1007
|
+
"default"
|
|
1008
|
+
]
|
|
1009
|
+
},
|
|
956
1010
|
"required": false,
|
|
957
1011
|
"default": "{}"
|
|
958
1012
|
}
|
|
@@ -1071,16 +1125,11 @@
|
|
|
1071
1125
|
"field": "campaignKey",
|
|
1072
1126
|
"rule": "required",
|
|
1073
1127
|
"fieldType": "text"
|
|
1074
|
-
},
|
|
1075
|
-
{
|
|
1076
|
-
"field": "name",
|
|
1077
|
-
"rule": "required",
|
|
1078
|
-
"fieldType": "text"
|
|
1079
1128
|
}
|
|
1080
1129
|
],
|
|
1081
1130
|
"schema": {
|
|
1082
1131
|
"tableName": "campaigns",
|
|
1083
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"campaigns\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"campaign_key\" TEXT NOT NULL DEFAULT '',\n \"name\" TEXT
|
|
1132
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"campaigns\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"customer_id\" UUID,\n \"campaign_key\" TEXT NOT NULL DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"objective\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'draft',\n \"start_at\" TIMESTAMP,\n \"end_at\" TIMESTAMP,\n \"budget_cents\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"metadata\" TEXT DEFAULT '{}'\n);",
|
|
1084
1133
|
"columns": {
|
|
1085
1134
|
"_sync_origin_device_id": {
|
|
1086
1135
|
"type": "TEXT"
|
|
@@ -1133,7 +1182,7 @@
|
|
|
1133
1182
|
},
|
|
1134
1183
|
"name": {
|
|
1135
1184
|
"type": "TEXT",
|
|
1136
|
-
"notNull":
|
|
1185
|
+
"notNull": false,
|
|
1137
1186
|
"unique": false,
|
|
1138
1187
|
"default": ""
|
|
1139
1188
|
},
|
|
@@ -1218,7 +1267,7 @@
|
|
|
1218
1267
|
]
|
|
1219
1268
|
}
|
|
1220
1269
|
],
|
|
1221
|
-
"version": "
|
|
1270
|
+
"version": "b9c3e76d"
|
|
1222
1271
|
},
|
|
1223
1272
|
"importPath": "@happyvertical/smrt-marketing"
|
|
1224
1273
|
},
|
|
@@ -1227,15 +1276,12 @@
|
|
|
1227
1276
|
"className": "CampaignChannel",
|
|
1228
1277
|
"qualifiedName": "@happyvertical/smrt-marketing:CampaignChannel",
|
|
1229
1278
|
"collection": "campaignchannels",
|
|
1230
|
-
"filePath": "
|
|
1279
|
+
"filePath": "src/models/CampaignChannel.ts",
|
|
1231
1280
|
"packageName": "@happyvertical/smrt-marketing",
|
|
1232
1281
|
"fields": {
|
|
1233
1282
|
"tenantId": {
|
|
1234
1283
|
"type": "text",
|
|
1235
|
-
"required": false,
|
|
1236
1284
|
"_meta": {
|
|
1237
|
-
"sqlType": "UUID",
|
|
1238
|
-
"nullable": true,
|
|
1239
1285
|
"__tenancy": {
|
|
1240
1286
|
"isTenantIdField": true,
|
|
1241
1287
|
"autoFilter": true,
|
|
@@ -1245,72 +1291,117 @@
|
|
|
1245
1291
|
"mode": "optional",
|
|
1246
1292
|
"field": "tenantId",
|
|
1247
1293
|
"allowSuperAdminBypass": false
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1294
|
+
},
|
|
1295
|
+
"__statedOptions": [
|
|
1296
|
+
"sqlType",
|
|
1297
|
+
"nullable",
|
|
1298
|
+
"__tenancy",
|
|
1299
|
+
"required"
|
|
1300
|
+
],
|
|
1301
|
+
"sqlType": "UUID",
|
|
1302
|
+
"nullable": true,
|
|
1303
|
+
"required": false
|
|
1304
|
+
},
|
|
1305
|
+
"required": false
|
|
1250
1306
|
},
|
|
1251
1307
|
"campaignId": {
|
|
1252
1308
|
"type": "foreignKey",
|
|
1253
|
-
"required": true,
|
|
1254
|
-
"related": "Campaign",
|
|
1255
|
-
"description": "The campaign this channel runs for.",
|
|
1256
1309
|
"_meta": {
|
|
1310
|
+
"__statedOptions": [
|
|
1311
|
+
"description",
|
|
1312
|
+
"required",
|
|
1313
|
+
"requiredFor",
|
|
1314
|
+
"related"
|
|
1315
|
+
],
|
|
1316
|
+
"required": true,
|
|
1257
1317
|
"description": "The campaign this channel runs for.",
|
|
1258
|
-
"
|
|
1259
|
-
}
|
|
1318
|
+
"requiredFor": "identity"
|
|
1319
|
+
},
|
|
1320
|
+
"required": true,
|
|
1321
|
+
"related": "Campaign",
|
|
1322
|
+
"description": "The campaign this channel runs for."
|
|
1260
1323
|
},
|
|
1261
1324
|
"channelKind": {
|
|
1262
1325
|
"type": "text",
|
|
1263
|
-
"required": true,
|
|
1264
|
-
"default": "",
|
|
1265
|
-
"description": "What sort of channel this is, such as an ad group, a social post, a message, content or an event.",
|
|
1266
1326
|
"_meta": {
|
|
1327
|
+
"__statedOptions": [
|
|
1328
|
+
"required",
|
|
1329
|
+
"requiredFor",
|
|
1330
|
+
"description",
|
|
1331
|
+
"default"
|
|
1332
|
+
],
|
|
1267
1333
|
"required": true,
|
|
1268
|
-
"description": "What sort of channel this is, such as an ad group, a social post, a message, content or an event."
|
|
1269
|
-
|
|
1334
|
+
"description": "What sort of channel this is, such as an ad group, a social post, a message, content or an event.",
|
|
1335
|
+
"requiredFor": "identity"
|
|
1336
|
+
},
|
|
1337
|
+
"required": true,
|
|
1338
|
+
"default": "",
|
|
1339
|
+
"description": "What sort of channel this is, such as an ad group, a social post, a message, content or an event."
|
|
1270
1340
|
},
|
|
1271
1341
|
"channelRef": {
|
|
1272
1342
|
"type": "text",
|
|
1273
|
-
"required": true,
|
|
1274
|
-
"default": "",
|
|
1275
|
-
"description": "The name or reference the channel goes by, so its results can be matched to it.",
|
|
1276
1343
|
"_meta": {
|
|
1344
|
+
"__statedOptions": [
|
|
1345
|
+
"required",
|
|
1346
|
+
"requiredFor",
|
|
1347
|
+
"description",
|
|
1348
|
+
"default"
|
|
1349
|
+
],
|
|
1277
1350
|
"required": true,
|
|
1278
|
-
"description": "The name or reference the channel goes by, so its results can be matched to it."
|
|
1279
|
-
|
|
1351
|
+
"description": "The name or reference the channel goes by, so its results can be matched to it.",
|
|
1352
|
+
"requiredFor": "identity"
|
|
1353
|
+
},
|
|
1354
|
+
"required": true,
|
|
1355
|
+
"default": "",
|
|
1356
|
+
"description": "The name or reference the channel goes by, so its results can be matched to it."
|
|
1280
1357
|
},
|
|
1281
1358
|
"allocatedBudgetCents": {
|
|
1282
1359
|
"type": "integer",
|
|
1283
|
-
"required": false,
|
|
1284
|
-
"default": 0,
|
|
1285
|
-
"description": "The share of the campaign budget set aside for this channel, in cents.",
|
|
1286
1360
|
"_meta": {
|
|
1361
|
+
"__statedOptions": [
|
|
1362
|
+
"description",
|
|
1363
|
+
"default"
|
|
1364
|
+
],
|
|
1287
1365
|
"description": "The share of the campaign budget set aside for this channel, in cents."
|
|
1288
|
-
}
|
|
1366
|
+
},
|
|
1367
|
+
"required": false,
|
|
1368
|
+
"default": 0,
|
|
1369
|
+
"description": "The share of the campaign budget set aside for this channel, in cents."
|
|
1289
1370
|
},
|
|
1290
1371
|
"startAt": {
|
|
1291
1372
|
"type": "datetime",
|
|
1292
|
-
"required": false,
|
|
1293
|
-
"description": "When this channel starts, if different from the campaign.",
|
|
1294
1373
|
"_meta": {
|
|
1374
|
+
"__statedOptions": [
|
|
1375
|
+
"description"
|
|
1376
|
+
],
|
|
1295
1377
|
"description": "When this channel starts, if different from the campaign."
|
|
1296
|
-
}
|
|
1378
|
+
},
|
|
1379
|
+
"required": false,
|
|
1380
|
+
"description": "When this channel starts, if different from the campaign."
|
|
1297
1381
|
},
|
|
1298
1382
|
"endAt": {
|
|
1299
1383
|
"type": "datetime",
|
|
1300
|
-
"required": false,
|
|
1301
|
-
"description": "When this channel ends, if different from the campaign.",
|
|
1302
1384
|
"_meta": {
|
|
1385
|
+
"__statedOptions": [
|
|
1386
|
+
"description"
|
|
1387
|
+
],
|
|
1303
1388
|
"description": "When this channel ends, if different from the campaign."
|
|
1304
|
-
}
|
|
1389
|
+
},
|
|
1390
|
+
"required": false,
|
|
1391
|
+
"description": "When this channel ends, if different from the campaign."
|
|
1305
1392
|
},
|
|
1306
1393
|
"status": {
|
|
1307
1394
|
"type": "text",
|
|
1308
|
-
"required": false,
|
|
1309
|
-
"default": "planned",
|
|
1310
|
-
"description": "Where this channel stands, from planned through active to completed or cancelled.",
|
|
1311
1395
|
"_meta": {
|
|
1396
|
+
"__statedOptions": [
|
|
1397
|
+
"description",
|
|
1398
|
+
"default"
|
|
1399
|
+
],
|
|
1312
1400
|
"description": "Where this channel stands, from planned through active to completed or cancelled."
|
|
1313
|
-
}
|
|
1401
|
+
},
|
|
1402
|
+
"required": false,
|
|
1403
|
+
"default": "planned",
|
|
1404
|
+
"description": "Where this channel stands, from planned through active to completed or cancelled."
|
|
1314
1405
|
}
|
|
1315
1406
|
},
|
|
1316
1407
|
"methods": {
|
|
@@ -1516,15 +1607,12 @@
|
|
|
1516
1607
|
"className": "CampaignMetricSnapshot",
|
|
1517
1608
|
"qualifiedName": "@happyvertical/smrt-marketing:CampaignMetricSnapshot",
|
|
1518
1609
|
"collection": "campaignmetricsnapshots",
|
|
1519
|
-
"filePath": "
|
|
1610
|
+
"filePath": "src/models/CampaignMetricSnapshot.ts",
|
|
1520
1611
|
"packageName": "@happyvertical/smrt-marketing",
|
|
1521
1612
|
"fields": {
|
|
1522
1613
|
"tenantId": {
|
|
1523
1614
|
"type": "text",
|
|
1524
|
-
"required": false,
|
|
1525
1615
|
"_meta": {
|
|
1526
|
-
"sqlType": "UUID",
|
|
1527
|
-
"nullable": true,
|
|
1528
1616
|
"__tenancy": {
|
|
1529
1617
|
"isTenantIdField": true,
|
|
1530
1618
|
"autoFilter": true,
|
|
@@ -1534,120 +1622,190 @@
|
|
|
1534
1622
|
"mode": "optional",
|
|
1535
1623
|
"field": "tenantId",
|
|
1536
1624
|
"allowSuperAdminBypass": false
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1625
|
+
},
|
|
1626
|
+
"__statedOptions": [
|
|
1627
|
+
"sqlType",
|
|
1628
|
+
"nullable",
|
|
1629
|
+
"__tenancy",
|
|
1630
|
+
"required"
|
|
1631
|
+
],
|
|
1632
|
+
"sqlType": "UUID",
|
|
1633
|
+
"nullable": true,
|
|
1634
|
+
"required": false
|
|
1635
|
+
},
|
|
1636
|
+
"required": false
|
|
1539
1637
|
},
|
|
1540
1638
|
"campaignId": {
|
|
1541
1639
|
"type": "foreignKey",
|
|
1542
|
-
"required": true,
|
|
1543
|
-
"related": "Campaign",
|
|
1544
|
-
"description": "The campaign these results belong to.",
|
|
1545
1640
|
"_meta": {
|
|
1641
|
+
"__statedOptions": [
|
|
1642
|
+
"description",
|
|
1643
|
+
"required",
|
|
1644
|
+
"requiredFor",
|
|
1645
|
+
"related"
|
|
1646
|
+
],
|
|
1647
|
+
"required": true,
|
|
1546
1648
|
"description": "The campaign these results belong to.",
|
|
1547
|
-
"
|
|
1548
|
-
}
|
|
1649
|
+
"requiredFor": "identity"
|
|
1650
|
+
},
|
|
1651
|
+
"required": true,
|
|
1652
|
+
"related": "Campaign",
|
|
1653
|
+
"description": "The campaign these results belong to."
|
|
1549
1654
|
},
|
|
1550
1655
|
"campaignChannelId": {
|
|
1551
1656
|
"type": "foreignKey",
|
|
1552
|
-
"required": false,
|
|
1553
|
-
"related": "CampaignChannel",
|
|
1554
|
-
"description": "The channel these results came from. Empty when they cover the whole campaign.",
|
|
1555
1657
|
"_meta": {
|
|
1658
|
+
"__statedOptions": [
|
|
1659
|
+
"description",
|
|
1660
|
+
"nullable",
|
|
1661
|
+
"related",
|
|
1662
|
+
"required"
|
|
1663
|
+
],
|
|
1556
1664
|
"description": "The channel these results came from. Empty when they cover the whole campaign.",
|
|
1557
|
-
"nullable": true
|
|
1558
|
-
|
|
1665
|
+
"nullable": true,
|
|
1666
|
+
"required": false
|
|
1667
|
+
},
|
|
1668
|
+
"required": false,
|
|
1669
|
+
"related": "CampaignChannel",
|
|
1670
|
+
"description": "The channel these results came from. Empty when they cover the whole campaign."
|
|
1559
1671
|
},
|
|
1560
1672
|
"periodStart": {
|
|
1561
1673
|
"type": "datetime",
|
|
1562
|
-
"required": true,
|
|
1563
|
-
"description": "The first day of the period these results cover.",
|
|
1564
1674
|
"_meta": {
|
|
1675
|
+
"__statedOptions": [
|
|
1676
|
+
"required",
|
|
1677
|
+
"description"
|
|
1678
|
+
],
|
|
1565
1679
|
"required": true,
|
|
1566
1680
|
"description": "The first day of the period these results cover."
|
|
1567
|
-
}
|
|
1681
|
+
},
|
|
1682
|
+
"required": true,
|
|
1683
|
+
"description": "The first day of the period these results cover."
|
|
1568
1684
|
},
|
|
1569
1685
|
"periodEnd": {
|
|
1570
1686
|
"type": "datetime",
|
|
1571
|
-
"required": true,
|
|
1572
|
-
"description": "The last day of the period these results cover.",
|
|
1573
1687
|
"_meta": {
|
|
1688
|
+
"__statedOptions": [
|
|
1689
|
+
"required",
|
|
1690
|
+
"description"
|
|
1691
|
+
],
|
|
1574
1692
|
"required": true,
|
|
1575
1693
|
"description": "The last day of the period these results cover."
|
|
1576
|
-
}
|
|
1694
|
+
},
|
|
1695
|
+
"required": true,
|
|
1696
|
+
"description": "The last day of the period these results cover."
|
|
1577
1697
|
},
|
|
1578
1698
|
"spendCents": {
|
|
1579
1699
|
"type": "integer",
|
|
1580
|
-
"required": false,
|
|
1581
|
-
"default": 0,
|
|
1582
|
-
"description": "What was spent in the period, in cents.",
|
|
1583
1700
|
"_meta": {
|
|
1701
|
+
"__statedOptions": [
|
|
1702
|
+
"description",
|
|
1703
|
+
"default"
|
|
1704
|
+
],
|
|
1584
1705
|
"description": "What was spent in the period, in cents."
|
|
1585
|
-
}
|
|
1706
|
+
},
|
|
1707
|
+
"required": false,
|
|
1708
|
+
"default": 0,
|
|
1709
|
+
"description": "What was spent in the period, in cents."
|
|
1586
1710
|
},
|
|
1587
1711
|
"impressions": {
|
|
1588
1712
|
"type": "integer",
|
|
1589
|
-
"required": false,
|
|
1590
|
-
"default": 0,
|
|
1591
|
-
"description": "How many times the campaign was shown.",
|
|
1592
1713
|
"_meta": {
|
|
1714
|
+
"__statedOptions": [
|
|
1715
|
+
"description",
|
|
1716
|
+
"default"
|
|
1717
|
+
],
|
|
1593
1718
|
"description": "How many times the campaign was shown."
|
|
1594
|
-
}
|
|
1719
|
+
},
|
|
1720
|
+
"required": false,
|
|
1721
|
+
"default": 0,
|
|
1722
|
+
"description": "How many times the campaign was shown."
|
|
1595
1723
|
},
|
|
1596
1724
|
"clicks": {
|
|
1597
1725
|
"type": "integer",
|
|
1598
|
-
"required": false,
|
|
1599
|
-
"default": 0,
|
|
1600
|
-
"description": "How many times someone clicked through.",
|
|
1601
1726
|
"_meta": {
|
|
1727
|
+
"__statedOptions": [
|
|
1728
|
+
"description",
|
|
1729
|
+
"default"
|
|
1730
|
+
],
|
|
1602
1731
|
"description": "How many times someone clicked through."
|
|
1603
|
-
}
|
|
1732
|
+
},
|
|
1733
|
+
"required": false,
|
|
1734
|
+
"default": 0,
|
|
1735
|
+
"description": "How many times someone clicked through."
|
|
1604
1736
|
},
|
|
1605
1737
|
"conversions": {
|
|
1606
1738
|
"type": "integer",
|
|
1607
|
-
"required": false,
|
|
1608
|
-
"default": 0,
|
|
1609
|
-
"description": "How many people did what the campaign asked, such as buying.",
|
|
1610
1739
|
"_meta": {
|
|
1740
|
+
"__statedOptions": [
|
|
1741
|
+
"description",
|
|
1742
|
+
"default"
|
|
1743
|
+
],
|
|
1611
1744
|
"description": "How many people did what the campaign asked, such as buying."
|
|
1612
|
-
}
|
|
1745
|
+
},
|
|
1746
|
+
"required": false,
|
|
1747
|
+
"default": 0,
|
|
1748
|
+
"description": "How many people did what the campaign asked, such as buying."
|
|
1613
1749
|
},
|
|
1614
1750
|
"leads": {
|
|
1615
1751
|
"type": "integer",
|
|
1616
|
-
"required": false,
|
|
1617
|
-
"default": 0,
|
|
1618
|
-
"description": "How many new leads came in.",
|
|
1619
1752
|
"_meta": {
|
|
1753
|
+
"__statedOptions": [
|
|
1754
|
+
"description",
|
|
1755
|
+
"default"
|
|
1756
|
+
],
|
|
1620
1757
|
"description": "How many new leads came in."
|
|
1621
|
-
}
|
|
1758
|
+
},
|
|
1759
|
+
"required": false,
|
|
1760
|
+
"default": 0,
|
|
1761
|
+
"description": "How many new leads came in."
|
|
1622
1762
|
},
|
|
1623
1763
|
"revenueCents": {
|
|
1624
1764
|
"type": "integer",
|
|
1625
|
-
"required": false,
|
|
1626
|
-
"description": "The sales brought in during the period, in cents, if known.",
|
|
1627
1765
|
"_meta": {
|
|
1766
|
+
"__statedOptions": [
|
|
1767
|
+
"nullable",
|
|
1768
|
+
"description",
|
|
1769
|
+
"required"
|
|
1770
|
+
],
|
|
1771
|
+
"description": "The sales brought in during the period, in cents, if known.",
|
|
1628
1772
|
"nullable": true,
|
|
1629
|
-
"
|
|
1630
|
-
}
|
|
1773
|
+
"required": false
|
|
1774
|
+
},
|
|
1775
|
+
"required": false,
|
|
1776
|
+
"description": "The sales brought in during the period, in cents, if known."
|
|
1631
1777
|
},
|
|
1632
1778
|
"source": {
|
|
1633
1779
|
"type": "text",
|
|
1634
|
-
"required": true,
|
|
1635
|
-
"default": "",
|
|
1636
|
-
"description": "Where these results were reported from.",
|
|
1637
1780
|
"_meta": {
|
|
1638
|
-
"
|
|
1781
|
+
"__statedOptions": [
|
|
1782
|
+
"required",
|
|
1783
|
+
"description",
|
|
1784
|
+
"default"
|
|
1785
|
+
],
|
|
1786
|
+
"required": false,
|
|
1639
1787
|
"description": "Where these results were reported from."
|
|
1640
|
-
}
|
|
1788
|
+
},
|
|
1789
|
+
"required": false,
|
|
1790
|
+
"default": "",
|
|
1791
|
+
"description": "Where these results were reported from."
|
|
1641
1792
|
},
|
|
1642
1793
|
"dedupeKey": {
|
|
1643
1794
|
"type": "text",
|
|
1644
|
-
"required": true,
|
|
1645
|
-
"default": "",
|
|
1646
|
-
"description": "The reference this result is filed under, so the same report is never counted twice.",
|
|
1647
1795
|
"_meta": {
|
|
1796
|
+
"__statedOptions": [
|
|
1797
|
+
"required",
|
|
1798
|
+
"requiredFor",
|
|
1799
|
+
"description",
|
|
1800
|
+
"default"
|
|
1801
|
+
],
|
|
1648
1802
|
"required": true,
|
|
1649
|
-
"description": "The reference this result is filed under, so the same report is never counted twice."
|
|
1650
|
-
|
|
1803
|
+
"description": "The reference this result is filed under, so the same report is never counted twice.",
|
|
1804
|
+
"requiredFor": "idempotency"
|
|
1805
|
+
},
|
|
1806
|
+
"required": true,
|
|
1807
|
+
"default": "",
|
|
1808
|
+
"description": "The reference this result is filed under, so the same report is never counted twice."
|
|
1651
1809
|
}
|
|
1652
1810
|
},
|
|
1653
1811
|
"methods": {
|
|
@@ -1732,11 +1890,6 @@
|
|
|
1732
1890
|
"rule": "required",
|
|
1733
1891
|
"fieldType": "datetime"
|
|
1734
1892
|
},
|
|
1735
|
-
{
|
|
1736
|
-
"field": "source",
|
|
1737
|
-
"rule": "required",
|
|
1738
|
-
"fieldType": "text"
|
|
1739
|
-
},
|
|
1740
1893
|
{
|
|
1741
1894
|
"field": "dedupeKey",
|
|
1742
1895
|
"rule": "required",
|
|
@@ -1745,7 +1898,7 @@
|
|
|
1745
1898
|
],
|
|
1746
1899
|
"schema": {
|
|
1747
1900
|
"tableName": "campaign_metric_snapshots",
|
|
1748
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"campaign_metric_snapshots\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"campaign_id\" UUID NOT NULL,\n \"campaign_channel_id\" UUID,\n \"period_start\" TIMESTAMP NOT NULL,\n \"period_end\" TIMESTAMP NOT NULL,\n \"spend_cents\" INTEGER DEFAULT 0,\n \"impressions\" INTEGER DEFAULT 0,\n \"clicks\" INTEGER DEFAULT 0,\n \"conversions\" INTEGER DEFAULT 0,\n \"leads\" INTEGER DEFAULT 0,\n \"revenue_cents\" INTEGER,\n \"source\" TEXT
|
|
1901
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"campaign_metric_snapshots\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"campaign_id\" UUID NOT NULL,\n \"campaign_channel_id\" UUID,\n \"period_start\" TIMESTAMP NOT NULL,\n \"period_end\" TIMESTAMP NOT NULL,\n \"spend_cents\" INTEGER DEFAULT 0,\n \"impressions\" INTEGER DEFAULT 0,\n \"clicks\" INTEGER DEFAULT 0,\n \"conversions\" INTEGER DEFAULT 0,\n \"leads\" INTEGER DEFAULT 0,\n \"revenue_cents\" INTEGER,\n \"source\" TEXT DEFAULT '',\n \"dedupe_key\" TEXT NOT NULL DEFAULT ''\n);",
|
|
1749
1902
|
"columns": {
|
|
1750
1903
|
"_sync_origin_device_id": {
|
|
1751
1904
|
"type": "TEXT"
|
|
@@ -1855,7 +2008,7 @@
|
|
|
1855
2008
|
},
|
|
1856
2009
|
"source": {
|
|
1857
2010
|
"type": "TEXT",
|
|
1858
|
-
"notNull":
|
|
2011
|
+
"notNull": false,
|
|
1859
2012
|
"unique": false,
|
|
1860
2013
|
"default": ""
|
|
1861
2014
|
},
|
|
@@ -1903,7 +2056,7 @@
|
|
|
1903
2056
|
]
|
|
1904
2057
|
}
|
|
1905
2058
|
],
|
|
1906
|
-
"version": "
|
|
2059
|
+
"version": "20d170ef"
|
|
1907
2060
|
},
|
|
1908
2061
|
"importPath": "@happyvertical/smrt-marketing"
|
|
1909
2062
|
}
|
|
@@ -2128,5 +2281,6 @@
|
|
|
2128
2281
|
"@happyvertical/smrt-tenancy"
|
|
2129
2282
|
]
|
|
2130
2283
|
},
|
|
2284
|
+
"schemaFingerprint": "b918c0703a517ec841a96356be96b5b9cffd278f4c8993889be18b4c97877c6b",
|
|
2131
2285
|
"stampsConstructors": true
|
|
2132
2286
|
}
|