@plyaz/types 1.39.5 → 1.39.7
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/core/frameworks/express-types.d.ts +94 -0
- package/dist/core/frameworks/file-types.d.ts +34 -0
- package/dist/core/frameworks/index.d.ts +12 -0
- package/dist/core/frameworks/nextjs-types.d.ts +121 -0
- package/dist/core/frameworks/route-types.d.ts +70 -0
- package/dist/core/hooks/files/delete.d.ts +20 -0
- package/dist/core/hooks/files/download.d.ts +36 -0
- package/dist/core/hooks/files/file.d.ts +21 -0
- package/dist/core/hooks/files/index.d.ts +10 -0
- package/dist/core/hooks/files/progress.d.ts +68 -0
- package/dist/core/hooks/files/upload.d.ts +97 -0
- package/dist/core/hooks/index.d.ts +7 -0
- package/dist/core/index.cjs +53 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +50 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/utils/index.d.ts +4 -0
- package/dist/core/utils/types.d.ts +33 -0
- package/dist/index.cjs +66 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +63 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6990,6 +6990,55 @@ var SERVICE_KEYS = {
|
|
|
6990
6990
|
};
|
|
6991
6991
|
var ALL_SERVICE_KEYS = Object.values(SERVICE_KEYS);
|
|
6992
6992
|
|
|
6993
|
+
// src/core/frameworks/route-types.ts
|
|
6994
|
+
var DEFAULT_SUCCESS_MESSAGES = {
|
|
6995
|
+
GET: "Retrieved successfully",
|
|
6996
|
+
POST: "Created successfully",
|
|
6997
|
+
PUT: "Updated successfully",
|
|
6998
|
+
PATCH: "Updated successfully",
|
|
6999
|
+
DELETE: "Deleted successfully",
|
|
7000
|
+
OPTIONS: "Options retrieved",
|
|
7001
|
+
HEAD: "Head retrieved"
|
|
7002
|
+
};
|
|
7003
|
+
|
|
7004
|
+
// src/core/frameworks/file-types.ts
|
|
7005
|
+
var MIME_TYPE_EXTENSIONS = {
|
|
7006
|
+
"application/pdf": "pdf",
|
|
7007
|
+
"application/msword": "doc",
|
|
7008
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
|
|
7009
|
+
"application/vnd.ms-excel": "xls",
|
|
7010
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
|
|
7011
|
+
"application/vnd.ms-powerpoint": "ppt",
|
|
7012
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "pptx",
|
|
7013
|
+
"application/json": "json",
|
|
7014
|
+
"application/xml": "xml",
|
|
7015
|
+
"application/zip": "zip",
|
|
7016
|
+
"text/plain": "txt",
|
|
7017
|
+
"text/html": "html",
|
|
7018
|
+
"text/css": "css",
|
|
7019
|
+
"text/csv": "csv",
|
|
7020
|
+
"image/png": "png",
|
|
7021
|
+
"image/jpeg": "jpg",
|
|
7022
|
+
"image/gif": "gif",
|
|
7023
|
+
"image/webp": "webp",
|
|
7024
|
+
"image/svg+xml": "svg",
|
|
7025
|
+
"audio/mpeg": "mp3",
|
|
7026
|
+
"audio/wav": "wav",
|
|
7027
|
+
"video/mp4": "mp4",
|
|
7028
|
+
"video/webm": "webm"
|
|
7029
|
+
};
|
|
7030
|
+
var FILE_SIZE_UNITS = ["Bytes", "KB", "MB", "GB", "TB", "PB"];
|
|
7031
|
+
var BYTES_PER_KB = 1024;
|
|
7032
|
+
var FILE_SIZE_MULTIPLIERS = {
|
|
7033
|
+
B: 1,
|
|
7034
|
+
KB: BYTES_PER_KB,
|
|
7035
|
+
MB: BYTES_PER_KB * BYTES_PER_KB,
|
|
7036
|
+
GB: BYTES_PER_KB * BYTES_PER_KB * BYTES_PER_KB,
|
|
7037
|
+
TB: BYTES_PER_KB * BYTES_PER_KB * BYTES_PER_KB * BYTES_PER_KB,
|
|
7038
|
+
PB: BYTES_PER_KB * BYTES_PER_KB * BYTES_PER_KB * BYTES_PER_KB * BYTES_PER_KB,
|
|
7039
|
+
BYTES: 1
|
|
7040
|
+
};
|
|
7041
|
+
|
|
6993
7042
|
// src/events/enums.ts
|
|
6994
7043
|
var EVENT_TYPE = {
|
|
6995
7044
|
/** Application initialization event. */
|
|
@@ -7427,19 +7476,25 @@ var formCampaignSchema = /* @__PURE__ */ __name(({ maxFunding }) => zod.z.object
|
|
|
7427
7476
|
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()
|
|
7428
7477
|
}), "formCampaignSchema");
|
|
7429
7478
|
var CreateCampaignSchema = zod.z.object({
|
|
7479
|
+
// REQUIRED
|
|
7430
7480
|
creator_id: zod.z.string().uuid(),
|
|
7431
7481
|
title: zod.z.string().min(3).max(60),
|
|
7432
7482
|
subtitle: zod.z.string().min(1).max(200),
|
|
7433
7483
|
story: zod.z.string().min(10).max(1e3),
|
|
7434
7484
|
funding_target: zod.z.number().positive(),
|
|
7435
|
-
duration: zod.z.number().min(7).max(365)
|
|
7485
|
+
duration: zod.z.number().min(7).max(365),
|
|
7486
|
+
start_date: zod.z.string(),
|
|
7487
|
+
// ISO date string
|
|
7488
|
+
campaign_images: zod.z.array(zod.z.string().uuid()).min(1),
|
|
7489
|
+
campaign_videos: zod.z.array(zod.z.string().uuid()).min(1),
|
|
7490
|
+
// OPTIONAL
|
|
7436
7491
|
location_region: zod.z.string().max(100).optional(),
|
|
7437
7492
|
location_city: zod.z.string().max(100).optional(),
|
|
7438
7493
|
sport: zod.z.string().max(50).optional(),
|
|
7439
7494
|
category: zod.z.string().max(50).optional(),
|
|
7440
7495
|
tags: zod.z.array(zod.z.string()).optional(),
|
|
7441
|
-
|
|
7442
|
-
|
|
7496
|
+
// OPTIONAL (DB default ACTIVE)
|
|
7497
|
+
status: zod.z.enum(["DRAFT", "ACTIVE"]).optional()
|
|
7443
7498
|
});
|
|
7444
7499
|
var UpdateCampaignSchema = CreateCampaignSchema.extend({
|
|
7445
7500
|
id: zod.z.string().uuid()
|
|
@@ -7477,15 +7532,15 @@ var CampaignResponseSchema = zod.z.object({
|
|
|
7477
7532
|
story: zod.z.string(),
|
|
7478
7533
|
funding_target: zod.z.number(),
|
|
7479
7534
|
status: zod.z.nativeEnum(CAMPAIGN_STATUS),
|
|
7480
|
-
campaign_images: zod.z.array(zod.z.string())
|
|
7481
|
-
start_date: zod.z.string().datetime()
|
|
7482
|
-
duration: zod.z.number()
|
|
7535
|
+
campaign_images: zod.z.array(zod.z.string()),
|
|
7536
|
+
start_date: zod.z.string().datetime(),
|
|
7537
|
+
duration: zod.z.number(),
|
|
7483
7538
|
location_region: zod.z.string().optional(),
|
|
7484
7539
|
location_city: zod.z.string().optional(),
|
|
7485
7540
|
sport: zod.z.string().optional(),
|
|
7486
7541
|
category: zod.z.string().optional(),
|
|
7487
7542
|
tags: zod.z.array(zod.z.string()).optional(),
|
|
7488
|
-
campaign_videos: zod.z.array(zod.z.string())
|
|
7543
|
+
campaign_videos: zod.z.array(zod.z.string()),
|
|
7489
7544
|
first_contribution_at: zod.z.string().datetime().optional(),
|
|
7490
7545
|
created_at: zod.z.string().datetime(),
|
|
7491
7546
|
updated_at: zod.z.string().datetime(),
|
|
@@ -9817,6 +9872,7 @@ exports.DATA_SAVER_PRESETS = DATA_SAVER_PRESETS;
|
|
|
9817
9872
|
exports.DB_POOL_EVENTS = DB_POOL_EVENTS;
|
|
9818
9873
|
exports.DEBUGGER_CONFIG_SOURCES = DEBUGGER_CONFIG_SOURCES;
|
|
9819
9874
|
exports.DEBUG_EVENTS = DEBUG_EVENTS;
|
|
9875
|
+
exports.DEFAULT_SUCCESS_MESSAGES = DEFAULT_SUCCESS_MESSAGES;
|
|
9820
9876
|
exports.DEFAULT_THRESHOLDS = DEFAULT_THRESHOLDS;
|
|
9821
9877
|
exports.DOCUMENT_TYPE = DOCUMENT_TYPE;
|
|
9822
9878
|
exports.DatabaseEventAction = DatabaseEventAction;
|
|
@@ -9872,6 +9928,8 @@ exports.FILE_ACCESS_LEVEL = FILE_ACCESS_LEVEL;
|
|
|
9872
9928
|
exports.FILE_ACCESS_LEVELS = FILE_ACCESS_LEVELS;
|
|
9873
9929
|
exports.FILE_CATEGORY = FILE_CATEGORY;
|
|
9874
9930
|
exports.FILE_EXTENSIONS = FILE_EXTENSIONS;
|
|
9931
|
+
exports.FILE_SIZE_MULTIPLIERS = FILE_SIZE_MULTIPLIERS;
|
|
9932
|
+
exports.FILE_SIZE_UNITS = FILE_SIZE_UNITS;
|
|
9875
9933
|
exports.FILE_TYPES = FILE_TYPES;
|
|
9876
9934
|
exports.FILE_VALIDATION_ERROR = FILE_VALIDATION_ERROR;
|
|
9877
9935
|
exports.FRONTEND_RUNTIMES = FRONTEND_RUNTIMES;
|
|
@@ -9911,6 +9969,7 @@ exports.MFATYPE = MFATYPE;
|
|
|
9911
9969
|
exports.MILESTONE_STATUS = MILESTONE_STATUS;
|
|
9912
9970
|
exports.MILESTONE_TRIGGER_TYPE = MILESTONE_TRIGGER_TYPE;
|
|
9913
9971
|
exports.MIME_TYPES = MIME_TYPES;
|
|
9972
|
+
exports.MIME_TYPE_EXTENSIONS = MIME_TYPE_EXTENSIONS;
|
|
9914
9973
|
exports.MediaAccessLevelSchema = MediaAccessLevelSchema;
|
|
9915
9974
|
exports.MediaTypeSchema = MediaTypeSchema;
|
|
9916
9975
|
exports.MediaVariantsDatabaseRowSchema = MediaVariantsDatabaseRowSchema;
|