@creator.co/creatorco-prisma-client 1.0.59 → 1.0.61-alpha-8d6ef3c
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 +64 -5
- package/index-browser.js +60 -1
- package/index.d.ts +6908 -146
- package/index.js +64 -5
- package/package.json +1 -1
- package/schema.prisma +63 -4
- package/wasm.js +60 -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())
|
|
@@ -354,13 +356,16 @@ model Brand {
|
|
|
354
356
|
cjEvents CjEvent[]
|
|
355
357
|
shopifyStores ShopifyStore[]
|
|
356
358
|
productLists ProductList[]
|
|
359
|
+
brandContracts BrandContract[]
|
|
357
360
|
|
|
358
361
|
// for agencies
|
|
359
|
-
parentBrandId
|
|
360
|
-
parentBrand
|
|
361
|
-
childBrands
|
|
362
|
+
parentBrandId Int?
|
|
363
|
+
parentBrand Brand? @relation("ChildBrands", fields: [parentBrandId], references: [id])
|
|
364
|
+
childBrands Brand[] @relation("ChildBrands")
|
|
362
365
|
// generated (for search)
|
|
363
|
-
searchName
|
|
366
|
+
searchName String? @default(dbgenerated())
|
|
367
|
+
smtpCredentials SMTPCredentials[]
|
|
368
|
+
imapCredentials IMAPCredentials[]
|
|
364
369
|
|
|
365
370
|
@@map("brand")
|
|
366
371
|
}
|
|
@@ -1599,3 +1604,57 @@ model CreatorFlag {
|
|
|
1599
1604
|
editedByUserId Int? // user ID of the admin who last edited the flag
|
|
1600
1605
|
editedByUser User? @relation("UserEditedFlags", fields: [editedByUserId], references: [id])
|
|
1601
1606
|
}
|
|
1607
|
+
|
|
1608
|
+
model BrandContract {
|
|
1609
|
+
id Int @id @default(autoincrement())
|
|
1610
|
+
brandId Int @map("brand_id")
|
|
1611
|
+
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
1612
|
+
|
|
1613
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1614
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1615
|
+
|
|
1616
|
+
file String?
|
|
1617
|
+
contractType String @map("contract_type")
|
|
1618
|
+
startDate DateTime @map("start_date")
|
|
1619
|
+
endDate DateTime? @map("end_date")
|
|
1620
|
+
|
|
1621
|
+
archivedAt DateTime? @map("archived_at")
|
|
1622
|
+
|
|
1623
|
+
createdByUserId Int @map("created_by_user_id")
|
|
1624
|
+
createdByUser User @relation("UserCreatedContract", fields: [createdByUserId], references: [id])
|
|
1625
|
+
|
|
1626
|
+
editedByUserId Int? @map("edited_by_user_id")
|
|
1627
|
+
editedByUser User? @relation("UserEditedContract", fields: [editedByUserId], references: [id])
|
|
1628
|
+
|
|
1629
|
+
@@index([brandId])
|
|
1630
|
+
@@map("brand_contract")
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
model SMTPCredentials {
|
|
1634
|
+
id Int @id @default(autoincrement())
|
|
1635
|
+
host String
|
|
1636
|
+
user String
|
|
1637
|
+
password String
|
|
1638
|
+
senderName String
|
|
1639
|
+
emailAddress String
|
|
1640
|
+
portNumber Int
|
|
1641
|
+
metaData Json @default("{}")
|
|
1642
|
+
|
|
1643
|
+
brandId Int
|
|
1644
|
+
|
|
1645
|
+
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
model IMAPCredentials {
|
|
1649
|
+
id Int @id @default(autoincrement())
|
|
1650
|
+
host String
|
|
1651
|
+
user String
|
|
1652
|
+
portNumber Int
|
|
1653
|
+
password String
|
|
1654
|
+
isSecure Boolean
|
|
1655
|
+
metaData Json @default("{}")
|
|
1656
|
+
|
|
1657
|
+
brandId Int
|
|
1658
|
+
|
|
1659
|
+
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
1660
|
+
}
|
package/wasm.js
CHANGED
|
@@ -1058,6 +1058,43 @@ exports.Prisma.CreatorFlagScalarFieldEnum = {
|
|
|
1058
1058
|
editedByUserId: 'editedByUserId'
|
|
1059
1059
|
};
|
|
1060
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
|
+
|
|
1075
|
+
exports.Prisma.SMTPCredentialsScalarFieldEnum = {
|
|
1076
|
+
id: 'id',
|
|
1077
|
+
host: 'host',
|
|
1078
|
+
user: 'user',
|
|
1079
|
+
password: 'password',
|
|
1080
|
+
senderName: 'senderName',
|
|
1081
|
+
emailAddress: 'emailAddress',
|
|
1082
|
+
portNumber: 'portNumber',
|
|
1083
|
+
metaData: 'metaData',
|
|
1084
|
+
brandId: 'brandId'
|
|
1085
|
+
};
|
|
1086
|
+
|
|
1087
|
+
exports.Prisma.IMAPCredentialsScalarFieldEnum = {
|
|
1088
|
+
id: 'id',
|
|
1089
|
+
host: 'host',
|
|
1090
|
+
user: 'user',
|
|
1091
|
+
portNumber: 'portNumber',
|
|
1092
|
+
password: 'password',
|
|
1093
|
+
isSecure: 'isSecure',
|
|
1094
|
+
metaData: 'metaData',
|
|
1095
|
+
brandId: 'brandId'
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1061
1098
|
exports.Prisma.SortOrder = {
|
|
1062
1099
|
asc: 'asc',
|
|
1063
1100
|
desc: 'desc'
|
|
@@ -1468,6 +1505,25 @@ exports.Prisma.CreatorFlagOrderByRelevanceFieldEnum = {
|
|
|
1468
1505
|
comment: 'comment',
|
|
1469
1506
|
color: 'color'
|
|
1470
1507
|
};
|
|
1508
|
+
|
|
1509
|
+
exports.Prisma.BrandContractOrderByRelevanceFieldEnum = {
|
|
1510
|
+
file: 'file',
|
|
1511
|
+
contractType: 'contractType'
|
|
1512
|
+
};
|
|
1513
|
+
|
|
1514
|
+
exports.Prisma.SMTPCredentialsOrderByRelevanceFieldEnum = {
|
|
1515
|
+
host: 'host',
|
|
1516
|
+
user: 'user',
|
|
1517
|
+
password: 'password',
|
|
1518
|
+
senderName: 'senderName',
|
|
1519
|
+
emailAddress: 'emailAddress'
|
|
1520
|
+
};
|
|
1521
|
+
|
|
1522
|
+
exports.Prisma.IMAPCredentialsOrderByRelevanceFieldEnum = {
|
|
1523
|
+
host: 'host',
|
|
1524
|
+
user: 'user',
|
|
1525
|
+
password: 'password'
|
|
1526
|
+
};
|
|
1471
1527
|
exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
|
|
1472
1528
|
optIn: 'optIn',
|
|
1473
1529
|
tip: 'tip',
|
|
@@ -1573,7 +1629,10 @@ exports.Prisma.ModelName = {
|
|
|
1573
1629
|
CampaignToShopifyProduct: 'CampaignToShopifyProduct',
|
|
1574
1630
|
ShopifyDiscountCode: 'ShopifyDiscountCode',
|
|
1575
1631
|
ShopifySale: 'ShopifySale',
|
|
1576
|
-
CreatorFlag: 'CreatorFlag'
|
|
1632
|
+
CreatorFlag: 'CreatorFlag',
|
|
1633
|
+
BrandContract: 'BrandContract',
|
|
1634
|
+
SMTPCredentials: 'SMTPCredentials',
|
|
1635
|
+
IMAPCredentials: 'IMAPCredentials'
|
|
1577
1636
|
};
|
|
1578
1637
|
|
|
1579
1638
|
/**
|