@plyaz/types 1.39.5 → 1.39.6
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/dist/campaign/index.cjs +13 -7
- package/dist/campaign/index.cjs.map +1 -1
- package/dist/campaign/index.js +13 -7
- package/dist/campaign/index.js.map +1 -1
- package/dist/campaign/schemas.d.ts +32 -17
- package/dist/index.cjs +13 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7425,19 +7425,25 @@ var formCampaignSchema = /* @__PURE__ */ __name(({ maxFunding }) => z.object({
|
|
|
7425
7425
|
youtubeHandle: z.string().max(50, "components.CreateCampaign.Form.errors.youtubeMax" /* YoutubeMax */).regex(/^$|^@[a-zA-Z0-9][a-zA-Z0-9._-]{1,28}[a-zA-Z0-9]$/, "components.CreateCampaign.Form.errors.youtubeInvalid" /* YoutubeInvalid */).optional()
|
|
7426
7426
|
}), "formCampaignSchema");
|
|
7427
7427
|
var CreateCampaignSchema = z.object({
|
|
7428
|
+
// REQUIRED
|
|
7428
7429
|
creator_id: z.string().uuid(),
|
|
7429
7430
|
title: z.string().min(3).max(60),
|
|
7430
7431
|
subtitle: z.string().min(1).max(200),
|
|
7431
7432
|
story: z.string().min(10).max(1e3),
|
|
7432
7433
|
funding_target: z.number().positive(),
|
|
7433
|
-
duration: z.number().min(7).max(365)
|
|
7434
|
+
duration: z.number().min(7).max(365),
|
|
7435
|
+
start_date: z.string(),
|
|
7436
|
+
// ISO date string
|
|
7437
|
+
campaign_images: z.array(z.string().uuid()).min(1),
|
|
7438
|
+
campaign_videos: z.array(z.string().uuid()).min(1),
|
|
7439
|
+
// OPTIONAL
|
|
7434
7440
|
location_region: z.string().max(100).optional(),
|
|
7435
7441
|
location_city: z.string().max(100).optional(),
|
|
7436
7442
|
sport: z.string().max(50).optional(),
|
|
7437
7443
|
category: z.string().max(50).optional(),
|
|
7438
7444
|
tags: z.array(z.string()).optional(),
|
|
7439
|
-
|
|
7440
|
-
|
|
7445
|
+
// OPTIONAL (DB default ACTIVE)
|
|
7446
|
+
status: z.enum(["DRAFT", "ACTIVE"]).optional()
|
|
7441
7447
|
});
|
|
7442
7448
|
var UpdateCampaignSchema = CreateCampaignSchema.extend({
|
|
7443
7449
|
id: z.string().uuid()
|
|
@@ -7475,15 +7481,15 @@ var CampaignResponseSchema = z.object({
|
|
|
7475
7481
|
story: z.string(),
|
|
7476
7482
|
funding_target: z.number(),
|
|
7477
7483
|
status: z.nativeEnum(CAMPAIGN_STATUS),
|
|
7478
|
-
campaign_images: z.array(z.string())
|
|
7479
|
-
start_date: z.string().datetime()
|
|
7480
|
-
duration: z.number()
|
|
7484
|
+
campaign_images: z.array(z.string()),
|
|
7485
|
+
start_date: z.string().datetime(),
|
|
7486
|
+
duration: z.number(),
|
|
7481
7487
|
location_region: z.string().optional(),
|
|
7482
7488
|
location_city: z.string().optional(),
|
|
7483
7489
|
sport: z.string().optional(),
|
|
7484
7490
|
category: z.string().optional(),
|
|
7485
7491
|
tags: z.array(z.string()).optional(),
|
|
7486
|
-
campaign_videos: z.array(z.string())
|
|
7492
|
+
campaign_videos: z.array(z.string()),
|
|
7487
7493
|
first_contribution_at: z.string().datetime().optional(),
|
|
7488
7494
|
created_at: z.string().datetime(),
|
|
7489
7495
|
updated_at: z.string().datetime(),
|