@plyaz/types 1.34.1 → 1.35.1

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/index.cjs CHANGED
@@ -6862,6 +6862,32 @@ var CREATE_CAMPAIGN_ERRORS = /* @__PURE__ */ ((CREATE_CAMPAIGN_ERRORS2) => {
6862
6862
  CREATE_CAMPAIGN_ERRORS2["YoutubeInvalid"] = "components.CreateCampaign.Form.errors.youtubeInvalid";
6863
6863
  return CREATE_CAMPAIGN_ERRORS2;
6864
6864
  })(CREATE_CAMPAIGN_ERRORS || {});
6865
+ var CAMPAIGN_STATUS = /* @__PURE__ */ ((CAMPAIGN_STATUS2) => {
6866
+ CAMPAIGN_STATUS2["Draft"] = "DRAFT";
6867
+ CAMPAIGN_STATUS2["Pending"] = "PENDING";
6868
+ CAMPAIGN_STATUS2["Active"] = "ACTIVE";
6869
+ CAMPAIGN_STATUS2["Completed"] = "COMPLETED";
6870
+ CAMPAIGN_STATUS2["Closed"] = "CLOSED";
6871
+ CAMPAIGN_STATUS2["Cancelled"] = "CANCELLED";
6872
+ CAMPAIGN_STATUS2["Rejected"] = "REJECTED";
6873
+ return CAMPAIGN_STATUS2;
6874
+ })(CAMPAIGN_STATUS || {});
6875
+ var MILESTONE_TRIGGER_TYPE = /* @__PURE__ */ ((MILESTONE_TRIGGER_TYPE2) => {
6876
+ MILESTONE_TRIGGER_TYPE2["FundingPercentage"] = "FUNDING_PERCENTAGE";
6877
+ MILESTONE_TRIGGER_TYPE2["FundingAmount"] = "FUNDING_AMOUNT";
6878
+ MILESTONE_TRIGGER_TYPE2["BackerCount"] = "BACKER_COUNT";
6879
+ MILESTONE_TRIGGER_TYPE2["TimeBased"] = "TIME_BASED";
6880
+ MILESTONE_TRIGGER_TYPE2["Manual"] = "MANUAL";
6881
+ return MILESTONE_TRIGGER_TYPE2;
6882
+ })(MILESTONE_TRIGGER_TYPE || {});
6883
+ var MILESTONE_STATUS = /* @__PURE__ */ ((MILESTONE_STATUS2) => {
6884
+ MILESTONE_STATUS2["Pending"] = "PENDING";
6885
+ MILESTONE_STATUS2["Achieved"] = "ACHIEVED";
6886
+ MILESTONE_STATUS2["Verified"] = "VERIFIED";
6887
+ MILESTONE_STATUS2["PayoutReady"] = "PAYOUT_READY";
6888
+ MILESTONE_STATUS2["Completed"] = "COMPLETED";
6889
+ return MILESTONE_STATUS2;
6890
+ })(MILESTONE_STATUS || {});
6865
6891
  var formCampaignSchema = /* @__PURE__ */ __name(({ maxFunding }) => zod.z.object({
6866
6892
  title: zod.z.string().min(1, "components.CreateCampaign.Form.errors.titleRequired" /* TitleRequired */).max(60, "components.CreateCampaign.Form.errors.titleMax" /* TitleMax */),
6867
6893
  subtitle: zod.z.string().min(1, "components.CreateCampaign.Form.errors.subtitleRequired" /* SubtitleRequired */).max(200, "components.CreateCampaign.Form.errors.subtitleMax" /* SubtitleMax */),
@@ -6907,6 +6933,39 @@ var formCampaignSchema = /* @__PURE__ */ __name(({ maxFunding }) => zod.z.object
6907
6933
  tiktokHandle: zod.z.string().max(24, "components.CreateCampaign.Form.errors.tiktokMax" /* TiktokMax */).regex(/^$|^@?[a-zA-Z0-9][a-zA-Z0-9._]{1,23}$/, "components.CreateCampaign.Form.errors.tiktokInvalid" /* TiktokInvalid */).optional(),
6908
6934
  youtubeHandle: zod.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()
6909
6935
  }), "formCampaignSchema");
6936
+ var CreateCampaignSchema = zod.z.object({
6937
+ creator_id: zod.z.string().uuid(),
6938
+ title: zod.z.string().min(3).max(60),
6939
+ subtitle: zod.z.string().min(1).max(200),
6940
+ story: zod.z.string().min(10).max(1e3),
6941
+ funding_target: zod.z.number().positive(),
6942
+ duration: zod.z.number().min(7).max(365).optional(),
6943
+ location_region: zod.z.string().max(100).optional(),
6944
+ location_city: zod.z.string().max(100).optional(),
6945
+ sport: zod.z.string().max(50).optional(),
6946
+ category: zod.z.string().max(50).optional(),
6947
+ tags: zod.z.array(zod.z.string()).optional(),
6948
+ campaign_images: zod.z.array(zod.z.string().uuid()).optional(),
6949
+ campaign_videos: zod.z.array(zod.z.string().uuid()).optional()
6950
+ });
6951
+ var UpdateCampaignSchema = CreateCampaignSchema.extend({
6952
+ id: zod.z.string().uuid()
6953
+ });
6954
+ var PatchCampaignSchema = CreateCampaignSchema.partial().extend({
6955
+ id: zod.z.string().uuid().optional()
6956
+ });
6957
+ var DeleteCampaignSchema = zod.z.object({
6958
+ id: zod.z.string().uuid()
6959
+ });
6960
+ var QueryCampaignSchema = zod.z.object({
6961
+ status: zod.z.nativeEnum(CAMPAIGN_STATUS).optional(),
6962
+ creator_id: zod.z.string().uuid().optional(),
6963
+ sport: zod.z.string().optional(),
6964
+ category: zod.z.string().optional(),
6965
+ location_region: zod.z.string().optional(),
6966
+ limit: zod.z.number().positive().optional(),
6967
+ offset: zod.z.number().min(0).optional()
6968
+ });
6910
6969
 
6911
6970
  // src/logger/enums.ts
6912
6971
  var LOGGER_SERVICES = {
@@ -9189,6 +9248,7 @@ exports.BUSINESS_MODEL = BUSINESS_MODEL;
9189
9248
  exports.CACHE_DURATION_MS = CACHE_DURATION_MS;
9190
9249
  exports.CACHE_EVENTS = CACHE_EVENTS;
9191
9250
  exports.CACHE_STRATEGIES = CACHE_STRATEGIES;
9251
+ exports.CAMPAIGN_STATUS = CAMPAIGN_STATUS;
9192
9252
  exports.CHAIN_ID = CHAIN_ID;
9193
9253
  exports.CHANGE_TYPES = CHANGE_TYPES;
9194
9254
  exports.CLIENT_EVENTS = CLIENT_EVENTS;
@@ -9211,6 +9271,7 @@ exports.CacheEventAction = CacheEventAction;
9211
9271
  exports.ContactUsFormSchema = ContactUsFormSchema;
9212
9272
  exports.CoreEventScope = CoreEventScope;
9213
9273
  exports.CorrelationIdSchema = CorrelationIdSchema;
9274
+ exports.CreateCampaignSchema = CreateCampaignSchema;
9214
9275
  exports.DATABASE_ERROR_CODES = DATABASE_ERROR_CODES;
9215
9276
  exports.DATABASE_EVENT_TYPE = DATABASE_EVENT_TYPE;
9216
9277
  exports.DATABASE_FIELDS = DATABASE_FIELDS;
@@ -9221,6 +9282,7 @@ exports.DEBUG_EVENTS = DEBUG_EVENTS;
9221
9282
  exports.DEFAULT_THRESHOLDS = DEFAULT_THRESHOLDS;
9222
9283
  exports.DOCUMENT_TYPE = DOCUMENT_TYPE;
9223
9284
  exports.DatabaseEventAction = DatabaseEventAction;
9285
+ exports.DeleteCampaignSchema = DeleteCampaignSchema;
9224
9286
  exports.DeviceTokenSchema = DeviceTokenSchema;
9225
9287
  exports.ENCRYPTION_DEFAULTS = ENCRYPTION_DEFAULTS;
9226
9288
  exports.ENTITY_TYPE = ENTITY_TYPE;
@@ -9297,6 +9359,8 @@ exports.MEDIA_EXTENSIONS = MEDIA_EXTENSIONS;
9297
9359
  exports.MEDIA_MIME_PREFIXES = MEDIA_MIME_PREFIXES;
9298
9360
  exports.MEDIA_VARIANT_TYPE = MEDIA_VARIANT_TYPE;
9299
9361
  exports.MFATYPE = MFATYPE;
9362
+ exports.MILESTONE_STATUS = MILESTONE_STATUS;
9363
+ exports.MILESTONE_TRIGGER_TYPE = MILESTONE_TRIGGER_TYPE;
9300
9364
  exports.MIME_TYPES = MIME_TYPES;
9301
9365
  exports.NETWORK_CONFIDENCE_LEVELS = NETWORK_CONFIDENCE_LEVELS;
9302
9366
  exports.NETWORK_EVENTS = NETWORK_EVENTS;
@@ -9337,8 +9401,10 @@ exports.PRODUCT_TYPE = PRODUCT_TYPE;
9337
9401
  exports.PROVIDERTYPE = PROVIDERTYPE;
9338
9402
  exports.PROVIDER_PRODUCT_STATUS = PROVIDER_PRODUCT_STATUS;
9339
9403
  exports.PUB_SUB_EVENT = PUB_SUB_EVENT;
9404
+ exports.PatchCampaignSchema = PatchCampaignSchema;
9340
9405
  exports.PhoneSchema = PhoneSchema;
9341
9406
  exports.QUEUE_OPERATIONS = QUEUE_OPERATIONS;
9407
+ exports.QueryCampaignSchema = QueryCampaignSchema;
9342
9408
  exports.QueuePrioritySchema = QueuePrioritySchema;
9343
9409
  exports.R2EventRecordSchema = R2EventRecordSchema;
9344
9410
  exports.R2WebhookPayloadSchema = R2WebhookPayloadSchema;
@@ -9419,6 +9485,7 @@ exports.USER_ROLE = USER_ROLE;
9419
9485
  exports.USER_ROLE_STATUS = USER_ROLE_STATUS;
9420
9486
  exports.USER_STATUS = USER_STATUS;
9421
9487
  exports.USER_TYPE = USER_TYPE;
9488
+ exports.UpdateCampaignSchema = UpdateCampaignSchema;
9422
9489
  exports.UserIdSchema = UserIdSchema;
9423
9490
  exports.VALIDATION_RANGES = VALIDATION_RANGES;
9424
9491
  exports.ValidationEventAction = ValidationEventAction;