@creator.co/creatorco-prisma-client 1.0.79 → 1.0.81-alpha-e54934e

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.79",
95
+ "version": "1.0.81-alpha-e54934e",
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
  }
@@ -326,9 +326,9 @@ model BrandUserProfile {
326
326
 
327
327
  model Brand {
328
328
  id Int @id @default(autoincrement())
329
- name String
329
+ name String @unique
330
330
  description String? @db.Text
331
- website String
331
+ website String?
332
332
  monthlyContacts Int?
333
333
  monthlyReports Int?
334
334
  lastContactDistribution DateTime?
@@ -336,6 +336,7 @@ model Brand {
336
336
  affiliateBaseUrl String? @db.VarChar(2083)
337
337
  affiliateCommission Float?
338
338
  extraData Json @default("{}")
339
+ idmId String? @unique
339
340
 
340
341
  specialistId Int?
341
342
  dedicatedSpecialist User? @relation(fields: [specialistId], references: [id])
@@ -785,7 +786,7 @@ model OptIn {
785
786
  seen Boolean @default(false)
786
787
  instructions String? @db.Text
787
788
  paymentAmount Float?
788
- paymentStatus String @default("pending") /// @deprecated join with TrolleyPayment for actual status
789
+ paymentStatus String @default("pending")
789
790
  extraData Json @default("{}")
790
791
  favoritedDate DateTime?
791
792
  rating Json?
@@ -820,21 +821,24 @@ model OptIn {
820
821
  }
821
822
 
822
823
  model TrolleyPayment {
823
- id Int @id @default(autoincrement())
824
- paymentId String @unique
825
- type trolleyPaymentType?
826
- status trolleyPaymentStatus
827
- optInId Int?
828
- paymentAmount Int
829
- 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("{}")
830
832
 
831
- optIn OptIn? @relation(fields: [optInId], references: [id])
833
+ optIn OptIn? @relation(fields: [optInId], references: [id])
834
+ paymentTransaction PaymentTransaction? @relation(fields: [paymentTransactionId], references: [id])
832
835
  }
833
836
 
834
837
  enum trolleyPaymentType {
835
838
  optIn
836
839
  tip
837
840
  affiliate
841
+ withdrawal
838
842
  }
839
843
 
840
844
  enum trolleyPaymentStatus {
@@ -1076,9 +1080,25 @@ model PaymentTransaction {
1076
1080
  prevTransaction PaymentTransaction? @relation("TransactionHistory", fields: [prevTransactionId], references: [id])
1077
1081
  nextTransaction PaymentTransaction? @relation("TransactionHistory")
1078
1082
 
1083
+ trolleyPayments TrolleyPayment[]
1084
+
1079
1085
  @@index([accountId])
1080
1086
  }
1081
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
+
1082
1102
  model ExternalAffiliateClick {
1083
1103
  id Int @id @default(autoincrement())
1084
1104
  program String
package/wasm.js CHANGED
@@ -321,6 +321,7 @@ exports.Prisma.BrandScalarFieldEnum = {
321
321
  affiliateBaseUrl: 'affiliateBaseUrl',
322
322
  affiliateCommission: 'affiliateCommission',
323
323
  extraData: 'extraData',
324
+ idmId: 'idmId',
324
325
  specialistId: 'specialistId',
325
326
  parentBrandId: 'parentBrandId',
326
327
  searchName: 'searchName'
@@ -580,6 +581,7 @@ exports.Prisma.TrolleyPaymentScalarFieldEnum = {
580
581
  type: 'type',
581
582
  status: 'status',
582
583
  optInId: 'optInId',
584
+ paymentTransactionId: 'paymentTransactionId',
583
585
  paymentAmount: 'paymentAmount',
584
586
  metaData: 'metaData'
585
587
  };
@@ -1174,6 +1176,17 @@ exports.Prisma.SequenceOutboundReplyEmailScalarFieldEnum = {
1174
1176
  updatedAt: 'updatedAt'
1175
1177
  };
1176
1178
 
1179
+ exports.Prisma.LatestCreatorPaymentTransactionScalarFieldEnum = {
1180
+ id: 'id',
1181
+ balance: 'balance',
1182
+ type: 'type',
1183
+ date: 'date',
1184
+ notes: 'notes',
1185
+ metaData: 'metaData',
1186
+ accountId: 'accountId',
1187
+ creatorId: 'creatorId'
1188
+ };
1189
+
1177
1190
  exports.Prisma.SortOrder = {
1178
1191
  asc: 'asc',
1179
1192
  desc: 'desc'
@@ -1300,6 +1313,7 @@ exports.Prisma.BrandOrderByRelevanceFieldEnum = {
1300
1313
  website: 'website',
1301
1314
  logoUrl: 'logoUrl',
1302
1315
  affiliateBaseUrl: 'affiliateBaseUrl',
1316
+ idmId: 'idmId',
1303
1317
  searchName: 'searchName'
1304
1318
  };
1305
1319
 
@@ -1633,10 +1647,16 @@ exports.Prisma.EmailTrackingOrderByRelevanceFieldEnum = {
1633
1647
  exports.Prisma.SequenceOutboundReplyEmailOrderByRelevanceFieldEnum = {
1634
1648
  typeId: 'typeId'
1635
1649
  };
1650
+
1651
+ exports.Prisma.LatestCreatorPaymentTransactionOrderByRelevanceFieldEnum = {
1652
+ type: 'type',
1653
+ notes: 'notes'
1654
+ };
1636
1655
  exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
1637
1656
  optIn: 'optIn',
1638
1657
  tip: 'tip',
1639
- affiliate: 'affiliate'
1658
+ affiliate: 'affiliate',
1659
+ withdrawal: 'withdrawal'
1640
1660
  };
1641
1661
 
1642
1662
  exports.trolleyPaymentStatus = exports.$Enums.trolleyPaymentStatus = {
@@ -1755,7 +1775,8 @@ exports.Prisma.ModelName = {
1755
1775
  CreditRefundBatch: 'CreditRefundBatch',
1756
1776
  EmailProvider: 'EmailProvider',
1757
1777
  EmailTracking: 'EmailTracking',
1758
- SequenceOutboundReplyEmail: 'SequenceOutboundReplyEmail'
1778
+ SequenceOutboundReplyEmail: 'SequenceOutboundReplyEmail',
1779
+ LatestCreatorPaymentTransaction: 'LatestCreatorPaymentTransaction'
1759
1780
  };
1760
1781
 
1761
1782
  /**