@creator.co/creatorco-prisma-client 1.0.56 → 1.0.57-alpha-4c71c2e
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 +26 -6
- package/index-browser.js +22 -2
- package/index.d.ts +2402 -140
- package/index.js +26 -6
- package/package.json +1 -1
- package/schema.prisma +54 -30
- package/wasm.js +22 -2
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -50,31 +50,32 @@ model User {
|
|
|
50
50
|
|
|
51
51
|
referrerId Int?
|
|
52
52
|
|
|
53
|
-
referrer
|
|
54
|
-
referredUsers
|
|
55
|
-
logs
|
|
56
|
-
creatorProfile
|
|
57
|
-
instagramProfile
|
|
58
|
-
youtubeProfile
|
|
59
|
-
tiktokProfile
|
|
60
|
-
facebookProfile
|
|
61
|
-
twitterProfile
|
|
62
|
-
twitchProfile
|
|
63
|
-
brandProfiles
|
|
64
|
-
optIns
|
|
65
|
-
assignedBrands
|
|
66
|
-
messages
|
|
67
|
-
socialPosts
|
|
68
|
-
paymentTransactions
|
|
69
|
-
affiliateLinks
|
|
70
|
-
campaignPins
|
|
71
|
-
socialProfiles
|
|
72
|
-
rakutenActivity
|
|
73
|
-
impactRadiusEvents
|
|
74
|
-
cjEvents
|
|
75
|
-
flagsAssigned
|
|
76
|
-
flagsCreated
|
|
77
|
-
flagsEdited
|
|
53
|
+
referrer User? @relation("Referrals", fields: [referrerId], references: [id])
|
|
54
|
+
referredUsers User[] @relation("Referrals")
|
|
55
|
+
logs Log[]
|
|
56
|
+
creatorProfile CreatorProfile?
|
|
57
|
+
instagramProfile InstagramProfile?
|
|
58
|
+
youtubeProfile YoutubeProfile?
|
|
59
|
+
tiktokProfile TiktokProfile?
|
|
60
|
+
facebookProfile FacebookProfile?
|
|
61
|
+
twitterProfile TwitterProfile?
|
|
62
|
+
twitchProfile TwitchProfile?
|
|
63
|
+
brandProfiles BrandUserProfile[]
|
|
64
|
+
optIns OptIn[]
|
|
65
|
+
assignedBrands Brand[]
|
|
66
|
+
messages Message[]
|
|
67
|
+
socialPosts SocialPost[]
|
|
68
|
+
paymentTransactions PaymentTransaction[]
|
|
69
|
+
affiliateLinks AffiliateLink[]
|
|
70
|
+
campaignPins CampaignPin[]
|
|
71
|
+
socialProfiles SocialProfile[]
|
|
72
|
+
rakutenActivity RakutenActivity[]
|
|
73
|
+
impactRadiusEvents ImpactRadiusEvent[]
|
|
74
|
+
cjEvents CjEvent[]
|
|
75
|
+
flagsAssigned CreatorFlag[] @relation("UserAssignedFlags") // flags assigned to the user
|
|
76
|
+
flagsCreated CreatorFlag[] @relation("UserCreatedFlags") // flags created by the user
|
|
77
|
+
flagsEdited CreatorFlag[] @relation("UserEditedFlags") // flags edited by the user
|
|
78
|
+
affiliatePayoutBatches AffiliatePayoutBatch[]
|
|
78
79
|
|
|
79
80
|
fullName String? @default(dbgenerated())
|
|
80
81
|
phoneNormalised String? @default(dbgenerated())
|
|
@@ -1089,19 +1090,42 @@ model AffiliateClick {
|
|
|
1089
1090
|
}
|
|
1090
1091
|
|
|
1091
1092
|
model AffiliateEvent {
|
|
1092
|
-
id Int
|
|
1093
|
+
id Int @id @default(autoincrement())
|
|
1093
1094
|
event String // click, purchase, etc.
|
|
1094
|
-
created DateTime
|
|
1095
|
+
created DateTime @default(now())
|
|
1096
|
+
updatedAt DateTime? @updatedAt
|
|
1095
1097
|
visitorIp String?
|
|
1096
1098
|
urlPath String?
|
|
1097
1099
|
revenue Float?
|
|
1098
1100
|
commissionAmount Float?
|
|
1099
1101
|
commissionPercent Float?
|
|
1100
|
-
|
|
1102
|
+
platform String?
|
|
1103
|
+
externalOrderId String? @map("external_order_id")
|
|
1104
|
+
metaData Json @default("{}")
|
|
1105
|
+
|
|
1106
|
+
affiliateClickId Int
|
|
1107
|
+
affiliatePayoutBatchId Int? @map("affiliate_payout_batch_id")
|
|
1108
|
+
|
|
1109
|
+
affiliateClick AffiliateClick? @relation(fields: [affiliateClickId], references: [id])
|
|
1110
|
+
affiliatePayoutBatch AffiliatePayoutBatch? @relation(fields: [affiliatePayoutBatchId], references: [id])
|
|
1111
|
+
|
|
1112
|
+
@@unique([platform, externalOrderId])
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
model AffiliatePayoutBatch {
|
|
1116
|
+
id Int @id @default(autoincrement())
|
|
1117
|
+
createdAt DateTime @default(now())
|
|
1118
|
+
updatedAt DateTime @updatedAt
|
|
1119
|
+
metaData Json @default("{}") @map("meta_data")
|
|
1120
|
+
trolleyBatchId String? @unique @map("trolley_batch_id")
|
|
1121
|
+
|
|
1122
|
+
userId Int @map("user_id")
|
|
1123
|
+
|
|
1124
|
+
user User @relation(fields: [userId], references: [id])
|
|
1101
1125
|
|
|
1102
|
-
|
|
1126
|
+
affiliateEvents AffiliateEvent[]
|
|
1103
1127
|
|
|
1104
|
-
|
|
1128
|
+
@@map("affiliate_payout_batch")
|
|
1105
1129
|
}
|
|
1106
1130
|
|
|
1107
1131
|
model SavedFile {
|
package/wasm.js
CHANGED
|
@@ -751,13 +751,26 @@ exports.Prisma.AffiliateEventScalarFieldEnum = {
|
|
|
751
751
|
id: 'id',
|
|
752
752
|
event: 'event',
|
|
753
753
|
created: 'created',
|
|
754
|
+
updatedAt: 'updatedAt',
|
|
754
755
|
visitorIp: 'visitorIp',
|
|
755
756
|
urlPath: 'urlPath',
|
|
756
757
|
revenue: 'revenue',
|
|
757
758
|
commissionAmount: 'commissionAmount',
|
|
758
759
|
commissionPercent: 'commissionPercent',
|
|
760
|
+
platform: 'platform',
|
|
761
|
+
externalOrderId: 'externalOrderId',
|
|
762
|
+
metaData: 'metaData',
|
|
763
|
+
affiliateClickId: 'affiliateClickId',
|
|
764
|
+
affiliatePayoutBatchId: 'affiliatePayoutBatchId'
|
|
765
|
+
};
|
|
766
|
+
|
|
767
|
+
exports.Prisma.AffiliatePayoutBatchScalarFieldEnum = {
|
|
768
|
+
id: 'id',
|
|
769
|
+
createdAt: 'createdAt',
|
|
770
|
+
updatedAt: 'updatedAt',
|
|
759
771
|
metaData: 'metaData',
|
|
760
|
-
|
|
772
|
+
trolleyBatchId: 'trolleyBatchId',
|
|
773
|
+
userId: 'userId'
|
|
761
774
|
};
|
|
762
775
|
|
|
763
776
|
exports.Prisma.SavedFileScalarFieldEnum = {
|
|
@@ -1321,7 +1334,13 @@ exports.Prisma.AffiliateClickOrderByRelevanceFieldEnum = {
|
|
|
1321
1334
|
exports.Prisma.AffiliateEventOrderByRelevanceFieldEnum = {
|
|
1322
1335
|
event: 'event',
|
|
1323
1336
|
visitorIp: 'visitorIp',
|
|
1324
|
-
urlPath: 'urlPath'
|
|
1337
|
+
urlPath: 'urlPath',
|
|
1338
|
+
platform: 'platform',
|
|
1339
|
+
externalOrderId: 'externalOrderId'
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
exports.Prisma.AffiliatePayoutBatchOrderByRelevanceFieldEnum = {
|
|
1343
|
+
trolleyBatchId: 'trolleyBatchId'
|
|
1325
1344
|
};
|
|
1326
1345
|
|
|
1327
1346
|
exports.Prisma.SavedFileOrderByRelevanceFieldEnum = {
|
|
@@ -1506,6 +1525,7 @@ exports.Prisma.ModelName = {
|
|
|
1506
1525
|
AffiliateLink: 'AffiliateLink',
|
|
1507
1526
|
AffiliateClick: 'AffiliateClick',
|
|
1508
1527
|
AffiliateEvent: 'AffiliateEvent',
|
|
1528
|
+
AffiliatePayoutBatch: 'AffiliatePayoutBatch',
|
|
1509
1529
|
SavedFile: 'SavedFile',
|
|
1510
1530
|
CampaignInvite: 'CampaignInvite',
|
|
1511
1531
|
CreatorList: 'CreatorList',
|