@creator.co/creatorco-prisma-client 1.0.75 → 1.0.77

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
@@ -92,7 +92,7 @@
92
92
  },
93
93
  "./*": "./*"
94
94
  },
95
- "version": "1.0.75",
95
+ "version": "1.0.77",
96
96
  "sideEffects": false,
97
97
  "description": "Prisma client for creatorco Database"
98
98
  }
package/schema.prisma CHANGED
@@ -83,6 +83,9 @@ model User {
83
83
  filesCreated File[] @relation("UserCreatedFile") // files created by the user
84
84
  filesEdited File[] @relation("UserEditedFile") // files edited by the user
85
85
 
86
+ createdEmailProviders EmailProvider[] @relation("UserCreatedEmailProvider")
87
+ editedEmailProviders EmailProvider[] @relation("UserEditedEmailProvider")
88
+
86
89
  fullName String? @default(dbgenerated())
87
90
  phoneNormalised String? @default(dbgenerated())
88
91
 
@@ -363,6 +366,8 @@ model Brand {
363
366
  brandContracts BrandContract[]
364
367
  files File[]
365
368
  creditRefundBatches CreditRefundBatch[]
369
+ emailProviders EmailProvider[]
370
+ emailTrackings EmailTracking[]
366
371
 
367
372
  // for agencies
368
373
  parentBrandId Int?
@@ -1456,10 +1461,12 @@ model Sequence {
1456
1461
  creatorList CreatorList @relation(fields: [creatorListId], references: [id])
1457
1462
  brand Brand @relation(fields: [brandId], references: [id])
1458
1463
 
1459
- steps SequenceStep[]
1460
- outboundEmails SequenceOutboundEmail[]
1461
- inboundEmails SequenceInboundEmail[]
1462
- imapCheckpoints SequenceImapCheckpoint[]
1464
+ steps SequenceStep[]
1465
+ outboundEmails SequenceOutboundEmail[]
1466
+ inboundEmails SequenceInboundEmail[]
1467
+ imapCheckpoints SequenceImapCheckpoint[]
1468
+ emailTrackings EmailTracking[]
1469
+ sequenceoutboundreplyemail SequenceOutboundReplyEmail[]
1463
1470
 
1464
1471
  @@map("sequence")
1465
1472
  }
@@ -1714,3 +1721,78 @@ model CreditRefundBatch {
1714
1721
 
1715
1722
  @@map("credit_refund_batch")
1716
1723
  }
1724
+
1725
+ model EmailProvider {
1726
+ id String @id @default(uuid())
1727
+ providerType String
1728
+ providerEmail String @unique
1729
+ status Status
1730
+ senderName String?
1731
+ configurationStatus ConfigurationStatus
1732
+ isDefault Boolean @default(false)
1733
+ accessToken String
1734
+ refreshToken String
1735
+ smtpServer String?
1736
+ smtpPort String?
1737
+ smtpUsername String?
1738
+ smtpPassword String?
1739
+ smtpSenderName String?
1740
+ smtpSenderEmail String?
1741
+ smtpRelyAddress String?
1742
+ imapServer String?
1743
+ imapPort String?
1744
+ imapUser String?
1745
+ imapPassword String?
1746
+ enableSSL Boolean @default(false)
1747
+ brandId Int
1748
+ brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
1749
+ createdByUserId Int
1750
+ createdByUser User @relation("UserCreatedEmailProvider", fields: [createdByUserId], references: [id])
1751
+ editedByUserId Int?
1752
+ editedByUser User? @relation("UserEditedEmailProvider", fields: [editedByUserId], references: [id])
1753
+ createdAt DateTime @default(now())
1754
+ updatedAt DateTime @updatedAt
1755
+ }
1756
+
1757
+ enum Status {
1758
+ connected
1759
+ disconnected
1760
+ }
1761
+
1762
+ enum ConfigurationStatus {
1763
+ configured
1764
+ failed
1765
+ }
1766
+
1767
+ model EmailTracking {
1768
+ id String @id @default(uuid())
1769
+ trackingId String @unique
1770
+ brandId Int
1771
+ recipientEmail String
1772
+ emailType String
1773
+ campaignName String?
1774
+ sequenceId Int?
1775
+ sequenceStepId Int?
1776
+ templateId Int?
1777
+ sentAt DateTime @default(now())
1778
+ opened Boolean @default(false)
1779
+ openedAt DateTime?
1780
+ openCount Int @default(0)
1781
+
1782
+ // Relations
1783
+ brand Brand @relation(fields: [brandId], references: [id])
1784
+ sequence Sequence? @relation(fields: [sequenceId], references: [id])
1785
+ }
1786
+
1787
+ model SequenceOutboundReplyEmail {
1788
+ id Int @id @default(autoincrement()) // Auto-increment ID
1789
+ sequenceId Int // Foreign key to Sequence model
1790
+ type Int // Type of the email (1 for Gmail, 2 for Outlook)
1791
+ typeId String // threadId for Gmail, conversationId for Outlook
1792
+ createdAt DateTime @default(now()) // Timestamp when the record is created
1793
+ updatedAt DateTime @updatedAt // Timestamp for when the record is updated
1794
+ // Relations with other models
1795
+ sequence Sequence @relation(fields: [sequenceId], references: [id])
1796
+
1797
+ @@map("sequenceoutboundreplyemail") // Custom table name
1798
+ }
package/wasm.js CHANGED
@@ -1116,6 +1116,60 @@ exports.Prisma.CreditRefundBatchScalarFieldEnum = {
1116
1116
  brandId: 'brandId'
1117
1117
  };
1118
1118
 
1119
+ exports.Prisma.EmailProviderScalarFieldEnum = {
1120
+ id: 'id',
1121
+ providerType: 'providerType',
1122
+ providerEmail: 'providerEmail',
1123
+ status: 'status',
1124
+ senderName: 'senderName',
1125
+ configurationStatus: 'configurationStatus',
1126
+ isDefault: 'isDefault',
1127
+ accessToken: 'accessToken',
1128
+ refreshToken: 'refreshToken',
1129
+ smtpServer: 'smtpServer',
1130
+ smtpPort: 'smtpPort',
1131
+ smtpUsername: 'smtpUsername',
1132
+ smtpPassword: 'smtpPassword',
1133
+ smtpSenderName: 'smtpSenderName',
1134
+ smtpSenderEmail: 'smtpSenderEmail',
1135
+ smtpRelyAddress: 'smtpRelyAddress',
1136
+ imapServer: 'imapServer',
1137
+ imapPort: 'imapPort',
1138
+ imapUser: 'imapUser',
1139
+ imapPassword: 'imapPassword',
1140
+ enableSSL: 'enableSSL',
1141
+ brandId: 'brandId',
1142
+ createdByUserId: 'createdByUserId',
1143
+ editedByUserId: 'editedByUserId',
1144
+ createdAt: 'createdAt',
1145
+ updatedAt: 'updatedAt'
1146
+ };
1147
+
1148
+ exports.Prisma.EmailTrackingScalarFieldEnum = {
1149
+ id: 'id',
1150
+ trackingId: 'trackingId',
1151
+ brandId: 'brandId',
1152
+ recipientEmail: 'recipientEmail',
1153
+ emailType: 'emailType',
1154
+ campaignName: 'campaignName',
1155
+ sequenceId: 'sequenceId',
1156
+ sequenceStepId: 'sequenceStepId',
1157
+ templateId: 'templateId',
1158
+ sentAt: 'sentAt',
1159
+ opened: 'opened',
1160
+ openedAt: 'openedAt',
1161
+ openCount: 'openCount'
1162
+ };
1163
+
1164
+ exports.Prisma.SequenceOutboundReplyEmailScalarFieldEnum = {
1165
+ id: 'id',
1166
+ sequenceId: 'sequenceId',
1167
+ type: 'type',
1168
+ typeId: 'typeId',
1169
+ createdAt: 'createdAt',
1170
+ updatedAt: 'updatedAt'
1171
+ };
1172
+
1119
1173
  exports.Prisma.SortOrder = {
1120
1174
  asc: 'asc',
1121
1175
  desc: 'desc'
@@ -1543,6 +1597,38 @@ exports.Prisma.FileOrderByRelevanceFieldEnum = {
1543
1597
  md5: 'md5',
1544
1598
  type: 'type'
1545
1599
  };
1600
+
1601
+ exports.Prisma.EmailProviderOrderByRelevanceFieldEnum = {
1602
+ id: 'id',
1603
+ providerType: 'providerType',
1604
+ providerEmail: 'providerEmail',
1605
+ senderName: 'senderName',
1606
+ accessToken: 'accessToken',
1607
+ refreshToken: 'refreshToken',
1608
+ smtpServer: 'smtpServer',
1609
+ smtpPort: 'smtpPort',
1610
+ smtpUsername: 'smtpUsername',
1611
+ smtpPassword: 'smtpPassword',
1612
+ smtpSenderName: 'smtpSenderName',
1613
+ smtpSenderEmail: 'smtpSenderEmail',
1614
+ smtpRelyAddress: 'smtpRelyAddress',
1615
+ imapServer: 'imapServer',
1616
+ imapPort: 'imapPort',
1617
+ imapUser: 'imapUser',
1618
+ imapPassword: 'imapPassword'
1619
+ };
1620
+
1621
+ exports.Prisma.EmailTrackingOrderByRelevanceFieldEnum = {
1622
+ id: 'id',
1623
+ trackingId: 'trackingId',
1624
+ recipientEmail: 'recipientEmail',
1625
+ emailType: 'emailType',
1626
+ campaignName: 'campaignName'
1627
+ };
1628
+
1629
+ exports.Prisma.SequenceOutboundReplyEmailOrderByRelevanceFieldEnum = {
1630
+ typeId: 'typeId'
1631
+ };
1546
1632
  exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
1547
1633
  optIn: 'optIn',
1548
1634
  tip: 'tip',
@@ -1569,6 +1655,16 @@ exports.ShopifyStoreSyncStatus = exports.$Enums.ShopifyStoreSyncStatus = {
1569
1655
  error: 'error'
1570
1656
  };
1571
1657
 
1658
+ exports.Status = exports.$Enums.Status = {
1659
+ connected: 'connected',
1660
+ disconnected: 'disconnected'
1661
+ };
1662
+
1663
+ exports.ConfigurationStatus = exports.$Enums.ConfigurationStatus = {
1664
+ configured: 'configured',
1665
+ failed: 'failed'
1666
+ };
1667
+
1572
1668
  exports.Prisma.ModelName = {
1573
1669
  User: 'User',
1574
1670
  Log: 'Log',
@@ -1652,7 +1748,10 @@ exports.Prisma.ModelName = {
1652
1748
  CreatorFlag: 'CreatorFlag',
1653
1749
  BrandContract: 'BrandContract',
1654
1750
  File: 'File',
1655
- CreditRefundBatch: 'CreditRefundBatch'
1751
+ CreditRefundBatch: 'CreditRefundBatch',
1752
+ EmailProvider: 'EmailProvider',
1753
+ EmailTracking: 'EmailTracking',
1754
+ SequenceOutboundReplyEmail: 'SequenceOutboundReplyEmail'
1656
1755
  };
1657
1756
 
1658
1757
  /**