@zyacreatives/shared 2.5.71 → 2.5.73

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.
@@ -51,12 +51,6 @@ declare const ProjectShape: z.ZodObject<{
51
51
  readonly EUR: "EUR (Euro)";
52
52
  readonly GBP: "GBP (British Pound Sterling)";
53
53
  readonly NGN: "NGN (Nigerian Naira)";
54
- readonly CAD: "CAD (Canadian Dollar)";
55
- readonly AUD: "AUD (Australian Dollar)";
56
- readonly JPY: "JPY (Japanese Yen)";
57
- readonly CHF: "CHF (Swiss Franc)";
58
- readonly INR: "INR (Indian Rupee)";
59
- readonly ZAR: "ZAR (South African Rand)";
60
54
  }>>;
61
55
  currentTraction: z.ZodString;
62
56
  isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
@@ -117,12 +111,6 @@ export declare const ProjectEntitySchema: z.ZodObject<{
117
111
  readonly EUR: "EUR (Euro)";
118
112
  readonly GBP: "GBP (British Pound Sterling)";
119
113
  readonly NGN: "NGN (Nigerian Naira)";
120
- readonly CAD: "CAD (Canadian Dollar)";
121
- readonly AUD: "AUD (Australian Dollar)";
122
- readonly JPY: "JPY (Japanese Yen)";
123
- readonly CHF: "CHF (Swiss Franc)";
124
- readonly INR: "INR (Indian Rupee)";
125
- readonly ZAR: "ZAR (South African Rand)";
126
114
  }>>;
127
115
  currentTraction: z.ZodString;
128
116
  isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
@@ -185,12 +173,6 @@ export declare const ProjectWithFilesEntitySchema: z.ZodObject<{
185
173
  readonly EUR: "EUR (Euro)";
186
174
  readonly GBP: "GBP (British Pound Sterling)";
187
175
  readonly NGN: "NGN (Nigerian Naira)";
188
- readonly CAD: "CAD (Canadian Dollar)";
189
- readonly AUD: "AUD (Australian Dollar)";
190
- readonly JPY: "JPY (Japanese Yen)";
191
- readonly CHF: "CHF (Swiss Franc)";
192
- readonly INR: "INR (Indian Rupee)";
193
- readonly ZAR: "ZAR (South African Rand)";
194
176
  }>>;
195
177
  currentTraction: z.ZodString;
196
178
  isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
@@ -290,12 +272,6 @@ export declare const ProjectDetailsEntitySchema: z.ZodObject<{
290
272
  readonly EUR: "EUR (Euro)";
291
273
  readonly GBP: "GBP (British Pound Sterling)";
292
274
  readonly NGN: "NGN (Nigerian Naira)";
293
- readonly CAD: "CAD (Canadian Dollar)";
294
- readonly AUD: "AUD (Australian Dollar)";
295
- readonly JPY: "JPY (Japanese Yen)";
296
- readonly CHF: "CHF (Swiss Franc)";
297
- readonly INR: "INR (Indian Rupee)";
298
- readonly ZAR: "ZAR (South African Rand)";
299
275
  }>>;
300
276
  currentTraction: z.ZodString;
301
277
  isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
@@ -497,12 +473,6 @@ export declare const UpdateProjectInputSchema: z.ZodObject<{
497
473
  readonly EUR: "EUR (Euro)";
498
474
  readonly GBP: "GBP (British Pound Sterling)";
499
475
  readonly NGN: "NGN (Nigerian Naira)";
500
- readonly CAD: "CAD (Canadian Dollar)";
501
- readonly AUD: "AUD (Australian Dollar)";
502
- readonly JPY: "JPY (Japanese Yen)";
503
- readonly CHF: "CHF (Swiss Franc)";
504
- readonly INR: "INR (Indian Rupee)";
505
- readonly ZAR: "ZAR (South African Rand)";
506
476
  }>>;
507
477
  currentTraction: z.ZodOptional<z.ZodString>;
508
478
  isOpenToInvestment: z.ZodOptional<z.ZodBoolean>;
