@creator.co/creatorco-prisma-client 1.0.34-alpha-6895cd0 → 1.0.35

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/package.json CHANGED
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "./*": "./*"
81
81
  },
82
- "version": "1.0.34-alpha-6895cd0",
82
+ "version": "1.0.35",
83
83
  "sideEffects": false,
84
84
  "description": "Prisma client for creatorco Database"
85
85
  }
package/schema.prisma CHANGED
@@ -597,6 +597,9 @@ model ProductList {
597
597
 
598
598
  items ProductListItem[]
599
599
  campaignProductLists CampaignToProductList[]
600
+
601
+ @@index([brandId])
602
+ @@map("product_list")
600
603
  }
601
604
 
602
605
  model ProductListItem {
@@ -608,6 +611,9 @@ model ProductListItem {
608
611
  productListId Int
609
612
  productList ProductList @relation(fields: [productListId], references: [id], onDelete: Cascade)
610
613
  optins OptinToProductListItem[]
614
+
615
+ @@index([productListId])
616
+ @@map("product_list_item")
611
617
  }
612
618
 
613
619
  model CampaignToProductList {
@@ -618,19 +624,20 @@ model CampaignToProductList {
618
624
  productList ProductList @relation(fields: [productListId], references: [id])
619
625
 
620
626
  @@id([campaignId, productListId])
621
- @@map("campaigntoproductlist")
627
+ @@index([productListId])
628
+ @@map("campaign_to_product_list")
622
629
  }
623
630
 
624
631
  model OptinToProductListItem {
625
- id Int @id @default(autoincrement())
626
-
627
632
  optInId Int
628
633
  productListItemId Int
629
634
 
630
635
  optIn OptIn @relation(fields: [optInId], references: [id], onDelete: Cascade)
631
636
  productListItem ProductListItem @relation(fields: [productListItemId], references: [id], onDelete: Cascade)
632
637
 
633
- @@index([optInId])
638
+ @@id([optInId, productListItemId])
639
+ @@index([productListItemId])
640
+ @@map("optin_to_product_list_item")
634
641
  }
635
642
 
636
643
  model Variable {
@@ -856,6 +863,49 @@ model SocialPost {
856
863
  @@map("socialpost")
857
864
  }
858
865
 
866
+ // Table for storing archived socialposts from before external_id was implemented
867
+ model ArchivedSocialPost {
868
+ id Int @id @default(autoincrement())
869
+ phylloId String? @unique
870
+ metaData Json @default("{}")
871
+ lastFetched DateTime?
872
+ lastWebhook DateTime?
873
+
874
+ // BASIC INFO
875
+ posted DateTime?
876
+ title String? @db.Text
877
+ description String? @db.Text
878
+ url String? @db.VarChar(2083)
879
+ urlPath String? @unique // DEPRECATED: This is here so we have some external identifier to quickly search by
880
+ format String?
881
+ type String?
882
+ platform String?
883
+ visibility String?
884
+ isSponsored Boolean?
885
+ hasCollaborators Boolean?
886
+ isOwnedByUser Boolean?
887
+ // METRICS
888
+ views Int?
889
+ impressions Int?
890
+ impressionsOrganic Int?
891
+ impressionsPaid Int?
892
+ reach Int?
893
+ reachOrganic Int?
894
+ reachPaid Int?
895
+ watchHours Float?
896
+ // ENGAGEMENT METRICS
897
+ likes Int?
898
+ dislikes Int?
899
+ comments Int?
900
+ saves Int?
901
+ shares Int?
902
+
903
+ userId Int?
904
+ campaignId Int?
905
+
906
+ @@map("archived_social_post")
907
+ }
908
+
859
909
  model Image {
860
910
  id Int @id @default(autoincrement())
861
911
  url String @db.VarChar(2083)
@@ -1353,4 +1403,4 @@ model CampaignToShopifyProduct {
1353
1403
 
1354
1404
  @@id([campaignId, shopifyProductId])
1355
1405
  @@map("campaign_to_shopify_product")
1356
- }
1406
+ }
package/wasm.js CHANGED
@@ -480,7 +480,6 @@ exports.Prisma.CampaignToProductListScalarFieldEnum = {
480
480
  };
481
481
 
482
482
  exports.Prisma.OptinToProductListItemScalarFieldEnum = {
483
- id: 'id',
484
483
  optInId: 'optInId',
485
484
  productListItemId: 'productListItemId'
486
485
  };
@@ -612,6 +611,41 @@ exports.Prisma.SocialPostScalarFieldEnum = {
612
611
  campaignId: 'campaignId'
613
612
  };
614
613
 
614
+ exports.Prisma.ArchivedSocialPostScalarFieldEnum = {
615
+ id: 'id',
616
+ phylloId: 'phylloId',
617
+ metaData: 'metaData',
618
+ lastFetched: 'lastFetched',
619
+ lastWebhook: 'lastWebhook',
620
+ posted: 'posted',
621
+ title: 'title',
622
+ description: 'description',
623
+ url: 'url',
624
+ urlPath: 'urlPath',
625
+ format: 'format',
626
+ type: 'type',
627
+ platform: 'platform',
628
+ visibility: 'visibility',
629
+ isSponsored: 'isSponsored',
630
+ hasCollaborators: 'hasCollaborators',
631
+ isOwnedByUser: 'isOwnedByUser',
632
+ views: 'views',
633
+ impressions: 'impressions',
634
+ impressionsOrganic: 'impressionsOrganic',
635
+ impressionsPaid: 'impressionsPaid',
636
+ reach: 'reach',
637
+ reachOrganic: 'reachOrganic',
638
+ reachPaid: 'reachPaid',
639
+ watchHours: 'watchHours',
640
+ likes: 'likes',
641
+ dislikes: 'dislikes',
642
+ comments: 'comments',
643
+ saves: 'saves',
644
+ shares: 'shares',
645
+ userId: 'userId',
646
+ campaignId: 'campaignId'
647
+ };
648
+
615
649
  exports.Prisma.ImageScalarFieldEnum = {
616
650
  id: 'id',
617
651
  url: 'url',
@@ -1145,6 +1179,18 @@ exports.Prisma.SocialPostOrderByRelevanceFieldEnum = {
1145
1179
  visibility: 'visibility'
1146
1180
  };
1147
1181
 
1182
+ exports.Prisma.ArchivedSocialPostOrderByRelevanceFieldEnum = {
1183
+ phylloId: 'phylloId',
1184
+ title: 'title',
1185
+ description: 'description',
1186
+ url: 'url',
1187
+ urlPath: 'urlPath',
1188
+ format: 'format',
1189
+ type: 'type',
1190
+ platform: 'platform',
1191
+ visibility: 'visibility'
1192
+ };
1193
+
1148
1194
  exports.Prisma.ImageOrderByRelevanceFieldEnum = {
1149
1195
  url: 'url',
1150
1196
  size: 'size'
@@ -1332,6 +1378,7 @@ exports.Prisma.ModelName = {
1332
1378
  TrolleyPayment: 'TrolleyPayment',
1333
1379
  OptInVariable: 'OptInVariable',
1334
1380
  SocialPost: 'SocialPost',
1381
+ ArchivedSocialPost: 'ArchivedSocialPost',
1335
1382
  Image: 'Image',
1336
1383
  BrandImage: 'BrandImage',
1337
1384
  Country: 'Country',