@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/package.json CHANGED
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "./*": "./*"
81
81
  },
82
- "version": "1.0.61-alpha-b23a5b2",
82
+ "version": "1.0.61",
83
83
  "sideEffects": false,
84
84
  "description": "Prisma client for creatorco Database"
85
85
  }
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 Int?
363
- parentBrand Brand? @relation("ChildBrands", fields: [parentBrandId], references: [id])
364
- childBrands Brand[] @relation("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 String? @default(dbgenerated())
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
- file String?
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 EmailCredentials {
1637
- id Int @id @default(autoincrement())
1638
- smtpHost String @map("smtp_host")
1639
- smtpUser String @map("smtp_user")
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
- imapHost String @map("imap_host")
1647
- imapUser String @map("imap_user")
1648
- imapPassword String @map("imap_password")
1649
- imapPort Int @map("imap_port")
1650
- imapIsSecure Boolean @map("imap_is_secure")
1642
+ name String
1643
+ description String?
1644
+ status Int
1645
+ md5 String
1646
+ type String
1647
+ size Int
1651
1648
 
1652
- metaData Json @default("{}") @map("meta_data")
1649
+ createdByUserId Int @map("created_by_user_id")
1650
+ createdByUser User @relation("UserCreatedFile", fields: [createdByUserId], references: [id])
1653
1651
 
1654
- brandId Int @map("brand_id")
1652
+ editedByUserId Int? @map("edited_by_user_id")
1653
+ editedByUser User? @relation("UserEditedFile", fields: [editedByUserId], references: [id])
1655
1654
 
1656
- brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
1655
+ createdAt DateTime @default(now()) @map("created_at")
1656
+ updatedAt DateTime @updatedAt @map("updated_at")
1657
+ archivedAt DateTime? @map("archived_at")
1657
1658
 
1658
- sequences Sequence[]
1659
+ brandContract BrandContract?
1659
1660
 
1660
- @@map("email_credentials")
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
- file: 'file',
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.EmailCredentialsScalarFieldEnum = {
1077
- id: 'id',
1078
- smtpHost: 'smtpHost',
1079
- smtpUser: 'smtpUser',
1080
- smtpPassword: 'smtpPassword',
1081
- smtpSenderName: 'smtpSenderName',
1082
- smtpSenderEmail: 'smtpSenderEmail',
1083
- smtpReplyToEmail: 'smtpReplyToEmail',
1084
- smtpPort: 'smtpPort',
1085
- imapHost: 'imapHost',
1086
- imapUser: 'imapUser',
1087
- imapPassword: 'imapPassword',
1088
- imapPort: 'imapPort',
1089
- imapIsSecure: 'imapIsSecure',
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
- file: 'file',
1503
+ fileId: 'fileId',
1507
1504
  contractType: 'contractType'
1508
1505
  };
1509
1506
 
1510
- exports.Prisma.EmailCredentialsOrderByRelevanceFieldEnum = {
1511
- smtpHost: 'smtpHost',
1512
- smtpUser: 'smtpUser',
1513
- smtpPassword: 'smtpPassword',
1514
- smtpSenderName: 'smtpSenderName',
1515
- smtpSenderEmail: 'smtpSenderEmail',
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
- EmailCredentials: 'EmailCredentials'
1621
+ File: 'File'
1629
1622
  };
1630
1623
 
1631
1624
  /**