@creator.co/creatorco-prisma-client 1.0.22-alpha-c4b16cb → 1.0.22-alpha-c781f9f

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/schema.prisma CHANGED
@@ -10,6 +10,7 @@ generator kysely {
10
10
  fileName = "types.ts"
11
11
  enumFileName = "enums.ts"
12
12
  readOnlyIds = true
13
+ camelCase = true
13
14
  jsonTypeOverride = Json
14
15
  }
15
16
 
@@ -341,7 +342,6 @@ model Brand {
341
342
  creatorsearchfilter CreatorSearchFilter[]
342
343
  sequences Sequence[]
343
344
  impactRadiusEvents ImpactRadiusEvent[]
344
- shopifyStores ShopifyStore[]
345
345
 
346
346
  // for agencies
347
347
  parentBrandId Int?
@@ -518,7 +518,6 @@ model Campaign {
518
518
  campaignPins CampaignPin[]
519
519
  socialPosts SocialPost[]
520
520
  campaignInvites CampaignInvite[]
521
- campaignToShopifyProducts CampaignToShopifyProduct[]
522
521
 
523
522
  brandId Int
524
523
  brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
@@ -685,6 +684,7 @@ model OptIn {
685
684
  paymentAmount Float?
686
685
  paymentStatus String @default("pending") // depracated -- refer to trolley payment table
687
686
  extraData Json @default("{}")
687
+ favoritedDate DateTime?
688
688
 
689
689
  userId Int
690
690
  campaignId Int
@@ -1221,51 +1221,4 @@ model SequenceImapCheckpoint {
1221
1221
 
1222
1222
  @@id([sequenceId, creatorListItemId])
1223
1223
  @@map("sequenceimapcheckpoint")
1224
- }
1225
-
1226
- model ShopifyStore {
1227
- id Int @id @default(autoincrement())
1228
- shopifyId String? @unique @map("shopify_id")
1229
- name String?
1230
- url String
1231
- accessToken String? @map("access_token")
1232
- metaData Json @default("{}") @map("meta_data")
1233
-
1234
- brandId Int @map("brand_id")
1235
-
1236
- products ShopifyProduct[]
1237
-
1238
- brand Brand? @relation(fields: [brandId], references: [id])
1239
-
1240
- @@map("shopify_store")
1241
- }
1242
- model ShopifyProduct {
1243
- id Int @id @default(autoincrement())
1244
- shopifyId String @unique @map("shopify_id")
1245
- title String
1246
- handle String
1247
- imageUrl String @db.Text @map("image_url")
1248
-
1249
- metaData Json @default("{}") @map("meta_data")
1250
-
1251
- lastSynced DateTime @default(now()) @map("last_synced")
1252
-
1253
- shopifyStoreId Int @map("shopify_store_id")
1254
-
1255
- campaignToShopifyProducts CampaignToShopifyProduct[]
1256
-
1257
- shopifyStore ShopifyStore @relation(fields: [shopifyStoreId], references: [id])
1258
-
1259
- @@map("shopify_product")
1260
- }
1261
-
1262
- model CampaignToShopifyProduct {
1263
- campaignId Int @map("campaign_id")
1264
- shopifyProductId Int @map("shopify_product_id")
1265
-
1266
- campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
1267
- shopifyProduct ShopifyProduct @relation(fields: [shopifyProductId], references: [id], onDelete: Cascade)
1268
-
1269
- @@id([campaignId, shopifyProductId])
1270
- @@map("campaign_to_shopify_product")
1271
1224
  }
package/wasm.js CHANGED
@@ -6,7 +6,7 @@ const {
6
6
  objectEnumValues,
7
7
  makeStrictEnum,
8
8
  Public,
9
- detectRuntime,
9
+ getRuntime,
10
10
  } = require('./runtime/index-browser.js')
11
11
 
12
12
 
@@ -16,36 +16,42 @@ exports.Prisma = Prisma
16
16
  exports.$Enums = {}
17
17
 
18
18
  /**
19
- * Prisma Client JS version: 5.9.1
20
- * Query Engine version: 23fdc5965b1e05fc54e5f26ed3de66776b93de64
19
+ * Prisma Client JS version: 5.11.0
20
+ * Query Engine version: efd2449663b3d73d637ea1fd226bafbcf45b3102
21
21
  */
22
22
  Prisma.prismaVersion = {
23
- client: "5.9.1",
24
- engine: "23fdc5965b1e05fc54e5f26ed3de66776b93de64"
23
+ client: "5.11.0",
24
+ engine: "efd2449663b3d73d637ea1fd226bafbcf45b3102"
25
25
  }
26
26
 
27
27
  Prisma.PrismaClientKnownRequestError = () => {
28
- throw new Error(`PrismaClientKnownRequestError is unable to be run ${runtimeDescription}.
28
+ const runtimeName = getRuntime().prettyName;
29
+ throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
29
30
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
30
31
  )};
31
32
  Prisma.PrismaClientUnknownRequestError = () => {
32
- throw new Error(`PrismaClientUnknownRequestError is unable to be run ${runtimeDescription}.
33
+ const runtimeName = getRuntime().prettyName;
34
+ throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
33
35
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
34
36
  )}
35
37
  Prisma.PrismaClientRustPanicError = () => {
36
- throw new Error(`PrismaClientRustPanicError is unable to be run ${runtimeDescription}.
38
+ const runtimeName = getRuntime().prettyName;
39
+ throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
37
40
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
38
41
  )}
39
42
  Prisma.PrismaClientInitializationError = () => {
40
- throw new Error(`PrismaClientInitializationError is unable to be run ${runtimeDescription}.
43
+ const runtimeName = getRuntime().prettyName;
44
+ throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
41
45
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
42
46
  )}
43
47
  Prisma.PrismaClientValidationError = () => {
44
- throw new Error(`PrismaClientValidationError is unable to be run ${runtimeDescription}.
48
+ const runtimeName = getRuntime().prettyName;
49
+ throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
45
50
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
46
51
  )}
47
52
  Prisma.NotFoundError = () => {
48
- throw new Error(`NotFoundError is unable to be run ${runtimeDescription}.
53
+ const runtimeName = getRuntime().prettyName;
54
+ throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
49
55
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
50
56
  )}
51
57
  Prisma.Decimal = Decimal
@@ -54,19 +60,23 @@ Prisma.Decimal = Decimal
54
60
  * Re-export of sql-template-tag
55
61
  */
56
62
  Prisma.sql = () => {
57
- throw new Error(`sqltag is unable to be run ${runtimeDescription}.
63
+ const runtimeName = getRuntime().prettyName;
64
+ throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
58
65
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
59
66
  )}
60
67
  Prisma.empty = () => {
61
- throw new Error(`empty is unable to be run ${runtimeDescription}.
68
+ const runtimeName = getRuntime().prettyName;
69
+ throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
62
70
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
63
71
  )}
64
72
  Prisma.join = () => {
65
- throw new Error(`join is unable to be run ${runtimeDescription}.
73
+ const runtimeName = getRuntime().prettyName;
74
+ throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
66
75
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
67
76
  )}
68
77
  Prisma.raw = () => {
69
- throw new Error(`raw is unable to be run ${runtimeDescription}.
78
+ const runtimeName = getRuntime().prettyName;
79
+ throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
70
80
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
71
81
  )}
72
82
  Prisma.validator = Public.validator
@@ -75,11 +85,13 @@ Prisma.validator = Public.validator
75
85
  * Extensions
76
86
  */
77
87
  Prisma.getExtensionContext = () => {
78
- throw new Error(`Extensions.getExtensionContext is unable to be run ${runtimeDescription}.
88
+ const runtimeName = getRuntime().prettyName;
89
+ throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
79
90
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
80
91
  )}
81
92
  Prisma.defineExtension = () => {
82
- throw new Error(`Extensions.defineExtension is unable to be run ${runtimeDescription}.
93
+ const runtimeName = getRuntime().prettyName;
94
+ throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
83
95
  In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
84
96
  )}
85
97
 
@@ -511,6 +523,7 @@ exports.Prisma.OptInScalarFieldEnum = {
511
523
  paymentAmount: 'paymentAmount',
512
524
  paymentStatus: 'paymentStatus',
513
525
  extraData: 'extraData',
526
+ favoritedDate: 'favoritedDate',
514
527
  userId: 'userId',
515
528
  campaignId: 'campaignId',
516
529
  currentStepId: 'currentStepId'
@@ -836,32 +849,6 @@ exports.Prisma.SequenceImapCheckpointScalarFieldEnum = {
836
849
  updatedAt: 'updatedAt'
837
850
  };
838
851
 
839
- exports.Prisma.ShopifyStoreScalarFieldEnum = {
840
- id: 'id',
841
- shopifyId: 'shopifyId',
842
- name: 'name',
843
- url: 'url',
844
- accessToken: 'accessToken',
845
- metaData: 'metaData',
846
- brandId: 'brandId'
847
- };
848
-
849
- exports.Prisma.ShopifyProductScalarFieldEnum = {
850
- id: 'id',
851
- shopifyId: 'shopifyId',
852
- title: 'title',
853
- handle: 'handle',
854
- imageUrl: 'imageUrl',
855
- metaData: 'metaData',
856
- lastSynced: 'lastSynced',
857
- shopifyStoreId: 'shopifyStoreId'
858
- };
859
-
860
- exports.Prisma.CampaignToShopifyProductScalarFieldEnum = {
861
- campaignId: 'campaignId',
862
- shopifyProductId: 'shopifyProductId'
863
- };
864
-
865
852
  exports.Prisma.SortOrder = {
866
853
  asc: 'asc',
867
854
  desc: 'desc'
@@ -1188,20 +1175,6 @@ exports.Prisma.SequenceOrderByRelevanceFieldEnum = {
1188
1175
  exports.Prisma.SequenceInboundEmailOrderByRelevanceFieldEnum = {
1189
1176
  msgHash: 'msgHash'
1190
1177
  };
1191
-
1192
- exports.Prisma.ShopifyStoreOrderByRelevanceFieldEnum = {
1193
- shopifyId: 'shopifyId',
1194
- name: 'name',
1195
- url: 'url',
1196
- accessToken: 'accessToken'
1197
- };
1198
-
1199
- exports.Prisma.ShopifyProductOrderByRelevanceFieldEnum = {
1200
- shopifyId: 'shopifyId',
1201
- title: 'title',
1202
- handle: 'handle',
1203
- imageUrl: 'imageUrl'
1204
- };
1205
1178
  exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
1206
1179
  optIn: 'optIn',
1207
1180
  tip: 'tip',
@@ -1276,10 +1249,7 @@ exports.Prisma.ModelName = {
1276
1249
  SequenceStep: 'SequenceStep',
1277
1250
  SequenceOutboundEmail: 'SequenceOutboundEmail',
1278
1251
  SequenceInboundEmail: 'SequenceInboundEmail',
1279
- SequenceImapCheckpoint: 'SequenceImapCheckpoint',
1280
- ShopifyStore: 'ShopifyStore',
1281
- ShopifyProduct: 'ShopifyProduct',
1282
- CampaignToShopifyProduct: 'CampaignToShopifyProduct'
1252
+ SequenceImapCheckpoint: 'SequenceImapCheckpoint'
1283
1253
  };
1284
1254
 
1285
1255
  /**
@@ -1289,19 +1259,15 @@ class PrismaClient {
1289
1259
  constructor() {
1290
1260
  return new Proxy(this, {
1291
1261
  get(target, prop) {
1292
- const runtime = detectRuntime()
1293
- const edgeRuntimeName = {
1294
- 'workerd': 'Cloudflare Workers',
1295
- 'deno': 'Deno and Deno Deploy',
1296
- 'netlify': 'Netlify Edge Functions',
1297
- 'edge-light': 'Vercel Edge Functions or Edge Middleware',
1298
- }[runtime]
1299
-
1300
- let message = 'PrismaClient is unable to run in '
1301
- if (edgeRuntimeName !== undefined) {
1302
- message += edgeRuntimeName + '. As an alternative, try Accelerate: https://pris.ly/d/accelerate.'
1262
+ let message
1263
+ const runtime = getRuntime()
1264
+ if (runtime.isEdge) {
1265
+ message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
1266
+ - Use Prisma Accelerate: https://pris.ly/d/accelerate
1267
+ - Use Driver Adapters: https://pris.ly/d/driver-adapters
1268
+ `;
1303
1269
  } else {
1304
- message += 'this browser environment, or has been bundled for the browser (running in `' + runtime + '`).'
1270
+ message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
1305
1271
  }
1306
1272
 
1307
1273
  message += `