@creator.co/creatorco-prisma-client 1.0.23 → 1.0.24-alpha-b01aec2

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
@@ -73,7 +73,7 @@
73
73
  },
74
74
  "./*": "./*"
75
75
  },
76
- "version": "1.0.23",
76
+ "version": "1.0.24-alpha-b01aec2",
77
77
  "sideEffects": false,
78
78
  "description": "Prisma client for creatorco Database"
79
79
  }
package/schema.prisma CHANGED
@@ -342,6 +342,7 @@ model Brand {
342
342
  creatorsearchfilter CreatorSearchFilter[]
343
343
  sequences Sequence[]
344
344
  impactRadiusEvents ImpactRadiusEvent[]
345
+ shopifyStores ShopifyStore[]
345
346
 
346
347
  // for agencies
347
348
  parentBrandId Int?
@@ -463,6 +464,7 @@ model Campaign {
463
464
  status String @default("draft") // draft, paused, pending, private, publish, trash
464
465
  date DateTime @default(now())
465
466
  publishDate DateTime?
467
+ sfSyncDate DateTime?
466
468
  description String? @db.Text
467
469
  productDescription String? @db.Text
468
470
  prizeDescription String? @db.Text
@@ -518,6 +520,7 @@ model Campaign {
518
520
  campaignPins CampaignPin[]
519
521
  socialPosts SocialPost[]
520
522
  campaignInvites CampaignInvite[]
523
+ campaignToShopifyProducts CampaignToShopifyProduct[]
521
524
 
522
525
  brandId Int
523
526
  brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
@@ -526,6 +529,7 @@ model Campaign {
526
529
  sequences Sequence[]
527
530
 
528
531
  @@index([brandId])
532
+ @@index([sfSyncDate])
529
533
  @@map("campaign")
530
534
  }
531
535
 
@@ -974,6 +978,7 @@ model CreatorList {
974
978
  campaign Campaign? @relation(fields: [campaignId], references: [id])
975
979
  sequences Sequence[]
976
980
 
981
+ @@index ([brandId])
977
982
  @@map("creatorlist")
978
983
  }
979
984
 
@@ -1221,4 +1226,74 @@ model SequenceImapCheckpoint {
1221
1226
 
1222
1227
  @@id([sequenceId, creatorListItemId])
1223
1228
  @@map("sequenceimapcheckpoint")
1229
+ }
1230
+
1231
+ model ShopifyStore {
1232
+ id Int @id @default(autoincrement())
1233
+ name String?
1234
+ url String
1235
+ accessToken String? @map("access_token")
1236
+ syncStatus ShopifyStoreSyncStatus @default(syncing) @map("sync_status")
1237
+ lastSynced DateTime? @map("last_synced")
1238
+ metaData Json @default("{}") @map("meta_data")
1239
+
1240
+ brandId Int @map("brand_id")
1241
+
1242
+ products ShopifyProduct[]
1243
+
1244
+ brand Brand? @relation(fields: [brandId], references: [id], onDelete: Cascade)
1245
+
1246
+ @@index([brandId])
1247
+ @@map("shopify_store")
1248
+ }
1249
+
1250
+ enum ShopifyStoreSyncStatus {
1251
+ syncing
1252
+ synced
1253
+ error
1254
+ }
1255
+
1256
+ model ShopifyProduct {
1257
+ id Int @id @default(autoincrement())
1258
+ shopifyId String @unique @map("shopify_id")
1259
+ title String
1260
+ handle String
1261
+ imageUrl String @db.Text @map("image_url")
1262
+
1263
+ metaData Json @default("{}") @map("meta_data")
1264
+
1265
+ shopifyStoreId Int @map("shopify_store_id")
1266
+
1267
+ campaignToShopifyProducts CampaignToShopifyProduct[]
1268
+ variations ShopifyProductVariation[]
1269
+
1270
+ shopifyStore ShopifyStore @relation(fields: [shopifyStoreId], references: [id], onDelete: Cascade)
1271
+
1272
+ @@map("shopify_product")
1273
+ }
1274
+
1275
+ model ShopifyProductVariation {
1276
+ id Int @id @default(autoincrement())
1277
+ shopifyId String @unique @map("shopify_id")
1278
+ title String
1279
+ imageUrl String @db.Text @map("image_url")
1280
+
1281
+ metaData Json @default("{}") @map("meta_data")
1282
+
1283
+ shopifyProductId Int @map("shopify_product_id")
1284
+
1285
+ shopifyProduct ShopifyProduct @relation(fields: [shopifyProductId], references: [id], onDelete: Cascade)
1286
+
1287
+ @@map("shopify_product_variation")
1288
+ }
1289
+
1290
+ model CampaignToShopifyProduct {
1291
+ campaignId Int @map("campaign_id")
1292
+ shopifyProductId Int @map("shopify_product_id")
1293
+
1294
+ campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
1295
+ shopifyProduct ShopifyProduct @relation(fields: [shopifyProductId], references: [id], onDelete: Cascade)
1296
+
1297
+ @@id([campaignId, shopifyProductId])
1298
+ @@map("campaign_to_shopify_product")
1224
1299
  }
package/wasm.js CHANGED
@@ -384,6 +384,7 @@ exports.Prisma.CampaignScalarFieldEnum = {
384
384
  status: 'status',
385
385
  date: 'date',
386
386
  publishDate: 'publishDate',
387
+ sfSyncDate: 'sfSyncDate',
387
388
  description: 'description',
388
389
  productDescription: 'productDescription',
389
390
  prizeDescription: 'prizeDescription',
@@ -849,6 +850,41 @@ exports.Prisma.SequenceImapCheckpointScalarFieldEnum = {
849
850
  updatedAt: 'updatedAt'
850
851
  };
851
852
 
853
+ exports.Prisma.ShopifyStoreScalarFieldEnum = {
854
+ id: 'id',
855
+ name: 'name',
856
+ url: 'url',
857
+ accessToken: 'accessToken',
858
+ syncStatus: 'syncStatus',
859
+ lastSynced: 'lastSynced',
860
+ metaData: 'metaData',
861
+ brandId: 'brandId'
862
+ };
863
+
864
+ exports.Prisma.ShopifyProductScalarFieldEnum = {
865
+ id: 'id',
866
+ shopifyId: 'shopifyId',
867
+ title: 'title',
868
+ handle: 'handle',
869
+ imageUrl: 'imageUrl',
870
+ metaData: 'metaData',
871
+ shopifyStoreId: 'shopifyStoreId'
872
+ };
873
+
874
+ exports.Prisma.ShopifyProductVariationScalarFieldEnum = {
875
+ id: 'id',
876
+ shopifyId: 'shopifyId',
877
+ title: 'title',
878
+ imageUrl: 'imageUrl',
879
+ metaData: 'metaData',
880
+ shopifyProductId: 'shopifyProductId'
881
+ };
882
+
883
+ exports.Prisma.CampaignToShopifyProductScalarFieldEnum = {
884
+ campaignId: 'campaignId',
885
+ shopifyProductId: 'shopifyProductId'
886
+ };
887
+
852
888
  exports.Prisma.SortOrder = {
853
889
  asc: 'asc',
854
890
  desc: 'desc'
@@ -1175,6 +1211,25 @@ exports.Prisma.SequenceOrderByRelevanceFieldEnum = {
1175
1211
  exports.Prisma.SequenceInboundEmailOrderByRelevanceFieldEnum = {
1176
1212
  msgHash: 'msgHash'
1177
1213
  };
1214
+
1215
+ exports.Prisma.ShopifyStoreOrderByRelevanceFieldEnum = {
1216
+ name: 'name',
1217
+ url: 'url',
1218
+ accessToken: 'accessToken'
1219
+ };
1220
+
1221
+ exports.Prisma.ShopifyProductOrderByRelevanceFieldEnum = {
1222
+ shopifyId: 'shopifyId',
1223
+ title: 'title',
1224
+ handle: 'handle',
1225
+ imageUrl: 'imageUrl'
1226
+ };
1227
+
1228
+ exports.Prisma.ShopifyProductVariationOrderByRelevanceFieldEnum = {
1229
+ shopifyId: 'shopifyId',
1230
+ title: 'title',
1231
+ imageUrl: 'imageUrl'
1232
+ };
1178
1233
  exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
1179
1234
  optIn: 'optIn',
1180
1235
  tip: 'tip',
@@ -1189,6 +1244,12 @@ exports.trolleyPaymentStatus = exports.$Enums.trolleyPaymentStatus = {
1189
1244
  returned: 'returned'
1190
1245
  };
1191
1246
 
1247
+ exports.ShopifyStoreSyncStatus = exports.$Enums.ShopifyStoreSyncStatus = {
1248
+ syncing: 'syncing',
1249
+ synced: 'synced',
1250
+ error: 'error'
1251
+ };
1252
+
1192
1253
  exports.Prisma.ModelName = {
1193
1254
  User: 'User',
1194
1255
  Log: 'Log',
@@ -1249,7 +1310,11 @@ exports.Prisma.ModelName = {
1249
1310
  SequenceStep: 'SequenceStep',
1250
1311
  SequenceOutboundEmail: 'SequenceOutboundEmail',
1251
1312
  SequenceInboundEmail: 'SequenceInboundEmail',
1252
- SequenceImapCheckpoint: 'SequenceImapCheckpoint'
1313
+ SequenceImapCheckpoint: 'SequenceImapCheckpoint',
1314
+ ShopifyStore: 'ShopifyStore',
1315
+ ShopifyProduct: 'ShopifyProduct',
1316
+ ShopifyProductVariation: 'ShopifyProductVariation',
1317
+ CampaignToShopifyProduct: 'CampaignToShopifyProduct'
1253
1318
  };
1254
1319
 
1255
1320
  /**