@creator.co/creatorco-prisma-client 1.0.34-alpha-925d6bb → 1.0.34-alpha-6895cd0
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/edge.js +43 -8
- package/index-browser.js +39 -4
- package/index.d.ts +7810 -2932
- package/index.js +43 -8
- package/package.json +1 -1
- package/schema.prisma +54 -17
- package/wasm.js +39 -4
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -70,7 +70,7 @@ model User {
|
|
|
70
70
|
socialProfiles SocialProfile[]
|
|
71
71
|
rakutenActivity RakutenActivity[]
|
|
72
72
|
impactRadiusEvents ImpactRadiusEvent[]
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
@@index([phoneCode, phone])
|
|
75
75
|
@@map("user")
|
|
76
76
|
// @@fulltext([firstName, lastName])
|
|
@@ -344,7 +344,7 @@ model Brand {
|
|
|
344
344
|
sequences Sequence[]
|
|
345
345
|
impactRadiusEvents ImpactRadiusEvent[]
|
|
346
346
|
shopifyStores ShopifyStore[]
|
|
347
|
-
|
|
347
|
+
productLists ProductList[]
|
|
348
348
|
|
|
349
349
|
// for agencies
|
|
350
350
|
parentBrandId Int?
|
|
@@ -517,7 +517,8 @@ model Campaign {
|
|
|
517
517
|
categories CampaignToCategory[]
|
|
518
518
|
optIns OptIn[]
|
|
519
519
|
images CampaignToImage[]
|
|
520
|
-
variables
|
|
520
|
+
variables Variable[]
|
|
521
|
+
productLists CampaignToProductList[]
|
|
521
522
|
countries CampaignToCountry[]
|
|
522
523
|
campaignPins CampaignPin[]
|
|
523
524
|
socialPosts SocialPost[]
|
|
@@ -584,15 +585,52 @@ model CampaignToCountry {
|
|
|
584
585
|
@@map("campaigntocountry")
|
|
585
586
|
}
|
|
586
587
|
|
|
587
|
-
model
|
|
588
|
+
model ProductList {
|
|
589
|
+
id Int @id @default(autoincrement())
|
|
590
|
+
title String
|
|
591
|
+
description String? @db.Text
|
|
592
|
+
metaData Json @default("{}")
|
|
593
|
+
|
|
594
|
+
brandId Int
|
|
595
|
+
|
|
596
|
+
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
597
|
+
|
|
598
|
+
items ProductListItem[]
|
|
599
|
+
campaignProductLists CampaignToProductList[]
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
model ProductListItem {
|
|
603
|
+
id Int @id @default(autoincrement())
|
|
604
|
+
title String
|
|
605
|
+
description String? @db.Text
|
|
606
|
+
metaData Json @default("{}")
|
|
607
|
+
|
|
608
|
+
productListId Int
|
|
609
|
+
productList ProductList @relation(fields: [productListId], references: [id], onDelete: Cascade)
|
|
610
|
+
optins OptinToProductListItem[]
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
model CampaignToProductList {
|
|
588
614
|
campaignId Int
|
|
589
|
-
|
|
615
|
+
productListId Int
|
|
590
616
|
|
|
591
617
|
campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
|
|
592
|
-
|
|
618
|
+
productList ProductList @relation(fields: [productListId], references: [id])
|
|
619
|
+
|
|
620
|
+
@@id([campaignId, productListId])
|
|
621
|
+
@@map("campaigntoproductlist")
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
model OptinToProductListItem {
|
|
625
|
+
id Int @id @default(autoincrement())
|
|
593
626
|
|
|
594
|
-
|
|
595
|
-
|
|
627
|
+
optInId Int
|
|
628
|
+
productListItemId Int
|
|
629
|
+
|
|
630
|
+
optIn OptIn @relation(fields: [optInId], references: [id], onDelete: Cascade)
|
|
631
|
+
productListItem ProductListItem @relation(fields: [productListItemId], references: [id], onDelete: Cascade)
|
|
632
|
+
|
|
633
|
+
@@index([optInId])
|
|
596
634
|
}
|
|
597
635
|
|
|
598
636
|
model Variable {
|
|
@@ -601,11 +639,9 @@ model Variable {
|
|
|
601
639
|
description String? @db.Text
|
|
602
640
|
metaData Json @default("{}")
|
|
603
641
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
642
|
+
campaignId Int
|
|
607
643
|
|
|
608
|
-
|
|
644
|
+
campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
|
|
609
645
|
|
|
610
646
|
options VariableOption[]
|
|
611
647
|
optInVariables OptInVariable[]
|
|
@@ -719,6 +755,7 @@ model OptIn {
|
|
|
719
755
|
campaignInvites CampaignInvite[]
|
|
720
756
|
trolleyPayments TrolleyPayment[]
|
|
721
757
|
affiliateClicks AffiliateClick[]
|
|
758
|
+
productListItems OptinToProductListItem[]
|
|
722
759
|
|
|
723
760
|
@@index([userId])
|
|
724
761
|
@@index([campaignId])
|
|
@@ -1255,7 +1292,7 @@ model ShopifyStore {
|
|
|
1255
1292
|
accessToken String? @map("access_token")
|
|
1256
1293
|
syncStatus ShopifyStoreSyncStatus @default(syncing) @map("sync_status")
|
|
1257
1294
|
lastSynced DateTime? @map("last_synced")
|
|
1258
|
-
metaData Json @default("{}") @map("meta_data")
|
|
1295
|
+
metaData Json @default("{}") @map("meta_data")
|
|
1259
1296
|
|
|
1260
1297
|
brandId Int @map("brand_id")
|
|
1261
1298
|
|
|
@@ -1281,14 +1318,14 @@ model ShopifyProduct {
|
|
|
1281
1318
|
imageUrl String @db.Text @map("image_url")
|
|
1282
1319
|
|
|
1283
1320
|
metaData Json @default("{}") @map("meta_data")
|
|
1284
|
-
|
|
1321
|
+
|
|
1285
1322
|
shopifyStoreId Int @map("shopify_store_id")
|
|
1286
1323
|
|
|
1287
1324
|
campaignToShopifyProducts CampaignToShopifyProduct[]
|
|
1288
1325
|
variations ShopifyProductVariation[]
|
|
1289
1326
|
|
|
1290
1327
|
shopifyStore ShopifyStore @relation(fields: [shopifyStoreId], references: [id], onDelete: Cascade)
|
|
1291
|
-
|
|
1328
|
+
|
|
1292
1329
|
@@map("shopify_product")
|
|
1293
1330
|
}
|
|
1294
1331
|
|
|
@@ -1299,11 +1336,11 @@ model ShopifyProductVariation {
|
|
|
1299
1336
|
imageUrl String @db.Text @map("image_url")
|
|
1300
1337
|
|
|
1301
1338
|
metaData Json @default("{}") @map("meta_data")
|
|
1302
|
-
|
|
1339
|
+
|
|
1303
1340
|
shopifyProductId Int @map("shopify_product_id")
|
|
1304
1341
|
|
|
1305
1342
|
shopifyProduct ShopifyProduct @relation(fields: [shopifyProductId], references: [id], onDelete: Cascade)
|
|
1306
|
-
|
|
1343
|
+
|
|
1307
1344
|
@@map("shopify_product_variation")
|
|
1308
1345
|
}
|
|
1309
1346
|
|
package/wasm.js
CHANGED
|
@@ -458,9 +458,31 @@ exports.Prisma.CampaignToCountryScalarFieldEnum = {
|
|
|
458
458
|
countryId: 'countryId'
|
|
459
459
|
};
|
|
460
460
|
|
|
461
|
-
exports.Prisma.
|
|
461
|
+
exports.Prisma.ProductListScalarFieldEnum = {
|
|
462
|
+
id: 'id',
|
|
463
|
+
title: 'title',
|
|
464
|
+
description: 'description',
|
|
465
|
+
metaData: 'metaData',
|
|
466
|
+
brandId: 'brandId'
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
exports.Prisma.ProductListItemScalarFieldEnum = {
|
|
470
|
+
id: 'id',
|
|
471
|
+
title: 'title',
|
|
472
|
+
description: 'description',
|
|
473
|
+
metaData: 'metaData',
|
|
474
|
+
productListId: 'productListId'
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
exports.Prisma.CampaignToProductListScalarFieldEnum = {
|
|
462
478
|
campaignId: 'campaignId',
|
|
463
|
-
|
|
479
|
+
productListId: 'productListId'
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
exports.Prisma.OptinToProductListItemScalarFieldEnum = {
|
|
483
|
+
id: 'id',
|
|
484
|
+
optInId: 'optInId',
|
|
485
|
+
productListItemId: 'productListItemId'
|
|
464
486
|
};
|
|
465
487
|
|
|
466
488
|
exports.Prisma.VariableScalarFieldEnum = {
|
|
@@ -468,7 +490,7 @@ exports.Prisma.VariableScalarFieldEnum = {
|
|
|
468
490
|
title: 'title',
|
|
469
491
|
description: 'description',
|
|
470
492
|
metaData: 'metaData',
|
|
471
|
-
|
|
493
|
+
campaignId: 'campaignId'
|
|
472
494
|
};
|
|
473
495
|
|
|
474
496
|
exports.Prisma.VariableOptionScalarFieldEnum = {
|
|
@@ -1063,6 +1085,16 @@ exports.Prisma.CampaignToImageOrderByRelevanceFieldEnum = {
|
|
|
1063
1085
|
type: 'type'
|
|
1064
1086
|
};
|
|
1065
1087
|
|
|
1088
|
+
exports.Prisma.ProductListOrderByRelevanceFieldEnum = {
|
|
1089
|
+
title: 'title',
|
|
1090
|
+
description: 'description'
|
|
1091
|
+
};
|
|
1092
|
+
|
|
1093
|
+
exports.Prisma.ProductListItemOrderByRelevanceFieldEnum = {
|
|
1094
|
+
title: 'title',
|
|
1095
|
+
description: 'description'
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1066
1098
|
exports.Prisma.VariableOrderByRelevanceFieldEnum = {
|
|
1067
1099
|
title: 'title',
|
|
1068
1100
|
description: 'description'
|
|
@@ -1286,7 +1318,10 @@ exports.Prisma.ModelName = {
|
|
|
1286
1318
|
CampaignToImage: 'CampaignToImage',
|
|
1287
1319
|
CampaignToCategory: 'CampaignToCategory',
|
|
1288
1320
|
CampaignToCountry: 'CampaignToCountry',
|
|
1289
|
-
|
|
1321
|
+
ProductList: 'ProductList',
|
|
1322
|
+
ProductListItem: 'ProductListItem',
|
|
1323
|
+
CampaignToProductList: 'CampaignToProductList',
|
|
1324
|
+
OptinToProductListItem: 'OptinToProductListItem',
|
|
1290
1325
|
Variable: 'Variable',
|
|
1291
1326
|
VariableOption: 'VariableOption',
|
|
1292
1327
|
Step: 'Step',
|