@creator.co/creatorco-prisma-client 1.0.58 → 1.0.60
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 +44 -5
- package/index-browser.js +40 -1
- package/index.d.ts +5822 -947
- package/index.js +44 -5
- package/package.json +1 -1
- package/schema.prisma +68 -25
- package/wasm.js +40 -1
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -76,6 +76,8 @@ model User {
|
|
|
76
76
|
flagsCreated CreatorFlag[] @relation("UserCreatedFlags") // flags created by the user
|
|
77
77
|
flagsEdited CreatorFlag[] @relation("UserEditedFlags") // flags edited by the user
|
|
78
78
|
affiliatePayoutBatches AffiliatePayoutBatch[]
|
|
79
|
+
contractsCreated BrandContract[] @relation("UserCreatedContract") // contracts created by the user
|
|
80
|
+
contractsEdited BrandContract[] @relation("UserEditedContract") // contracts edited by the user
|
|
79
81
|
|
|
80
82
|
fullName String? @default(dbgenerated())
|
|
81
83
|
phoneNormalised String? @default(dbgenerated())
|
|
@@ -328,31 +330,33 @@ model Brand {
|
|
|
328
330
|
affiliateCommission Float?
|
|
329
331
|
extraData Json @default("{}")
|
|
330
332
|
|
|
331
|
-
specialistId
|
|
332
|
-
dedicatedSpecialist
|
|
333
|
-
instagramProfile
|
|
334
|
-
youtubeProfile
|
|
335
|
-
tiktokProfile
|
|
336
|
-
campaigns
|
|
337
|
-
brandUsers
|
|
338
|
-
searchContacts
|
|
339
|
-
reportCredits
|
|
340
|
-
categories
|
|
341
|
-
paymentTransactions
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
333
|
+
specialistId Int?
|
|
334
|
+
dedicatedSpecialist User? @relation(fields: [specialistId], references: [id])
|
|
335
|
+
instagramProfile InstagramProfile?
|
|
336
|
+
youtubeProfile YoutubeProfile?
|
|
337
|
+
tiktokProfile TiktokProfile?
|
|
338
|
+
campaigns Campaign[]
|
|
339
|
+
brandUsers BrandUserProfile[]
|
|
340
|
+
searchContacts SearchContacts[]
|
|
341
|
+
reportCredits ReportCredits[]
|
|
342
|
+
categories BrandToCategory[]
|
|
343
|
+
paymentTransactions PaymentTransaction[]
|
|
344
|
+
PendingBrandInvoicePayments PendingBrandInvoicePayment[]
|
|
345
|
+
savedfiles SavedFile[]
|
|
346
|
+
creatorLists CreatorList[]
|
|
347
|
+
affiliateLinks BrandAffiliateLink[]
|
|
348
|
+
messageTemplate MessageTemplate[]
|
|
349
|
+
emailTemplates EmailTemplate[]
|
|
350
|
+
socialListeningLists SocialListeningList[]
|
|
351
|
+
campaignInvites CampaignInvite[]
|
|
352
|
+
images BrandToImage[]
|
|
353
|
+
creatorsearchfilter CreatorSearchFilter[]
|
|
354
|
+
sequences Sequence[]
|
|
355
|
+
impactRadiusEvents ImpactRadiusEvent[]
|
|
356
|
+
cjEvents CjEvent[]
|
|
357
|
+
shopifyStores ShopifyStore[]
|
|
358
|
+
productLists ProductList[]
|
|
359
|
+
brandContracts BrandContract[]
|
|
356
360
|
|
|
357
361
|
// for agencies
|
|
358
362
|
parentBrandId Int?
|
|
@@ -1002,6 +1006,20 @@ model State {
|
|
|
1002
1006
|
@@map("state")
|
|
1003
1007
|
}
|
|
1004
1008
|
|
|
1009
|
+
model PendingBrandInvoicePayment {
|
|
1010
|
+
id Int @id @default(autoincrement())
|
|
1011
|
+
invoiceId String
|
|
1012
|
+
type String
|
|
1013
|
+
source String
|
|
1014
|
+
brandId Int?
|
|
1015
|
+
status String
|
|
1016
|
+
|
|
1017
|
+
brand Brand? @relation(fields: [brandId], references: [id])
|
|
1018
|
+
|
|
1019
|
+
createdAt DateTime @default(now())
|
|
1020
|
+
updatedAt DateTime @updatedAt
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1005
1023
|
model PaymentTransaction {
|
|
1006
1024
|
id Int @id @default(autoincrement())
|
|
1007
1025
|
amount Float
|
|
@@ -1584,3 +1602,28 @@ model CreatorFlag {
|
|
|
1584
1602
|
editedByUserId Int? // user ID of the admin who last edited the flag
|
|
1585
1603
|
editedByUser User? @relation("UserEditedFlags", fields: [editedByUserId], references: [id])
|
|
1586
1604
|
}
|
|
1605
|
+
|
|
1606
|
+
model BrandContract {
|
|
1607
|
+
id Int @id @default(autoincrement())
|
|
1608
|
+
brandId Int @map("brand_id")
|
|
1609
|
+
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
1610
|
+
|
|
1611
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1612
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1613
|
+
|
|
1614
|
+
file String?
|
|
1615
|
+
contractType String @map("contract_type")
|
|
1616
|
+
startDate DateTime @map("start_date")
|
|
1617
|
+
endDate DateTime? @map("end_date")
|
|
1618
|
+
|
|
1619
|
+
archivedAt DateTime? @map("archived_at")
|
|
1620
|
+
|
|
1621
|
+
createdByUserId Int @map("created_by_user_id")
|
|
1622
|
+
createdByUser User @relation("UserCreatedContract", fields: [createdByUserId], references: [id])
|
|
1623
|
+
|
|
1624
|
+
editedByUserId Int? @map("edited_by_user_id")
|
|
1625
|
+
editedByUser User? @relation("UserEditedContract", fields: [editedByUserId], references: [id])
|
|
1626
|
+
|
|
1627
|
+
@@index([brandId])
|
|
1628
|
+
@@map("brand_contract")
|
|
1629
|
+
}
|
package/wasm.js
CHANGED
|
@@ -693,6 +693,17 @@ exports.Prisma.StateScalarFieldEnum = {
|
|
|
693
693
|
stateName: 'stateName'
|
|
694
694
|
};
|
|
695
695
|
|
|
696
|
+
exports.Prisma.PendingBrandInvoicePaymentScalarFieldEnum = {
|
|
697
|
+
id: 'id',
|
|
698
|
+
invoiceId: 'invoiceId',
|
|
699
|
+
type: 'type',
|
|
700
|
+
source: 'source',
|
|
701
|
+
brandId: 'brandId',
|
|
702
|
+
status: 'status',
|
|
703
|
+
createdAt: 'createdAt',
|
|
704
|
+
updatedAt: 'updatedAt'
|
|
705
|
+
};
|
|
706
|
+
|
|
696
707
|
exports.Prisma.PaymentTransactionScalarFieldEnum = {
|
|
697
708
|
id: 'id',
|
|
698
709
|
amount: 'amount',
|
|
@@ -1047,6 +1058,20 @@ exports.Prisma.CreatorFlagScalarFieldEnum = {
|
|
|
1047
1058
|
editedByUserId: 'editedByUserId'
|
|
1048
1059
|
};
|
|
1049
1060
|
|
|
1061
|
+
exports.Prisma.BrandContractScalarFieldEnum = {
|
|
1062
|
+
id: 'id',
|
|
1063
|
+
brandId: 'brandId',
|
|
1064
|
+
createdAt: 'createdAt',
|
|
1065
|
+
updatedAt: 'updatedAt',
|
|
1066
|
+
file: 'file',
|
|
1067
|
+
contractType: 'contractType',
|
|
1068
|
+
startDate: 'startDate',
|
|
1069
|
+
endDate: 'endDate',
|
|
1070
|
+
archivedAt: 'archivedAt',
|
|
1071
|
+
createdByUserId: 'createdByUserId',
|
|
1072
|
+
editedByUserId: 'editedByUserId'
|
|
1073
|
+
};
|
|
1074
|
+
|
|
1050
1075
|
exports.Prisma.SortOrder = {
|
|
1051
1076
|
asc: 'asc',
|
|
1052
1077
|
desc: 'desc'
|
|
@@ -1311,6 +1336,13 @@ exports.Prisma.StateOrderByRelevanceFieldEnum = {
|
|
|
1311
1336
|
stateName: 'stateName'
|
|
1312
1337
|
};
|
|
1313
1338
|
|
|
1339
|
+
exports.Prisma.PendingBrandInvoicePaymentOrderByRelevanceFieldEnum = {
|
|
1340
|
+
invoiceId: 'invoiceId',
|
|
1341
|
+
type: 'type',
|
|
1342
|
+
source: 'source',
|
|
1343
|
+
status: 'status'
|
|
1344
|
+
};
|
|
1345
|
+
|
|
1314
1346
|
exports.Prisma.PaymentTransactionOrderByRelevanceFieldEnum = {
|
|
1315
1347
|
type: 'type',
|
|
1316
1348
|
notes: 'notes'
|
|
@@ -1450,6 +1482,11 @@ exports.Prisma.CreatorFlagOrderByRelevanceFieldEnum = {
|
|
|
1450
1482
|
comment: 'comment',
|
|
1451
1483
|
color: 'color'
|
|
1452
1484
|
};
|
|
1485
|
+
|
|
1486
|
+
exports.Prisma.BrandContractOrderByRelevanceFieldEnum = {
|
|
1487
|
+
file: 'file',
|
|
1488
|
+
contractType: 'contractType'
|
|
1489
|
+
};
|
|
1453
1490
|
exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
|
|
1454
1491
|
optIn: 'optIn',
|
|
1455
1492
|
tip: 'tip',
|
|
@@ -1521,6 +1558,7 @@ exports.Prisma.ModelName = {
|
|
|
1521
1558
|
BrandImage: 'BrandImage',
|
|
1522
1559
|
Country: 'Country',
|
|
1523
1560
|
State: 'State',
|
|
1561
|
+
PendingBrandInvoicePayment: 'PendingBrandInvoicePayment',
|
|
1524
1562
|
PaymentTransaction: 'PaymentTransaction',
|
|
1525
1563
|
ExternalAffiliateClick: 'ExternalAffiliateClick',
|
|
1526
1564
|
BrandAffiliateLink: 'BrandAffiliateLink',
|
|
@@ -1554,7 +1592,8 @@ exports.Prisma.ModelName = {
|
|
|
1554
1592
|
CampaignToShopifyProduct: 'CampaignToShopifyProduct',
|
|
1555
1593
|
ShopifyDiscountCode: 'ShopifyDiscountCode',
|
|
1556
1594
|
ShopifySale: 'ShopifySale',
|
|
1557
|
-
CreatorFlag: 'CreatorFlag'
|
|
1595
|
+
CreatorFlag: 'CreatorFlag',
|
|
1596
|
+
BrandContract: 'BrandContract'
|
|
1558
1597
|
};
|
|
1559
1598
|
|
|
1560
1599
|
/**
|