@creator.co/creatorco-prisma-client 1.0.80 → 1.0.82-alpha-87c8144

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
@@ -92,7 +92,7 @@
92
92
  },
93
93
  "./*": "./*"
94
94
  },
95
- "version": "1.0.80",
95
+ "version": "1.0.82-alpha-87c8144",
96
96
  "sideEffects": false,
97
97
  "description": "Prisma client for creatorco Database"
98
98
  }
package/schema.prisma CHANGED
@@ -17,7 +17,7 @@ generator kysely {
17
17
  generator client {
18
18
  provider = "prisma-client-js"
19
19
  output = "../../client/creatorco/client"
20
- previewFeatures = ["fullTextIndex", "fullTextSearch"]
20
+ previewFeatures = ["fullTextIndex", "fullTextSearch", "views"]
21
21
  // macos (arm or x86), native, linux arm64 ssl3.x, windows
22
22
  binaryTargets = ["native", "darwin", "darwin-arm64", "linux-arm64-openssl-3.0.x", "windows", "debian-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x", "linux-arm64-openssl-1.0.x", "linux-musl-arm64-openssl-1.1.x"]
23
23
  }
@@ -786,7 +786,7 @@ model OptIn {
786
786
  seen Boolean @default(false)
787
787
  instructions String? @db.Text
788
788
  paymentAmount Float?
789
- paymentStatus String @default("pending") /// @deprecated join with TrolleyPayment for actual status
789
+ paymentStatus String @default("pending")
790
790
  extraData Json @default("{}")
791
791
  favoritedDate DateTime?
792
792
  rating Json?
@@ -821,21 +821,24 @@ model OptIn {
821
821
  }
822
822
 
823
823
  model TrolleyPayment {
824
- id Int @id @default(autoincrement())
825
- paymentId String @unique
826
- type trolleyPaymentType?
827
- status trolleyPaymentStatus
828
- optInId Int?
829
- paymentAmount Int
830
- metaData Json @default("{}")
824
+ id Int @id @default(autoincrement())
825
+ paymentId String @unique
826
+ type trolleyPaymentType?
827
+ status trolleyPaymentStatus
828
+ optInId Int?
829
+ paymentTransactionId Int?
830
+ paymentAmount Int
831
+ metaData Json @default("{}")
831
832
 
832
- optIn OptIn? @relation(fields: [optInId], references: [id])
833
+ optIn OptIn? @relation(fields: [optInId], references: [id])
834
+ paymentTransaction PaymentTransaction? @relation(fields: [paymentTransactionId], references: [id])
833
835
  }
834
836
 
835
837
  enum trolleyPaymentType {
836
838
  optIn
837
839
  tip
838
840
  affiliate
841
+ withdrawal
839
842
  }
840
843
 
841
844
  enum trolleyPaymentStatus {
@@ -1077,9 +1080,25 @@ model PaymentTransaction {
1077
1080
  prevTransaction PaymentTransaction? @relation("TransactionHistory", fields: [prevTransactionId], references: [id])
1078
1081
  nextTransaction PaymentTransaction? @relation("TransactionHistory")
1079
1082
 
1083
+ trolleyPayments TrolleyPayment[]
1084
+
1080
1085
  @@index([accountId])
1081
1086
  }
1082
1087
 
1088
+ /// View to get the latest PaymentTransaction for each creator where accountId equals creatorId
1089
+ view LatestCreatorPaymentTransaction {
1090
+ id Int @id
1091
+ balance Float
1092
+ type String
1093
+ date DateTime
1094
+ notes String?
1095
+ metaData Json
1096
+ accountId Int
1097
+ creatorId Int?
1098
+
1099
+ @@map("latest_creator_payment_transaction")
1100
+ }
1101
+
1083
1102
  model ExternalAffiliateClick {
1084
1103
  id Int @id @default(autoincrement())
1085
1104
  program String
@@ -1286,16 +1305,36 @@ model SocialProfile {
1286
1305
  created DateTime @default(now())
1287
1306
  updated DateTime?
1288
1307
 
1289
- creatorListItems CreatorListItem[]
1290
- campaignInvites CampaignInvite[]
1291
- user User? @relation(fields: [userId], references: [id])
1292
- creditRefundBatches CreditRefundBatch[]
1308
+ creatorListItems CreatorListItem[]
1309
+ campaignInvites CampaignInvite[]
1310
+ user User? @relation(fields: [userId], references: [id])
1311
+ creditRefundBatches CreditRefundBatch[]
1312
+ socialProfileContacts SocialProfileContact[]
1293
1313
 
1294
1314
  @@index(username)
1295
1315
  @@index(userId)
1296
1316
  @@map("socialprofile")
1297
1317
  }
1298
1318
 
1319
+ enum SocialProfileContactSource {
1320
+ MANUAL
1321
+ IMAI
1322
+ }
1323
+
1324
+ model SocialProfileContact {
1325
+ id Int @id @default(autoincrement())
1326
+ type String
1327
+ value String
1328
+ source SocialProfileContactSource @default(MANUAL)
1329
+ metaData Json? @default("{}") @map("meta_data")
1330
+
1331
+ socialProfileId Int @map("social_profile_id")
1332
+
1333
+ socialProfile SocialProfile @relation(fields: [socialProfileId], references: [id], onDelete: Cascade)
1334
+
1335
+ @@map("social_profile_contact")
1336
+ }
1337
+
1299
1338
  model MessageTemplate {
1300
1339
  id Int @id @default(autoincrement())
1301
1340
  label String?
package/wasm.js CHANGED
@@ -581,6 +581,7 @@ exports.Prisma.TrolleyPaymentScalarFieldEnum = {
581
581
  type: 'type',
582
582
  status: 'status',
583
583
  optInId: 'optInId',
584
+ paymentTransactionId: 'paymentTransactionId',
584
585
  paymentAmount: 'paymentAmount',
585
586
  metaData: 'metaData'
586
587
  };
@@ -869,6 +870,15 @@ exports.Prisma.SocialProfileScalarFieldEnum = {
869
870
  updated: 'updated'
870
871
  };
871
872
 
873
+ exports.Prisma.SocialProfileContactScalarFieldEnum = {
874
+ id: 'id',
875
+ type: 'type',
876
+ value: 'value',
877
+ source: 'source',
878
+ metaData: 'metaData',
879
+ socialProfileId: 'socialProfileId'
880
+ };
881
+
872
882
  exports.Prisma.MessageTemplateScalarFieldEnum = {
873
883
  id: 'id',
874
884
  label: 'label',
@@ -1175,6 +1185,17 @@ exports.Prisma.SequenceOutboundReplyEmailScalarFieldEnum = {
1175
1185
  updatedAt: 'updatedAt'
1176
1186
  };
1177
1187
 
1188
+ exports.Prisma.LatestCreatorPaymentTransactionScalarFieldEnum = {
1189
+ id: 'id',
1190
+ balance: 'balance',
1191
+ type: 'type',
1192
+ date: 'date',
1193
+ notes: 'notes',
1194
+ metaData: 'metaData',
1195
+ accountId: 'accountId',
1196
+ creatorId: 'creatorId'
1197
+ };
1198
+
1178
1199
  exports.Prisma.SortOrder = {
1179
1200
  asc: 'asc',
1180
1201
  desc: 'desc'
@@ -1511,6 +1532,11 @@ exports.Prisma.SocialProfileOrderByRelevanceFieldEnum = {
1511
1532
  visibility: 'visibility'
1512
1533
  };
1513
1534
 
1535
+ exports.Prisma.SocialProfileContactOrderByRelevanceFieldEnum = {
1536
+ type: 'type',
1537
+ value: 'value'
1538
+ };
1539
+
1514
1540
  exports.Prisma.MessageTemplateOrderByRelevanceFieldEnum = {
1515
1541
  label: 'label',
1516
1542
  template: 'template'
@@ -1635,10 +1661,16 @@ exports.Prisma.EmailTrackingOrderByRelevanceFieldEnum = {
1635
1661
  exports.Prisma.SequenceOutboundReplyEmailOrderByRelevanceFieldEnum = {
1636
1662
  typeId: 'typeId'
1637
1663
  };
1664
+
1665
+ exports.Prisma.LatestCreatorPaymentTransactionOrderByRelevanceFieldEnum = {
1666
+ type: 'type',
1667
+ notes: 'notes'
1668
+ };
1638
1669
  exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
1639
1670
  optIn: 'optIn',
1640
1671
  tip: 'tip',
1641
- affiliate: 'affiliate'
1672
+ affiliate: 'affiliate',
1673
+ withdrawal: 'withdrawal'
1642
1674
  };
1643
1675
 
1644
1676
  exports.trolleyPaymentStatus = exports.$Enums.trolleyPaymentStatus = {
@@ -1655,6 +1687,11 @@ exports.CampaignToSocialPostStatus = exports.$Enums.CampaignToSocialPostStatus =
1655
1687
  declined: 'declined'
1656
1688
  };
1657
1689
 
1690
+ exports.SocialProfileContactSource = exports.$Enums.SocialProfileContactSource = {
1691
+ MANUAL: 'MANUAL',
1692
+ IMAI: 'IMAI'
1693
+ };
1694
+
1658
1695
  exports.ShopifyStoreSyncStatus = exports.$Enums.ShopifyStoreSyncStatus = {
1659
1696
  syncing: 'syncing',
1660
1697
  synced: 'synced',
@@ -1730,6 +1767,7 @@ exports.Prisma.ModelName = {
1730
1767
  CreatorList: 'CreatorList',
1731
1768
  CreatorListItem: 'CreatorListItem',
1732
1769
  SocialProfile: 'SocialProfile',
1770
+ SocialProfileContact: 'SocialProfileContact',
1733
1771
  MessageTemplate: 'MessageTemplate',
1734
1772
  EmailTemplate: 'EmailTemplate',
1735
1773
  SocialListeningList: 'SocialListeningList',
@@ -1757,7 +1795,8 @@ exports.Prisma.ModelName = {
1757
1795
  CreditRefundBatch: 'CreditRefundBatch',
1758
1796
  EmailProvider: 'EmailProvider',
1759
1797
  EmailTracking: 'EmailTracking',
1760
- SequenceOutboundReplyEmail: 'SequenceOutboundReplyEmail'
1798
+ SequenceOutboundReplyEmail: 'SequenceOutboundReplyEmail',
1799
+ LatestCreatorPaymentTransaction: 'LatestCreatorPaymentTransaction'
1761
1800
  };
1762
1801
 
1763
1802
  /**