@creator.co/creatorco-prisma-client 1.0.51 → 1.0.53-alpha-ec58990
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 +21 -7
- package/index-browser.js +17 -3
- package/index.d.ts +3490 -1312
- package/index.js +21 -7
- package/package.json +1 -1
- package/schema.prisma +32 -7
- package/wasm.js +17 -3
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -71,7 +71,7 @@ model User {
|
|
|
71
71
|
socialProfiles SocialProfile[]
|
|
72
72
|
rakutenActivity RakutenActivity[]
|
|
73
73
|
impactRadiusEvents ImpactRadiusEvent[]
|
|
74
|
-
cjEvents
|
|
74
|
+
cjEvents CjEvent[]
|
|
75
75
|
flagsAssigned CreatorFlag[] @relation("UserAssignedFlags") // flags assigned to the user
|
|
76
76
|
flagsCreated CreatorFlag[] @relation("UserCreatedFlags") // flags created by the user
|
|
77
77
|
flagsEdited CreatorFlag[] @relation("UserEditedFlags") // flags edited by the user
|
|
@@ -349,7 +349,7 @@ model Brand {
|
|
|
349
349
|
creatorsearchfilter CreatorSearchFilter[]
|
|
350
350
|
sequences Sequence[]
|
|
351
351
|
impactRadiusEvents ImpactRadiusEvent[]
|
|
352
|
-
cjEvents
|
|
352
|
+
cjEvents CjEvent[]
|
|
353
353
|
shopifyStores ShopifyStore[]
|
|
354
354
|
productLists ProductList[]
|
|
355
355
|
|
|
@@ -532,6 +532,7 @@ model Campaign {
|
|
|
532
532
|
campaignInvites CampaignInvite[]
|
|
533
533
|
campaignToShopifyProducts CampaignToShopifyProduct[]
|
|
534
534
|
campaignToBrandAffiliateLinks CampaignToBrandAffiliateLink[]
|
|
535
|
+
linkedPosts CampaignToSocialPost[]
|
|
535
536
|
|
|
536
537
|
brandId Int
|
|
537
538
|
brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
|
|
@@ -787,7 +788,7 @@ model OptIn {
|
|
|
787
788
|
productListItems OptinToProductListItem[]
|
|
788
789
|
ExternalAffiliateClick ExternalAffiliateClick[]
|
|
789
790
|
ImpactRadiusEvent ImpactRadiusEvent[]
|
|
790
|
-
|
|
791
|
+
CjEvent CjEvent[]
|
|
791
792
|
ShareASaleEvents ShareASaleEvent[]
|
|
792
793
|
shopifyDiscountCodes ShopifyDiscountCode[]
|
|
793
794
|
|
|
@@ -876,9 +877,10 @@ model SocialPost {
|
|
|
876
877
|
userId Int?
|
|
877
878
|
campaignId Int?
|
|
878
879
|
|
|
879
|
-
user
|
|
880
|
-
campaign
|
|
881
|
-
lists
|
|
880
|
+
user User? @relation(fields: [userId], references: [id])
|
|
881
|
+
campaign Campaign? @relation(fields: [campaignId], references: [id])
|
|
882
|
+
lists ListToSocialPost[]
|
|
883
|
+
campaigns CampaignToSocialPost[]
|
|
882
884
|
|
|
883
885
|
@@unique([platform, externalId])
|
|
884
886
|
@@index(campaignId)
|
|
@@ -887,6 +889,27 @@ model SocialPost {
|
|
|
887
889
|
@@map("socialpost")
|
|
888
890
|
}
|
|
889
891
|
|
|
892
|
+
enum CampaignToSocialPostStatus {
|
|
893
|
+
pending
|
|
894
|
+
approved
|
|
895
|
+
declined
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
model CampaignToSocialPost {
|
|
899
|
+
campaignId Int @map("campaign_id")
|
|
900
|
+
socialPostId Int @map("social_post_id")
|
|
901
|
+
|
|
902
|
+
status CampaignToSocialPostStatus @default(pending)
|
|
903
|
+
created DateTime @default(now())
|
|
904
|
+
|
|
905
|
+
campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
|
|
906
|
+
socialPost SocialPost @relation(fields: [socialPostId], references: [id], onDelete: Cascade)
|
|
907
|
+
|
|
908
|
+
@@id([campaignId, socialPostId])
|
|
909
|
+
@@index(status)
|
|
910
|
+
@@map("campaign_to_social_post")
|
|
911
|
+
}
|
|
912
|
+
|
|
890
913
|
// Table for storing archived socialposts from before external_id was implemented
|
|
891
914
|
model ArchivedSocialPost {
|
|
892
915
|
id Int @id @default(autoincrement())
|
|
@@ -1291,7 +1314,7 @@ model ImpactRadiusEvent {
|
|
|
1291
1314
|
optIn OptIn? @relation(fields: [optInId], references: [id])
|
|
1292
1315
|
}
|
|
1293
1316
|
|
|
1294
|
-
model
|
|
1317
|
+
model CjEvent {
|
|
1295
1318
|
id Int @id @default(autoincrement())
|
|
1296
1319
|
type String // action/click
|
|
1297
1320
|
created DateTime @default(now())
|
|
@@ -1306,6 +1329,8 @@ model CJEvent {
|
|
|
1306
1329
|
user User @relation(fields: [userId], references: [id])
|
|
1307
1330
|
brand Brand? @relation(fields: [brandId], references: [id])
|
|
1308
1331
|
optIn OptIn? @relation(fields: [optInId], references: [id])
|
|
1332
|
+
|
|
1333
|
+
@@map("cjevent")
|
|
1309
1334
|
}
|
|
1310
1335
|
|
|
1311
1336
|
model ShareASaleEvent {
|
package/wasm.js
CHANGED
|
@@ -621,6 +621,13 @@ exports.Prisma.SocialPostScalarFieldEnum = {
|
|
|
621
621
|
campaignId: 'campaignId'
|
|
622
622
|
};
|
|
623
623
|
|
|
624
|
+
exports.Prisma.CampaignToSocialPostScalarFieldEnum = {
|
|
625
|
+
campaignId: 'campaignId',
|
|
626
|
+
socialPostId: 'socialPostId',
|
|
627
|
+
status: 'status',
|
|
628
|
+
created: 'created'
|
|
629
|
+
};
|
|
630
|
+
|
|
624
631
|
exports.Prisma.ArchivedSocialPostScalarFieldEnum = {
|
|
625
632
|
id: 'id',
|
|
626
633
|
phylloId: 'phylloId',
|
|
@@ -884,7 +891,7 @@ exports.Prisma.ImpactRadiusEventScalarFieldEnum = {
|
|
|
884
891
|
optInId: 'optInId'
|
|
885
892
|
};
|
|
886
893
|
|
|
887
|
-
exports.Prisma.
|
|
894
|
+
exports.Prisma.CjEventScalarFieldEnum = {
|
|
888
895
|
id: 'id',
|
|
889
896
|
type: 'type',
|
|
890
897
|
created: 'created',
|
|
@@ -1372,7 +1379,7 @@ exports.Prisma.ImpactRadiusEventOrderByRelevanceFieldEnum = {
|
|
|
1372
1379
|
type: 'type'
|
|
1373
1380
|
};
|
|
1374
1381
|
|
|
1375
|
-
exports.Prisma.
|
|
1382
|
+
exports.Prisma.CjEventOrderByRelevanceFieldEnum = {
|
|
1376
1383
|
type: 'type'
|
|
1377
1384
|
};
|
|
1378
1385
|
|
|
@@ -1434,6 +1441,12 @@ exports.trolleyPaymentStatus = exports.$Enums.trolleyPaymentStatus = {
|
|
|
1434
1441
|
returned: 'returned'
|
|
1435
1442
|
};
|
|
1436
1443
|
|
|
1444
|
+
exports.CampaignToSocialPostStatus = exports.$Enums.CampaignToSocialPostStatus = {
|
|
1445
|
+
pending: 'pending',
|
|
1446
|
+
approved: 'approved',
|
|
1447
|
+
declined: 'declined'
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1437
1450
|
exports.ShopifyStoreSyncStatus = exports.$Enums.ShopifyStoreSyncStatus = {
|
|
1438
1451
|
syncing: 'syncing',
|
|
1439
1452
|
synced: 'synced',
|
|
@@ -1479,6 +1492,7 @@ exports.Prisma.ModelName = {
|
|
|
1479
1492
|
TrolleyPayment: 'TrolleyPayment',
|
|
1480
1493
|
OptInVariable: 'OptInVariable',
|
|
1481
1494
|
SocialPost: 'SocialPost',
|
|
1495
|
+
CampaignToSocialPost: 'CampaignToSocialPost',
|
|
1482
1496
|
ArchivedSocialPost: 'ArchivedSocialPost',
|
|
1483
1497
|
Image: 'Image',
|
|
1484
1498
|
BrandImage: 'BrandImage',
|
|
@@ -1502,7 +1516,7 @@ exports.Prisma.ModelName = {
|
|
|
1502
1516
|
OptInView: 'OptInView',
|
|
1503
1517
|
RakutenActivity: 'RakutenActivity',
|
|
1504
1518
|
ImpactRadiusEvent: 'ImpactRadiusEvent',
|
|
1505
|
-
|
|
1519
|
+
CjEvent: 'CjEvent',
|
|
1506
1520
|
ShareASaleEvent: 'ShareASaleEvent',
|
|
1507
1521
|
CreatorSearchFilter: 'CreatorSearchFilter',
|
|
1508
1522
|
Sequence: 'Sequence',
|