@@ -602,12 +572,6 @@ export declare const ProjectSearchDocumentSchema: z.ZodObject<{
602
572
  readonly EUR: "EUR (Euro)";
603
573
  readonly GBP: "GBP (British Pound Sterling)";
604
574
  readonly NGN: "NGN (Nigerian Naira)";
605
- readonly CAD: "CAD (Canadian Dollar)";
606
- readonly AUD: "AUD (Australian Dollar)";
607
- readonly JPY: "JPY (Japanese Yen)";
608
- readonly CHF: "CHF (Swiss Franc)";
609
- readonly INR: "INR (Indian Rupee)";
610
- readonly ZAR: "ZAR (South African Rand)";
611
575
  }>>;
612
576
  ventureStage: z.ZodOptional<z.ZodEnum<{
613
577
  readonly IDEA: "Idea";
@@ -715,12 +679,6 @@ export declare const GetProjectOutputSchema: z.ZodObject<{
715
679
  readonly EUR: "EUR (Euro)";
716
680
  readonly GBP: "GBP (British Pound Sterling)";
717
681
  readonly NGN: "NGN (Nigerian Naira)";
718
- readonly CAD: "CAD (Canadian Dollar)";
719
- readonly AUD: "AUD (Australian Dollar)";
720
- readonly JPY: "JPY (Japanese Yen)";
721
- readonly CHF: "CHF (Swiss Franc)";
722
- readonly INR: "INR (Indian Rupee)";
723
- readonly ZAR: "ZAR (South African Rand)";
724
682
  }>>;
725
683
  currentTraction: z.ZodString;
726
684
  isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
@@ -791,12 +749,6 @@ export declare const SearchProjectsOutputSchema: z.ZodObject<{
791
749
  readonly EUR: "EUR (Euro)";
792
750
  readonly GBP: "GBP (British Pound Sterling)";
793
751
  readonly NGN: "NGN (Nigerian Naira)";
794
- readonly CAD: "CAD (Canadian Dollar)";
795
- readonly AUD: "AUD (Australian Dollar)";
796
- readonly JPY: "JPY (Japanese Yen)";
797
- readonly CHF: "CHF (Swiss Franc)";
798
- readonly INR: "INR (Indian Rupee)";
799
- readonly ZAR: "ZAR (South African Rand)";
800
752
  }>>;
801
753
  ventureStage: z.ZodOptional<z.ZodEnum<{
802
754
  readonly IDEA: "Idea";
@@ -971,12 +923,6 @@ export declare const CreateProjectOutputSchema: z.ZodObject<{
971
923
  readonly EUR: "EUR (Euro)";
972
924
  readonly GBP: "GBP (British Pound Sterling)";
973
925
  readonly NGN: "NGN (Nigerian Naira)";
974
- readonly CAD: "CAD (Canadian Dollar)";
975
- readonly AUD: "AUD (Australian Dollar)";
976
- readonly JPY: "JPY (Japanese Yen)";
977
- readonly CHF: "CHF (Swiss Franc)";
978
- readonly INR: "INR (Indian Rupee)";
979
- readonly ZAR: "ZAR (South African Rand)";
980
926
  }>>;
981
927
  currentTraction: z.ZodString;
982
928
  isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
@@ -1034,12 +980,6 @@ export declare const UpdateProjectOutputSchema: z.ZodObject<{
1034
980
  readonly EUR: "EUR (Euro)";
1035
981
  readonly GBP: "GBP (British Pound Sterling)";
1036
982
  readonly NGN: "NGN (Nigerian Naira)";
1037
- readonly CAD: "CAD (Canadian Dollar)";
1038
- readonly AUD: "AUD (Australian Dollar)";
1039
- readonly JPY: "JPY (Japanese Yen)";
1040
- readonly CHF: "CHF (Swiss Franc)";
1041
- readonly INR: "INR (Indian Rupee)";
1042
- readonly ZAR: "ZAR (South African Rand)";
1043
983
  }>>;
1044
984
  currentTraction: z.ZodString;
1045
985
  isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
@@ -1097,12 +1037,6 @@ export declare const DeleteProjectOutputSchema: z.ZodObject<{
1097
1037
  readonly EUR: "EUR (Euro)";
1098
1038
  readonly GBP: "GBP (British Pound Sterling)";
1099
1039
  readonly NGN: "NGN (Nigerian Naira)";
1100
- readonly CAD: "CAD (Canadian Dollar)";
1101
- readonly AUD: "AUD (Australian Dollar)";
1102
- readonly JPY: "JPY (Japanese Yen)";
1103
- readonly CHF: "CHF (Swiss Franc)";
1104
- readonly INR: "INR (Indian Rupee)";
1105
- readonly ZAR: "ZAR (South African Rand)";
1106
1040
  }>>;
1107
1041
  currentTraction: z.ZodString;
1108
1042
  isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
@@ -17,12 +17,6 @@ export declare const BaseTransactionSchema: z.ZodObject<{
17
17
  readonly EUR: "EUR (Euro)";
18
18
  readonly GBP: "GBP (British Pound Sterling)";
19
19
  readonly NGN: "NGN (Nigerian Naira)";
20
- readonly CAD: "CAD (Canadian Dollar)";
21
- readonly AUD: "AUD (Australian Dollar)";
22
- readonly JPY: "JPY (Japanese Yen)";
23
- readonly CHF: "CHF (Swiss Franc)";
24
- readonly INR: "INR (Indian Rupee)";
25
- readonly ZAR: "ZAR (South African Rand)";
26
20
  }>;
27
21
  status: z.ZodDefault<z.ZodEnum<{
28
22
  readonly PENDING: "PENDING";
@@ -45,7 +39,64 @@ export declare const BaseTransactionSchema: z.ZodObject<{
45
39
  discountCode: z.ZodOptional<z.ZodString>;
46
40
  active: z.ZodDefault<z.ZodBoolean>;
47
41
  }, z.core.$strip>>>;
48
- productNameSnapshot: z.ZodOptional<z.ZodString>;
42
+ productSnapshot: z.ZodOptional<z.ZodNullable<z.ZodObject<{
43
+ productId: z.ZodCUID2;
44
+ title: z.ZodString;
45
+ description: z.ZodOptional<z.ZodString>;
46
+ keyFeatures: z.ZodOptional<z.ZodString>;
47
+ sellerId: z.ZodCUID2;
48
+ sellerName: z.ZodString;
49
+ sellerUsername: z.ZodString;
50
+ sellerImageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
51
+ category: z.ZodString;
52
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
54
+ pricingModel: z.ZodEnum<{
55
+ readonly FREE: "Free";
56
+ readonly FIXED: "Fixed";
57
+ readonly PWYW: "Pay What You Want";
58
+ }>;
59
+ price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
60
+ suggestedPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
61
+ currency: z.ZodEnum<{
62
+ readonly USD: "USD (United States Dollar)";
63
+ readonly EUR: "EUR (Euro)";
64
+ readonly GBP: "GBP (British Pound Sterling)";
65
+ readonly NGN: "NGN (Nigerian Naira)";
66
+ }>;
67
+ thumbnailImgUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
68
+ deliveryFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
69
+ createdAt: z.ZodISODateTime;
70
+ updatedAt: z.ZodISODateTime;
71
+ deletedAt: z.ZodNullable<z.ZodISODateTime>;
72
+ key: z.ZodString;
73
+ mimeType: z.ZodString;
74
+ parentId: z.ZodNullable<z.ZodCUID2>;
75
+ parentType: z.ZodNullable<z.ZodEnum<{
76
+ readonly PROJECT: "PROJECT";
77
+ readonly USER: "USER";
78
+ readonly JOB: "JOB";
79
+ readonly POST: "POST";
80
+ readonly PRODUCT: "PRODUCT";
81
+ readonly SIGNAL: "SIGNAL";
82
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
83
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
84
+ readonly COMMENT: "COMMENT";
85
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
86
+ }>>;
87
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
88
+ order: z.ZodNumber;
89
+ id: z.ZodCUID2;
90
+ url: z.ZodURL;
91
+ }, z.core.$strip>>>;
92
+ productLinks: z.ZodDefault<z.ZodArray<z.ZodObject<{
93
+ title: z.ZodNullable<z.ZodString>;
94
+ url: z.ZodString;
95
+ }, z.core.$strip>>>;
96
+ supportEmail: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
97
+ supportPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ purchasedAt: z.ZodISODateTime;
99
+ }, z.core.$strip>>>;
49
100
  createdAt: z.ZodISODateTime;
50
101
  updatedAt: z.ZodISODateTime;
51
102
  }, z.core.$strip>;
@@ -77,12 +128,6 @@ export declare const CreateTransactionInputSchema: z.ZodObject<{
77
128
  readonly EUR: "EUR (Euro)";
78
129
  readonly GBP: "GBP (British Pound Sterling)";
79
130
  readonly NGN: "NGN (Nigerian Naira)";
80
- readonly CAD: "CAD (Canadian Dollar)";
81
- readonly AUD: "AUD (Australian Dollar)";
82
- readonly JPY: "JPY (Japanese Yen)";
83
- readonly CHF: "CHF (Swiss Franc)";
84
- readonly INR: "INR (Indian Rupee)";
85
- readonly ZAR: "ZAR (South African Rand)";
86
131
  }>;
87
132
  sellerId: z.ZodCUID2;
88
133
  productId: z.ZodCUID2;
@@ -94,7 +139,7 @@ export declare const CreateTransactionInputSchema: z.ZodObject<{
94
139
  readonly PAYSTACK: "PAYSTACK";
95
140
  readonly NONE: "NONE";
96
141
  }>;
97
- discountApplied: z.ZodOptional<z.ZodObject<{
142
+ discountApplied: z.ZodOptional<z.ZodNullable<z.ZodObject<{
98
143
  discountType: z.ZodEnum<{
99
144
  readonly FIXED_AMOUNT: "Fixed Amount";
100
145
  readonly PERCENTAGE: "Percentage";
@@ -102,8 +147,66 @@ export declare const CreateTransactionInputSchema: z.ZodObject<{
102
147
  amount: z.ZodNumber;
103
148
  discountCode: z.ZodOptional<z.ZodString>;
104
149
  active: z.ZodDefault<z.ZodBoolean>;
105
- }, z.core.$strip>>;
150
+ }, z.core.$strip>>>;
106
151
  providerTransactionId: z.ZodOptional<z.ZodString>;
152
+ productSnapshot: z.ZodOptional<z.ZodNullable<z.ZodObject<{
153
+ productId: z.ZodCUID2;
154
+ title: z.ZodString;
155
+ description: z.ZodOptional<z.ZodString>;
156
+ keyFeatures: z.ZodOptional<z.ZodString>;
157
+ sellerId: z.ZodCUID2;
158
+ sellerName: z.ZodString;
159
+ sellerUsername: z.ZodString;
160
+ sellerImageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
161
+ category: z.ZodString;
162
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
164
+ pricingModel: z.ZodEnum<{
165
+ readonly FREE: "Free";
166
+ readonly FIXED: "Fixed";
167
+ readonly PWYW: "Pay What You Want";
168
+ }>;
169
+ price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
170
+ suggestedPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
171
+ currency: z.ZodEnum<{
172
+ readonly USD: "USD (United States Dollar)";
173
+ readonly EUR: "EUR (Euro)";
174
+ readonly GBP: "GBP (British Pound Sterling)";
175
+ readonly NGN: "NGN (Nigerian Naira)";
176
+ }>;
177
+ thumbnailImgUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
178
+ deliveryFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
179
+ createdAt: z.ZodISODateTime;
180
+ updatedAt: z.ZodISODateTime;
181
+ deletedAt: z.ZodNullable<z.ZodISODateTime>;
182
+ key: z.ZodString;
183
+ mimeType: z.ZodString;
184
+ parentId: z.ZodNullable<z.ZodCUID2>;
185
+ parentType: z.ZodNullable<z.ZodEnum<{
186
+ readonly PROJECT: "PROJECT";
187
+ readonly USER: "USER";
188
+ readonly JOB: "JOB";
189
+ readonly POST: "POST";
190
+ readonly PRODUCT: "PRODUCT";
191
+ readonly SIGNAL: "SIGNAL";
192
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
193
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
194
+ readonly COMMENT: "COMMENT";
195
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
196
+ }>>;
197
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
198
+ order: z.ZodNumber;
199
+ id: z.ZodCUID2;
200
+ url: z.ZodURL;
201
+ }, z.core.$strip>>>;
202
+ productLinks: z.ZodDefault<z.ZodArray<z.ZodObject<{
203
+ title: z.ZodNullable<z.ZodString>;
204
+ url: z.ZodString;
205
+ }, z.core.$strip>>>;
206
+ supportEmail: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
207
+ supportPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
208
+ purchasedAt: z.ZodISODateTime;
209
+ }, z.core.$strip>>>;
107
210
  }, z.core.$strip>;
108
211
  export type CreateTransactionInput = z.infer<typeof CreateTransactionInputSchema>;
109
212
  export declare const UpdateTransactionWebhookInputSchema: z.ZodObject<{
@@ -134,12 +237,6 @@ export declare const TransactionEntitySchema: z.ZodObject<{
134
237
  readonly EUR: "EUR (Euro)";
135
238
  readonly GBP: "GBP (British Pound Sterling)";
136
239
  readonly NGN: "NGN (Nigerian Naira)";
137
- readonly CAD: "CAD (Canadian Dollar)";
138
- readonly AUD: "AUD (Australian Dollar)";
139
- readonly JPY: "JPY (Japanese Yen)";
140
- readonly CHF: "CHF (Swiss Franc)";
141
- readonly INR: "INR (Indian Rupee)";
142
- readonly ZAR: "ZAR (South African Rand)";
143
240
  }>;
144
241
  status: z.ZodDefault<z.ZodEnum<{
145
242
  readonly PENDING: "PENDING";
@@ -162,7 +259,64 @@ export declare const TransactionEntitySchema: z.ZodObject<{
162
259
  discountCode: z.ZodOptional<z.ZodString>;
163
260
  active: z.ZodDefault<z.ZodBoolean>;
164
261
  }, z.core.$strip>>>;
165
- productNameSnapshot: z.ZodOptional<z.ZodString>;
262
+ productSnapshot: z.ZodOptional<z.ZodNullable<z.ZodObject<{
263
+ productId: z.ZodCUID2;
264
+ title: z.ZodString;
265
+ description: z.ZodOptional<z.ZodString>;
266
+ keyFeatures: z.ZodOptional<z.ZodString>;
267
+ sellerId: z.ZodCUID2;
268
+ sellerName: z.ZodString;
269
+ sellerUsername: z.ZodString;
270
+ sellerImageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
271
+ category: z.ZodString;
272
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
273
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
274
+ pricingModel: z.ZodEnum<{
275
+ readonly FREE: "Free";
276
+ readonly FIXED: "Fixed";
277
+ readonly PWYW: "Pay What You Want";
278
+ }>;
279
+ price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
280
+ suggestedPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
281
+ currency: z.ZodEnum<{
282
+ readonly USD: "USD (United States Dollar)";
283
+ readonly EUR: "EUR (Euro)";
284
+ readonly GBP: "GBP (British Pound Sterling)";
285
+ readonly NGN: "NGN (Nigerian Naira)";
286
+ }>;
287
+ thumbnailImgUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
288
+ deliveryFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
289
+ createdAt: z.ZodISODateTime;
290
+ updatedAt: z.ZodISODateTime;
291
+ deletedAt: z.ZodNullable<z.ZodISODateTime>;
292
+ key: z.ZodString;
293
+ mimeType: z.ZodString;
294
+ parentId: z.ZodNullable<z.ZodCUID2>;
295
+ parentType: z.ZodNullable<z.ZodEnum<{
296
+ readonly PROJECT: "PROJECT";
297
+ readonly USER: "USER";
298
+ readonly JOB: "JOB";
299
+ readonly POST: "POST";
300
+ readonly PRODUCT: "PRODUCT";
301
+ readonly SIGNAL: "SIGNAL";
302
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
303
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
304
+ readonly COMMENT: "COMMENT";
305
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
306
+ }>>;
307
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
308
+ order: z.ZodNumber;
309
+ id: z.ZodCUID2;
310
+ url: z.ZodURL;
311
+ }, z.core.$strip>>>;
312
+ productLinks: z.ZodDefault<z.ZodArray<z.ZodObject<{
313
+ title: z.ZodNullable<z.ZodString>;
314
+ url: z.ZodString;
315
+ }, z.core.$strip>>>;
316
+ supportEmail: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
317
+ supportPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
318
+ purchasedAt: z.ZodISODateTime;
319
+ }, z.core.$strip>>>;
166
320
  createdAt: z.ZodISODateTime;
167
321
  updatedAt: z.ZodISODateTime;
168
322
  productTitle: z.ZodOptional<z.ZodString>;
@@ -192,12 +346,6 @@ export declare const InitTransactionOutputSchema: z.ZodObject<{
192
346
  readonly EUR: "EUR (Euro)";
193
347
  readonly GBP: "GBP (British Pound Sterling)";
194
348
  readonly NGN: "NGN (Nigerian Naira)";
195
- readonly CAD: "CAD (Canadian Dollar)";
196
- readonly AUD: "AUD (Australian Dollar)";
197
- readonly JPY: "JPY (Japanese Yen)";
198
- readonly CHF: "CHF (Swiss Franc)";
199
- readonly INR: "INR (Indian Rupee)";
200
- readonly ZAR: "ZAR (South African Rand)";
201
349
  }>;
202
350
  status: z.ZodDefault<z.ZodEnum<{
203
351
  readonly PENDING: "PENDING";
@@ -220,7 +368,64 @@ export declare const InitTransactionOutputSchema: z.ZodObject<{
220
368
  discountCode: z.ZodOptional<z.ZodString>;
221
369
  active: z.ZodDefault<z.ZodBoolean>;
222
370
  }, z.core.$strip>>>;
223
- productNameSnapshot: z.ZodOptional<z.ZodString>;
371
+ productSnapshot: z.ZodOptional<z.ZodNullable<z.ZodObject<{
372
+ productId: z.ZodCUID2;
373
+ title: z.ZodString;
374
+ description: z.ZodOptional<z.ZodString>;
375
+ keyFeatures: z.ZodOptional<z.ZodString>;
376
+ sellerId: z.ZodCUID2;
377
+ sellerName: z.ZodString;
378
+ sellerUsername: z.ZodString;
379
+ sellerImageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
380
+ category: z.ZodString;
381
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
383
+ pricingModel: z.ZodEnum<{
384
+ readonly FREE: "Free";
385
+ readonly FIXED: "Fixed";
386
+ readonly PWYW: "Pay What You Want";
387
+ }>;
388
+ price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
389
+ suggestedPrice: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
390
+ currency: z.ZodEnum<{
391
+ readonly USD: "USD (United States Dollar)";
392
+ readonly EUR: "EUR (Euro)";
393
+ readonly GBP: "GBP (British Pound Sterling)";
394
+ readonly NGN: "NGN (Nigerian Naira)";
395
+ }>;
396
+ thumbnailImgUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
397
+ deliveryFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
398
+ createdAt: z.ZodISODateTime;
399
+ updatedAt: z.ZodISODateTime;
400
+ deletedAt: z.ZodNullable<z.ZodISODateTime>;
401
+ key: z.ZodString;
402
+ mimeType: z.ZodString;
403
+ parentId: z.ZodNullable<z.ZodCUID2>;
404
+ parentType: z.ZodNullable<z.ZodEnum<{
405
+ readonly PROJECT: "PROJECT";
406
+ readonly USER: "USER";
407
+ readonly JOB: "JOB";
408
+ readonly POST: "POST";
409
+ readonly PRODUCT: "PRODUCT";
410
+ readonly SIGNAL: "SIGNAL";
411
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
412
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
413
+ readonly COMMENT: "COMMENT";
414
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
415
+ }>>;
416
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
417
+ order: z.ZodNumber;
418
+ id: z.ZodCUID2;
419
+ url: z.ZodURL;
420
+ }, z.core.$strip>>>;
421
+ productLinks: z.ZodDefault<z.ZodArray<z.ZodObject<{
422
+ title: z.ZodNullable<z.ZodString>;
423
+ url: z.ZodString;
424
+ }, z.core.$strip>>>;
425
+ supportEmail: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
426
+ supportPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
427
+ purchasedAt: z.ZodISODateTime;
428
+ }, z.core.$strip>>>;
224
429
  createdAt: z.ZodISODateTime;
225
430
  updatedAt: z.ZodISODateTime;
226
431
  productTitle: z.ZodOptional<z.ZodString>;
@@ -22,7 +22,7 @@ exports.BaseTransactionSchema = zod_openapi_1.z.object({
22
22
  paymentProvider: zod_openapi_1.z.enum(constants_1.PAYMENT_PROVIDERS),
23
23
  providerTransactionId: zod_openapi_1.z.string().nullable().optional(),
24
24
  discountApplied: product_1.ProductDiscountEntitySchema.nullable().optional(),
25
- productNameSnapshot: zod_openapi_1.z.string().optional(),
25
+ productSnapshot: product_1.ProductPurchaseSnapshotSchema.nullable().optional(),
26
26
  createdAt: zod_openapi_1.z.iso.datetime(),
27
27
  updatedAt: zod_openapi_1.z.iso.datetime(),
28
28
  });
@@ -39,7 +39,10 @@ exports.InitTransactionInputSchema = zod_openapi_1.z.object({
39
39
  lastName: zod_openapi_1.z.string().optional(),
40
40
  email: zod_openapi_1.z.email(),
41
41
  discountCode: zod_openapi_1.z.string().optional(),
42
- amount: zod_openapi_1.z.number().int("Amount must be a whole number (cents/kobo)").min(0),
42
+ amount: zod_openapi_1.z
43
+ .number()
44
+ .int("Amount must be a whole number in the smallest currency unit")
45
+ .min(0),
43
46
  });
44
47
  exports.CreateTransactionInputSchema = exports.BaseTransactionSchema.pick({
45
48
  productId: true,
@@ -52,8 +55,9 @@ exports.CreateTransactionInputSchema = exports.BaseTransactionSchema.pick({
52
55
  paymentProvider: true,
53
56
  status: true,
54
57
  }).extend({
55
- discountApplied: product_1.ProductDiscountEntitySchema.optional(),
58
+ discountApplied: product_1.ProductDiscountEntitySchema.nullable().optional(),
56
59
  providerTransactionId: zod_openapi_1.z.string().optional(),
60
+ productSnapshot: product_1.ProductPurchaseSnapshotSchema.nullable().optional(),
57
61
  });
58
62
  exports.UpdateTransactionWebhookInputSchema = zod_openapi_1.z.object({
59
63
  status: zod_openapi_1.z.enum(constants_1.TRANSACTION_STATUSES),
@@ -322,12 +322,6 @@ export declare const UserWithProjectsEntitySchema: z.ZodObject<{
322
322
  readonly EUR: "EUR (Euro)";
323
323
  readonly GBP: "GBP (British Pound Sterling)";
324
324
  readonly NGN: "NGN (Nigerian Naira)";
325
- readonly CAD: "CAD (Canadian Dollar)";
326
- readonly AUD: "AUD (Australian Dollar)";
327
- readonly JPY: "JPY (Japanese Yen)";
328
- readonly CHF: "CHF (Swiss Franc)";
329
- readonly INR: "INR (Indian Rupee)";
330
- readonly ZAR: "ZAR (South African Rand)";
331
325
  }>>;
332
326
  currentTraction: z.ZodString;
333
327
  isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
@@ -556,12 +550,6 @@ export declare const UserWithJobBookmarksEntitySchema: z.ZodObject<{
556
550
  readonly EUR: "EUR (Euro)";
557
551
  readonly GBP: "GBP (British Pound Sterling)";
558
552
  readonly NGN: "NGN (Nigerian Naira)";
559
- readonly CAD: "CAD (Canadian Dollar)";
560
- readonly AUD: "AUD (Australian Dollar)";
561
- readonly JPY: "JPY (Japanese Yen)";
562
- readonly CHF: "CHF (Swiss Franc)";
563
- readonly INR: "INR (Indian Rupee)";
564
- readonly ZAR: "ZAR (South African Rand)";
565
553
  }>>>;
566
554
  wagesType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
567
555
  readonly HOURLY: "Hourly";
@@ -617,12 +605,6 @@ export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
617
605
  readonly EUR: "EUR (Euro)";
618
606
  readonly GBP: "GBP (British Pound Sterling)";
619
607
  readonly NGN: "NGN (Nigerian Naira)";
620
- readonly CAD: "CAD (Canadian Dollar)";
621
- readonly AUD: "AUD (Australian Dollar)";
622
- readonly JPY: "JPY (Japanese Yen)";
623
- readonly CHF: "CHF (Swiss Franc)";
624
- readonly INR: "INR (Indian Rupee)";
625
- readonly ZAR: "ZAR (South African Rand)";
626
608
  }>>;
627
609
  ventureStage: z.ZodOptional<z.ZodEnum<{
628
610
  readonly IDEA: "Idea";
@@ -835,12 +817,6 @@ export declare const UserWithProductsEntitySchema: z.ZodObject<{
835
817
  readonly EUR: "EUR (Euro)";
836
818
  readonly GBP: "GBP (British Pound Sterling)";
837
819
  readonly NGN: "NGN (Nigerian Naira)";
838
- readonly CAD: "CAD (Canadian Dollar)";
839
- readonly AUD: "AUD (Australian Dollar)";
840
- readonly JPY: "JPY (Japanese Yen)";
841
- readonly CHF: "CHF (Swiss Franc)";
842
- readonly INR: "INR (Indian Rupee)";
843
- readonly ZAR: "ZAR (South African Rand)";
844
820
  }>;
845
821
  pricingModel: z.ZodDefault<z.ZodEnum<{
846
822
  readonly FREE: "Free";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.71",
3
+ "version": "2.5.73",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/constants.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import z from "zod";
2
+
1
3
  export const ROLES = {
2
4
  CREATIVE: "CREATIVE",
3
5
  BRAND: "BRAND",
@@ -194,6 +196,39 @@ export const MESSAGE_TYPES = {
194
196
  MESSAGE_WITH_MEDIA_AND_LINKS: "MESSAGE_WITH_MEDIA_AND_LINKS",
195
197
  } as const;
196
198
 
199
+ export const SUPPORTED_CURRENCIES = {
200
+ NGN: {
201
+ code: "NGN",
202
+ label: "Nigerian Naira",
203
+ symbol: "₦",
204
+ },
205
+ USD: {
206
+ code: "USD",
207
+ label: "US Dollar",
208
+ symbol: "$",
209
+ },
210
+ GBP: {
211
+ code: "GBP",
212
+ label: "British Pound",
213
+ symbol: "£",
214
+ },
215
+ EUR: {
216
+ code: "EUR",
217
+ label: "Euro",
218
+ symbol: "€",
219
+ },
220
+ } as const;
221
+
222
+ export type CurrencyCode =
223
+ keyof typeof SUPPORTED_CURRENCIES;
224
+
225
+ export const CurrencyCodeSchema = z.enum([
226
+ "NGN",
227
+ "USD",
228
+ "GBP",
229
+ "EUR",
230
+ ]);
231
+
197
232
  export type JobLocation = (typeof JOB_LOCATIONS)[keyof typeof JOB_LOCATIONS];
198
233
 
199
234
  export const GIG_TYPE = {
@@ -206,12 +241,6 @@ export const WAGES_CURRENCY = {
206
241
  EUR: "EUR (Euro)",
207
242
  GBP: "GBP (British Pound Sterling)",
208
243
  NGN: "NGN (Nigerian Naira)",
209
- CAD: "CAD (Canadian Dollar)",
210
- AUD: "AUD (Australian Dollar)",
211
- JPY: "JPY (Japanese Yen)",
212
- CHF: "CHF (Swiss Franc)",
213
- INR: "INR (Indian Rupee)",
214
- ZAR: "ZAR (South African Rand)",
215
244
  } as const;
216
245
 
217
246
  export const JOB_STATUS = {
@@ -117,7 +117,6 @@ export type ProductEntity = z.infer<typeof ProductEntitySchema>;
117
117
 
118
118
  const ProductCoreInputSchema = ProductShape.extend({
119
119
  id: z.cuid2(),
120
-
121
120
  files: z.array(CreateFileInputSchema).default([]),
122
121
  productLinks: z.array(ProductLinkSchema).default([]),
123
122
  });
@@ -411,3 +410,39 @@ export const SellerDashboardStatsOutputSchema = z.object({
411
410
  export type SellerDashboardStatsOutput = z.infer<
412
411
  typeof SellerDashboardStatsOutputSchema
413
412
  >;
413
+
414
+ export const ProductPurchaseSnapshotSchema = z.object({
415
+ productId: z.cuid2(),
416
+
417
+ title: z.string(),
418
+ description: z.string().optional(),
419
+ keyFeatures: z.string().optional(),
420
+
421
+ sellerId: z.cuid2(),
422
+ sellerName: z.string(),
423
+ sellerUsername: z.string(),
424
+ sellerImageUrl: z.url().nullable().optional(),
425
+
426
+ category: z.string(),
427
+ subcategory: z.string().nullable().optional(),
428
+ tags: z.array(z.string()).default([]),
429
+
430
+ pricingModel: z.enum(PRICING_MODELS),
431
+ price: z.number().int().nullable().optional(),
432
+ suggestedPrice: z.number().int().nullable().optional(),
433
+ currency: z.enum(WAGES_CURRENCY),
434
+
435
+ thumbnailImgUrl: z.url().nullable().optional(),
436
+
437
+ deliveryFiles: z.array(FileEntitySchema).default([]),
438
+ productLinks: z.array(ProductLinkSchema).default([]),
439
+
440
+ supportEmail: z.email().nullable().optional(),
441
+ supportPhone: z.string().nullable().optional(),
442
+
443
+ purchasedAt: z.iso.datetime(),
444
+ });
445
+
446
+ export type ProductPurchaseSnapshot = z.infer<
447
+ typeof ProductPurchaseSnapshotSchema
448
+ >;