@creator.co/creatorco-prisma-client 1.0.88 → 1.0.90
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 +79 -5
- package/index-browser.js +74 -0
- package/index.d.ts +23313 -16070
- package/index.js +79 -5
- package/package.json +1 -1
- package/schema.prisma +78 -0
- package/wasm.js +74 -0
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -353,6 +353,7 @@ model Brand {
|
|
|
353
353
|
savedfiles SavedFile[]
|
|
354
354
|
creatorLists CreatorList[]
|
|
355
355
|
affiliateLinks BrandAffiliateLink[]
|
|
356
|
+
affiliateConfigurations AffiliateConfiguration[]
|
|
356
357
|
messageTemplate MessageTemplate[]
|
|
357
358
|
emailTemplates EmailTemplate[]
|
|
358
359
|
socialListeningLists SocialListeningList[]
|
|
@@ -552,6 +553,7 @@ model Campaign {
|
|
|
552
553
|
campaignToShopifyProducts CampaignToShopifyProduct[]
|
|
553
554
|
campaignToBrandAffiliateLinks CampaignToBrandAffiliateLink[]
|
|
554
555
|
linkedPosts CampaignToSocialPost[]
|
|
556
|
+
affiliateResolvers AffiliateResolver[]
|
|
555
557
|
|
|
556
558
|
brandId Int
|
|
557
559
|
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
@@ -808,6 +810,7 @@ model OptIn {
|
|
|
808
810
|
campaignInvites CampaignInvite[]
|
|
809
811
|
trolleyPayments TrolleyPayment[]
|
|
810
812
|
affiliateClicks AffiliateClick[]
|
|
813
|
+
affiliateResolvers AffiliateResolver[]
|
|
811
814
|
productListItems OptinToProductListItem[]
|
|
812
815
|
ExternalAffiliateClick ExternalAffiliateClick[]
|
|
813
816
|
ImpactRadiusEvent ImpactRadiusEvent[]
|
|
@@ -1158,6 +1161,65 @@ model BrandAffiliateLink {
|
|
|
1158
1161
|
@@index([brandId])
|
|
1159
1162
|
}
|
|
1160
1163
|
|
|
1164
|
+
model AffiliateConfiguration {
|
|
1165
|
+
id Int @id @default(autoincrement())
|
|
1166
|
+
integrationId String
|
|
1167
|
+
platform String
|
|
1168
|
+
extraData Json @default("{}")
|
|
1169
|
+
editorUserId Int?
|
|
1170
|
+
brandId Int
|
|
1171
|
+
createdAt DateTime @default(now())
|
|
1172
|
+
updatedAt DateTime @updatedAt
|
|
1173
|
+
|
|
1174
|
+
brand Brand @relation(fields: [brandId], references: [id])
|
|
1175
|
+
pricingGroups AffiliatePricingGroup[]
|
|
1176
|
+
|
|
1177
|
+
@@index([brandId])
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
model AffiliatePricingGroup {
|
|
1181
|
+
id Int @id @default(autoincrement())
|
|
1182
|
+
rules Json
|
|
1183
|
+
commissionType AffiliateCommissionType
|
|
1184
|
+
value Float
|
|
1185
|
+
affiliateConfigurationId Int
|
|
1186
|
+
editorUserId Int?
|
|
1187
|
+
createdAt DateTime @default(now())
|
|
1188
|
+
updatedAt DateTime @updatedAt
|
|
1189
|
+
|
|
1190
|
+
affiliateConfiguration AffiliateConfiguration @relation(fields: [affiliateConfigurationId], references: [id])
|
|
1191
|
+
|
|
1192
|
+
@@index([affiliateConfigurationId])
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
enum AffiliateCommissionType {
|
|
1196
|
+
commission
|
|
1197
|
+
sale
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
model AffiliateResolver {
|
|
1201
|
+
id Int @id @default(autoincrement())
|
|
1202
|
+
type AffiliateResolverType
|
|
1203
|
+
value String
|
|
1204
|
+
extraData Json @default("{}")
|
|
1205
|
+
editorUserId Int?
|
|
1206
|
+
createdAt DateTime @default(now())
|
|
1207
|
+
updatedAt DateTime @updatedAt
|
|
1208
|
+
campaignId Int
|
|
1209
|
+
optInId Int?
|
|
1210
|
+
|
|
1211
|
+
campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
|
|
1212
|
+
optIn OptIn? @relation(fields: [optInId], references: [id], onDelete: Cascade)
|
|
1213
|
+
|
|
1214
|
+
@@index([campaignId])
|
|
1215
|
+
@@index([optInId])
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
enum AffiliateResolverType {
|
|
1219
|
+
coupon
|
|
1220
|
+
link
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1161
1223
|
model AffiliateLink {
|
|
1162
1224
|
id Int @id @default(autoincrement())
|
|
1163
1225
|
created DateTime @default(now())
|
|
@@ -1877,3 +1939,19 @@ model SequenceOutboundReplyEmail {
|
|
|
1877
1939
|
|
|
1878
1940
|
@@map("sequenceoutboundreplyemail") // Custom table name
|
|
1879
1941
|
}
|
|
1942
|
+
|
|
1943
|
+
model LLMPrompt {
|
|
1944
|
+
id String @id @default(uuid())
|
|
1945
|
+
collectionName String // Logical identifier for the LLM chain (e.g., "campaign-generation", "creator-search")
|
|
1946
|
+
version Int // Incremental version number, always positive and forward-moving
|
|
1947
|
+
steps Json // Array of objects: [{prompt: string, role: string}, ...]
|
|
1948
|
+
published Boolean @default(false) // Only one version per collectionId can be published
|
|
1949
|
+
extraData Json @default("{}") // Additional metadata for future extensibility
|
|
1950
|
+
editorUserId Int?
|
|
1951
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1952
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1953
|
+
|
|
1954
|
+
@@unique([collectionName, version]) // Ensure unique version per collection
|
|
1955
|
+
@@index([collectionName, published]) // Index for finding published versions
|
|
1956
|
+
@@map("llm_prompt")
|
|
1957
|
+
}
|
package/wasm.js
CHANGED
|
@@ -760,6 +760,40 @@ exports.Prisma.BrandAffiliateLinkScalarFieldEnum = {
|
|
|
760
760
|
brandId: 'brandId'
|
|
761
761
|
};
|
|
762
762
|
|
|
763
|
+
exports.Prisma.AffiliateConfigurationScalarFieldEnum = {
|
|
764
|
+
id: 'id',
|
|
765
|
+
integrationId: 'integrationId',
|
|
766
|
+
platform: 'platform',
|
|
767
|
+
extraData: 'extraData',
|
|
768
|
+
editorUserId: 'editorUserId',
|
|
769
|
+
brandId: 'brandId',
|
|
770
|
+
createdAt: 'createdAt',
|
|
771
|
+
updatedAt: 'updatedAt'
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
exports.Prisma.AffiliatePricingGroupScalarFieldEnum = {
|
|
775
|
+
id: 'id',
|
|
776
|
+
rules: 'rules',
|
|
777
|
+
commissionType: 'commissionType',
|
|
778
|
+
value: 'value',
|
|
779
|
+
affiliateConfigurationId: 'affiliateConfigurationId',
|
|
780
|
+
editorUserId: 'editorUserId',
|
|
781
|
+
createdAt: 'createdAt',
|
|
782
|
+
updatedAt: 'updatedAt'
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
exports.Prisma.AffiliateResolverScalarFieldEnum = {
|
|
786
|
+
id: 'id',
|
|
787
|
+
type: 'type',
|
|
788
|
+
value: 'value',
|
|
789
|
+
extraData: 'extraData',
|
|
790
|
+
editorUserId: 'editorUserId',
|
|
791
|
+
createdAt: 'createdAt',
|
|
792
|
+
updatedAt: 'updatedAt',
|
|
793
|
+
campaignId: 'campaignId',
|
|
794
|
+
optInId: 'optInId'
|
|
795
|
+
};
|
|
796
|
+
|
|
763
797
|
exports.Prisma.AffiliateLinkScalarFieldEnum = {
|
|
764
798
|
id: 'id',
|
|
765
799
|
created: 'created',
|
|
@@ -1189,6 +1223,18 @@ exports.Prisma.SequenceOutboundReplyEmailScalarFieldEnum = {
|
|
|
1189
1223
|
updatedAt: 'updatedAt'
|
|
1190
1224
|
};
|
|
1191
1225
|
|
|
1226
|
+
exports.Prisma.LLMPromptScalarFieldEnum = {
|
|
1227
|
+
id: 'id',
|
|
1228
|
+
collectionName: 'collectionName',
|
|
1229
|
+
version: 'version',
|
|
1230
|
+
steps: 'steps',
|
|
1231
|
+
published: 'published',
|
|
1232
|
+
extraData: 'extraData',
|
|
1233
|
+
editorUserId: 'editorUserId',
|
|
1234
|
+
createdAt: 'createdAt',
|
|
1235
|
+
updatedAt: 'updatedAt'
|
|
1236
|
+
};
|
|
1237
|
+
|
|
1192
1238
|
exports.Prisma.LatestCreatorPaymentTransactionScalarFieldEnum = {
|
|
1193
1239
|
id: 'id',
|
|
1194
1240
|
balance: 'balance',
|
|
@@ -1507,6 +1553,15 @@ exports.Prisma.BrandAffiliateLinkOrderByRelevanceFieldEnum = {
|
|
|
1507
1553
|
urlPath: 'urlPath'
|
|
1508
1554
|
};
|
|
1509
1555
|
|
|
1556
|
+
exports.Prisma.AffiliateConfigurationOrderByRelevanceFieldEnum = {
|
|
1557
|
+
integrationId: 'integrationId',
|
|
1558
|
+
platform: 'platform'
|
|
1559
|
+
};
|
|
1560
|
+
|
|
1561
|
+
exports.Prisma.AffiliateResolverOrderByRelevanceFieldEnum = {
|
|
1562
|
+
value: 'value'
|
|
1563
|
+
};
|
|
1564
|
+
|
|
1510
1565
|
exports.Prisma.AffiliateClickOrderByRelevanceFieldEnum = {
|
|
1511
1566
|
visitorIp: 'visitorIp',
|
|
1512
1567
|
IPv6: 'IPv6'
|
|
@@ -1683,6 +1738,11 @@ exports.Prisma.SequenceOutboundReplyEmailOrderByRelevanceFieldEnum = {
|
|
|
1683
1738
|
typeId: 'typeId'
|
|
1684
1739
|
};
|
|
1685
1740
|
|
|
1741
|
+
exports.Prisma.LLMPromptOrderByRelevanceFieldEnum = {
|
|
1742
|
+
id: 'id',
|
|
1743
|
+
collectionName: 'collectionName'
|
|
1744
|
+
};
|
|
1745
|
+
|
|
1686
1746
|
exports.Prisma.LatestCreatorPaymentTransactionOrderByRelevanceFieldEnum = {
|
|
1687
1747
|
type: 'type',
|
|
1688
1748
|
notes: 'notes'
|
|
@@ -1712,6 +1772,16 @@ exports.CampaignToSocialPostStatus = exports.$Enums.CampaignToSocialPostStatus =
|
|
|
1712
1772
|
declined: 'declined'
|
|
1713
1773
|
};
|
|
1714
1774
|
|
|
1775
|
+
exports.AffiliateCommissionType = exports.$Enums.AffiliateCommissionType = {
|
|
1776
|
+
commission: 'commission',
|
|
1777
|
+
sale: 'sale'
|
|
1778
|
+
};
|
|
1779
|
+
|
|
1780
|
+
exports.AffiliateResolverType = exports.$Enums.AffiliateResolverType = {
|
|
1781
|
+
coupon: 'coupon',
|
|
1782
|
+
link: 'link'
|
|
1783
|
+
};
|
|
1784
|
+
|
|
1715
1785
|
exports.ConnectionStatus = exports.$Enums.ConnectionStatus = {
|
|
1716
1786
|
CONNECTED: 'CONNECTED',
|
|
1717
1787
|
ERROR: 'ERROR',
|
|
@@ -1790,6 +1860,9 @@ exports.Prisma.ModelName = {
|
|
|
1790
1860
|
PaymentTransaction: 'PaymentTransaction',
|
|
1791
1861
|
ExternalAffiliateClick: 'ExternalAffiliateClick',
|
|
1792
1862
|
BrandAffiliateLink: 'BrandAffiliateLink',
|
|
1863
|
+
AffiliateConfiguration: 'AffiliateConfiguration',
|
|
1864
|
+
AffiliatePricingGroup: 'AffiliatePricingGroup',
|
|
1865
|
+
AffiliateResolver: 'AffiliateResolver',
|
|
1793
1866
|
AffiliateLink: 'AffiliateLink',
|
|
1794
1867
|
AffiliateClick: 'AffiliateClick',
|
|
1795
1868
|
AffiliateEvent: 'AffiliateEvent',
|
|
@@ -1828,6 +1901,7 @@ exports.Prisma.ModelName = {
|
|
|
1828
1901
|
EmailProvider: 'EmailProvider',
|
|
1829
1902
|
EmailTracking: 'EmailTracking',
|
|
1830
1903
|
SequenceOutboundReplyEmail: 'SequenceOutboundReplyEmail',
|
|
1904
|
+
LLMPrompt: 'LLMPrompt',
|
|
1831
1905
|
LatestCreatorPaymentTransaction: 'LatestCreatorPaymentTransaction',
|
|
1832
1906
|
SocialPostAnalytics: 'SocialPostAnalytics'
|
|
1833
1907
|
};
|