@creator.co/creatorco-prisma-client 1.0.61-alpha-b23a5b2 → 1.0.61
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 +28 -35
- package/index-browser.js +24 -31
- package/index.d.ts +2531 -1588
- package/index.js +28 -35
- package/package.json +1 -1
- package/schema.prisma +30 -29
- package/wasm.js +24 -31
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -79,6 +79,9 @@ model User {
|
|
|
79
79
|
contractsCreated BrandContract[] @relation("UserCreatedContract") // contracts created by the user
|
|
80
80
|
contractsEdited BrandContract[] @relation("UserEditedContract") // contracts edited by the user
|
|
81
81
|
|
|
82
|
+
filesCreated File[] @relation("UserCreatedFile") // files created by the user
|
|
83
|
+
filesEdited File[] @relation("UserEditedFile") // files edited by the user
|
|
84
|
+
|
|
82
85
|
fullName String? @default(dbgenerated())
|
|
83
86
|
phoneNormalised String? @default(dbgenerated())
|
|
84
87
|
|
|
@@ -357,14 +360,14 @@ model Brand {
|
|
|
357
360
|
shopifyStores ShopifyStore[]
|
|
358
361
|
productLists ProductList[]
|
|
359
362
|
brandContracts BrandContract[]
|
|
363
|
+
files File[]
|
|
360
364
|
|
|
361
365
|
// for agencies
|
|
362
|
-
parentBrandId
|
|
363
|
-
parentBrand
|
|
364
|
-
childBrands
|
|
366
|
+
parentBrandId Int?
|
|
367
|
+
parentBrand Brand? @relation("ChildBrands", fields: [parentBrandId], references: [id])
|
|
368
|
+
childBrands Brand[] @relation("ChildBrands")
|
|
365
369
|
// generated (for search)
|
|
366
|
-
searchName
|
|
367
|
-
smtpCredentials EmailCredentials[]
|
|
370
|
+
searchName String? @default(dbgenerated())
|
|
368
371
|
|
|
369
372
|
@@map("brand")
|
|
370
373
|
}
|
|
@@ -1417,8 +1420,6 @@ model Sequence {
|
|
|
1417
1420
|
brandId Int
|
|
1418
1421
|
enabled Boolean @default(false)
|
|
1419
1422
|
|
|
1420
|
-
emailCredentialsId Int
|
|
1421
|
-
|
|
1422
1423
|
campaign Campaign @relation(fields: [campaignId], references: [id])
|
|
1423
1424
|
creatorList CreatorList @relation(fields: [creatorListId], references: [id])
|
|
1424
1425
|
brand Brand @relation(fields: [brandId], references: [id])
|
|
@@ -1428,8 +1429,6 @@ model Sequence {
|
|
|
1428
1429
|
inboundEmails SequenceInboundEmail[]
|
|
1429
1430
|
imapCheckpoints SequenceImapCheckpoint[]
|
|
1430
1431
|
|
|
1431
|
-
emailCredentials EmailCredentials @relation(fields: [emailCredentialsId], references: [id])
|
|
1432
|
-
|
|
1433
1432
|
@@map("sequence")
|
|
1434
1433
|
}
|
|
1435
1434
|
|
|
@@ -1616,7 +1615,9 @@ model BrandContract {
|
|
|
1616
1615
|
createdAt DateTime @default(now()) @map("created_at")
|
|
1617
1616
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1618
1617
|
|
|
1619
|
-
|
|
1618
|
+
fileId String? @unique @map("file_id")
|
|
1619
|
+
file File? @relation(fields: [fileId], references: [id])
|
|
1620
|
+
|
|
1620
1621
|
contractType String @map("contract_type")
|
|
1621
1622
|
startDate DateTime @map("start_date")
|
|
1622
1623
|
endDate DateTime? @map("end_date")
|
|
@@ -1633,29 +1634,29 @@ model BrandContract {
|
|
|
1633
1634
|
@@map("brand_contract")
|
|
1634
1635
|
}
|
|
1635
1636
|
|
|
1636
|
-
model
|
|
1637
|
-
id
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
smtpPassword String @map("smtp_password")
|
|
1641
|
-
smtpSenderName String @map("smtp_sender_name")
|
|
1642
|
-
smtpSenderEmail String @map("smtp_sender_email")
|
|
1643
|
-
smtpReplyToEmail String @map("smtp_reply_to_email")
|
|
1644
|
-
smtpPort Int @map("smtp_port")
|
|
1637
|
+
model File {
|
|
1638
|
+
id String @id @default(uuid())
|
|
1639
|
+
brandId Int @map("brand_id")
|
|
1640
|
+
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
1645
1641
|
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1642
|
+
name String
|
|
1643
|
+
description String?
|
|
1644
|
+
status Int
|
|
1645
|
+
md5 String
|
|
1646
|
+
type String
|
|
1647
|
+
size Int
|
|
1651
1648
|
|
|
1652
|
-
|
|
1649
|
+
createdByUserId Int @map("created_by_user_id")
|
|
1650
|
+
createdByUser User @relation("UserCreatedFile", fields: [createdByUserId], references: [id])
|
|
1653
1651
|
|
|
1654
|
-
|
|
1652
|
+
editedByUserId Int? @map("edited_by_user_id")
|
|
1653
|
+
editedByUser User? @relation("UserEditedFile", fields: [editedByUserId], references: [id])
|
|
1655
1654
|
|
|
1656
|
-
|
|
1655
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1656
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1657
|
+
archivedAt DateTime? @map("archived_at")
|
|
1657
1658
|
|
|
1658
|
-
|
|
1659
|
+
brandContract BrandContract?
|
|
1659
1660
|
|
|
1660
|
-
@@
|
|
1661
|
+
@@index([brandId])
|
|
1661
1662
|
}
|
package/wasm.js
CHANGED
|
@@ -958,8 +958,7 @@ exports.Prisma.SequenceScalarFieldEnum = {
|
|
|
958
958
|
createdAt: 'createdAt',
|
|
959
959
|
completed: 'completed',
|
|
960
960
|
brandId: 'brandId',
|
|
961
|
-
enabled: 'enabled'
|
|
962
|
-
emailCredentialsId: 'emailCredentialsId'
|
|
961
|
+
enabled: 'enabled'
|
|
963
962
|
};
|
|
964
963
|
|
|
965
964
|
exports.Prisma.SequenceStepScalarFieldEnum = {
|
|
@@ -1064,7 +1063,7 @@ exports.Prisma.BrandContractScalarFieldEnum = {
|
|
|
1064
1063
|
brandId: 'brandId',
|
|
1065
1064
|
createdAt: 'createdAt',
|
|
1066
1065
|
updatedAt: 'updatedAt',
|
|
1067
|
-
|
|
1066
|
+
fileId: 'fileId',
|
|
1068
1067
|
contractType: 'contractType',
|
|
1069
1068
|
startDate: 'startDate',
|
|
1070
1069
|
endDate: 'endDate',
|
|
@@ -1073,22 +1072,20 @@ exports.Prisma.BrandContractScalarFieldEnum = {
|
|
|
1073
1072
|
editedByUserId: 'editedByUserId'
|
|
1074
1073
|
};
|
|
1075
1074
|
|
|
1076
|
-
exports.Prisma.
|
|
1077
|
-
id: 'id',
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
metaData: 'metaData',
|
|
1091
|
-
brandId: 'brandId'
|
|
1075
|
+
exports.Prisma.FileScalarFieldEnum = {
|
|
1076
|
+
id: 'id',
|
|
1077
|
+
brandId: 'brandId',
|
|
1078
|
+
name: 'name',
|
|
1079
|
+
description: 'description',
|
|
1080
|
+
status: 'status',
|
|
1081
|
+
md5: 'md5',
|
|
1082
|
+
type: 'type',
|
|
1083
|
+
size: 'size',
|
|
1084
|
+
createdByUserId: 'createdByUserId',
|
|
1085
|
+
editedByUserId: 'editedByUserId',
|
|
1086
|
+
createdAt: 'createdAt',
|
|
1087
|
+
updatedAt: 'updatedAt',
|
|
1088
|
+
archivedAt: 'archivedAt'
|
|
1092
1089
|
};
|
|
1093
1090
|
|
|
1094
1091
|
exports.Prisma.SortOrder = {
|
|
@@ -1503,20 +1500,16 @@ exports.Prisma.CreatorFlagOrderByRelevanceFieldEnum = {
|
|
|
1503
1500
|
};
|
|
1504
1501
|
|
|
1505
1502
|
exports.Prisma.BrandContractOrderByRelevanceFieldEnum = {
|
|
1506
|
-
|
|
1503
|
+
fileId: 'fileId',
|
|
1507
1504
|
contractType: 'contractType'
|
|
1508
1505
|
};
|
|
1509
1506
|
|
|
1510
|
-
exports.Prisma.
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
smtpReplyToEmail: 'smtpReplyToEmail',
|
|
1517
|
-
imapHost: 'imapHost',
|
|
1518
|
-
imapUser: 'imapUser',
|
|
1519
|
-
imapPassword: 'imapPassword'
|
|
1507
|
+
exports.Prisma.FileOrderByRelevanceFieldEnum = {
|
|
1508
|
+
id: 'id',
|
|
1509
|
+
name: 'name',
|
|
1510
|
+
description: 'description',
|
|
1511
|
+
md5: 'md5',
|
|
1512
|
+
type: 'type'
|
|
1520
1513
|
};
|
|
1521
1514
|
exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
|
|
1522
1515
|
optIn: 'optIn',
|
|
@@ -1625,7 +1618,7 @@ exports.Prisma.ModelName = {
|
|
|
1625
1618
|
ShopifySale: 'ShopifySale',
|
|
1626
1619
|
CreatorFlag: 'CreatorFlag',
|
|
1627
1620
|
BrandContract: 'BrandContract',
|
|
1628
|
-
|
|
1621
|
+
File: 'File'
|
|
1629
1622
|
};
|
|
1630
1623
|
|
|
1631
1624
|
/**
|