@creator.co/creatorco-prisma-client 1.0.16 → 1.0.17
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/default.d.ts +1 -0
- package/default.js +1 -0
- package/edge.d.ts +1 -1
- package/edge.js +40 -11
- package/index-browser.js +47 -19
- package/index.d.ts +2029 -289
- package/index.js +41 -12
- package/libquery_engine-darwin-arm64.dylib.node +0 -0
- package/libquery_engine-darwin.dylib.node +0 -0
- package/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
- package/libquery_engine-linux-arm64-openssl-1.0.x.so.node +0 -0
- package/libquery_engine-linux-arm64-openssl-3.0.x.so.node +0 -0
- package/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
- package/package.json +67 -2
- package/query_engine-windows.dll.node +0 -0
- package/runtime/edge-esm.js +27 -74
- package/runtime/edge.js +27 -74
- package/runtime/index-browser.js +1 -1
- package/runtime/library.d.ts +207 -152
- package/runtime/library.js +59 -57
- package/runtime/wasm.js +94 -0
- package/schema.prisma +53 -2
- package/wasm.d.ts +1 -0
- package/wasm.js +1288 -0
package/schema.prisma
CHANGED
|
@@ -43,7 +43,7 @@ model User {
|
|
|
43
43
|
affiliateSlug String? @unique
|
|
44
44
|
closed DateTime?
|
|
45
45
|
closedReason String?
|
|
46
|
-
usercomLastSynced DateTime?
|
|
46
|
+
usercomLastSynced DateTime? @default(now())
|
|
47
47
|
extraData Json @default("{}")
|
|
48
48
|
|
|
49
49
|
referrerId Int?
|
|
@@ -299,6 +299,9 @@ model BrandUserProfile {
|
|
|
299
299
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
300
300
|
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
301
301
|
|
|
302
|
+
@@index([userId])
|
|
303
|
+
@@index([brandId])
|
|
304
|
+
|
|
302
305
|
@@map("branduserprofile")
|
|
303
306
|
}
|
|
304
307
|
|
|
@@ -393,6 +396,7 @@ model BrandToImage {
|
|
|
393
396
|
|
|
394
397
|
sizes BrandImage[]
|
|
395
398
|
|
|
399
|
+
@@index([brandId])
|
|
396
400
|
@@map("brandtoimage")
|
|
397
401
|
}
|
|
398
402
|
|
|
@@ -519,6 +523,7 @@ model Campaign {
|
|
|
519
523
|
optInViews OptInView[]
|
|
520
524
|
sequences Sequence[]
|
|
521
525
|
|
|
526
|
+
@@index([brandId])
|
|
522
527
|
@@map("campaign")
|
|
523
528
|
}
|
|
524
529
|
|
|
@@ -532,6 +537,8 @@ model CampaignPin {
|
|
|
532
537
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
533
538
|
campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
|
|
534
539
|
|
|
540
|
+
@@index([userId])
|
|
541
|
+
|
|
535
542
|
@@map("campaignpin")
|
|
536
543
|
}
|
|
537
544
|
|
|
@@ -626,6 +633,8 @@ model CampaignStep {
|
|
|
626
633
|
|
|
627
634
|
optInSteps OptInStep[]
|
|
628
635
|
|
|
636
|
+
@@index([campaignId])
|
|
637
|
+
|
|
629
638
|
@@map("campaignstep")
|
|
630
639
|
}
|
|
631
640
|
|
|
@@ -641,6 +650,7 @@ model OptInStep {
|
|
|
641
650
|
optIn OptIn @relation(fields: [optInId], references: [id], onDelete: Cascade)
|
|
642
651
|
campaignStep CampaignStep @relation(fields: [campaignStepId], references: [id], onDelete: Cascade)
|
|
643
652
|
|
|
653
|
+
@@index([optInId])
|
|
644
654
|
@@index([campaignStepId])
|
|
645
655
|
@@map("optinstep")
|
|
646
656
|
}
|
|
@@ -670,7 +680,7 @@ model OptIn {
|
|
|
670
680
|
seen Boolean @default(false)
|
|
671
681
|
instructions String? @db.Text
|
|
672
682
|
paymentAmount Float?
|
|
673
|
-
paymentStatus String @default("pending")
|
|
683
|
+
paymentStatus String @default("pending") // depracated -- refer to trolley payment table
|
|
674
684
|
extraData Json @default("{}")
|
|
675
685
|
|
|
676
686
|
userId Int
|
|
@@ -685,12 +695,41 @@ model OptIn {
|
|
|
685
695
|
optInSteps OptInStep[]
|
|
686
696
|
chat Chat?
|
|
687
697
|
campaignInvites CampaignInvite[]
|
|
698
|
+
trolleyPayments TrolleyPayment[]
|
|
688
699
|
|
|
689
700
|
@@index([userId])
|
|
690
701
|
@@index([campaignId])
|
|
691
702
|
@@map("optin")
|
|
692
703
|
}
|
|
693
704
|
|
|
705
|
+
model TrolleyPayment {
|
|
706
|
+
id Int @id @default(autoincrement())
|
|
707
|
+
paymentId String @unique
|
|
708
|
+
type trolleyPaymentType?
|
|
709
|
+
status trolleyPaymentStatus @default(created)
|
|
710
|
+
optInId Int
|
|
711
|
+
paymentAmount Int
|
|
712
|
+
metaData Json @default("{}")
|
|
713
|
+
|
|
714
|
+
optIn OptIn @relation(fields: [optInId], references:[id])
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
enum trolleyPaymentType {
|
|
718
|
+
optIn
|
|
719
|
+
tip
|
|
720
|
+
affiliate
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
enum trolleyPaymentStatus {
|
|
724
|
+
created
|
|
725
|
+
updated
|
|
726
|
+
deleted
|
|
727
|
+
processed
|
|
728
|
+
failed
|
|
729
|
+
returned
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
|
|
694
733
|
model OptInVariable {
|
|
695
734
|
id Int @id @default(autoincrement())
|
|
696
735
|
|
|
@@ -701,6 +740,8 @@ model OptInVariable {
|
|
|
701
740
|
optIn OptIn @relation(fields: [optInId], references: [id], onDelete: Cascade)
|
|
702
741
|
variable Variable @relation(fields: [variableId], references: [id], onDelete: Cascade)
|
|
703
742
|
selectedOption VariableOption @relation(fields: [selectedOptionId], references: [id], onDelete: Cascade)
|
|
743
|
+
|
|
744
|
+
@@index([optInId])
|
|
704
745
|
}
|
|
705
746
|
|
|
706
747
|
model SocialPost {
|
|
@@ -787,6 +828,8 @@ model BrandImage {
|
|
|
787
828
|
brandImageId Int
|
|
788
829
|
|
|
789
830
|
brandImage BrandToImage @relation(fields: [brandImageId], references: [id], onDelete: Cascade)
|
|
831
|
+
|
|
832
|
+
@@index([brandImageId])
|
|
790
833
|
@@map("brandimage")
|
|
791
834
|
}
|
|
792
835
|
|
|
@@ -831,6 +874,8 @@ model PaymentTransaction {
|
|
|
831
874
|
creator User? @relation(fields: [creatorId], references: [id])
|
|
832
875
|
prevTransaction PaymentTransaction? @relation("TransactionHistory", fields: [prevTransactionId], references: [id])
|
|
833
876
|
nextTransaction PaymentTransaction? @relation("TransactionHistory")
|
|
877
|
+
|
|
878
|
+
@@index([accountId])
|
|
834
879
|
}
|
|
835
880
|
|
|
836
881
|
model BrandAffiliateLink {
|
|
@@ -845,6 +890,8 @@ model BrandAffiliateLink {
|
|
|
845
890
|
affiliateLinks AffiliateLink[]
|
|
846
891
|
|
|
847
892
|
brand Brand @relation(fields: [brandId], references: [id])
|
|
893
|
+
|
|
894
|
+
@@index([brandId])
|
|
848
895
|
}
|
|
849
896
|
|
|
850
897
|
model AffiliateLink {
|
|
@@ -920,6 +967,7 @@ model CampaignInvite {
|
|
|
920
967
|
socialProfile SocialProfile? @relation(fields: [socialProfileId], references: [id])
|
|
921
968
|
optIn OptIn? @relation(fields: [optInId], references: [id])
|
|
922
969
|
|
|
970
|
+
@@index([socialProfileId])
|
|
923
971
|
}
|
|
924
972
|
|
|
925
973
|
model CreatorList {
|
|
@@ -1001,6 +1049,7 @@ model MessageTemplate {
|
|
|
1001
1049
|
brand Brand? @relation(fields: [brandId], references: [id])
|
|
1002
1050
|
metaData Json @default("{}") // to save any additional data such as user defined variables
|
|
1003
1051
|
|
|
1052
|
+
@@index([brandId])
|
|
1004
1053
|
@@map("messagetemplate")
|
|
1005
1054
|
}
|
|
1006
1055
|
|
|
@@ -1015,6 +1064,8 @@ model EmailTemplate {
|
|
|
1015
1064
|
metaData Json @default("{}") // to save any additional data such as user defined variables
|
|
1016
1065
|
|
|
1017
1066
|
sequenceSteps SequenceStep[]
|
|
1067
|
+
|
|
1068
|
+
@@index([brandId])
|
|
1018
1069
|
}
|
|
1019
1070
|
|
|
1020
1071
|
model SocialListeningList {
|
package/wasm.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index'
|