dating-schema 0.1.0

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.
@@ -0,0 +1,88 @@
1
+ /**
2
+ * dating-schema — Shared helpers and core enums
3
+ *
4
+ * These are the stable building blocks reused across all dating schemas.
5
+ *
6
+ * @module dating-schema/common
7
+ */
8
+ import { z } from 'zod';
9
+ /**
10
+ * Converts empty / whitespace-only strings to `undefined`
11
+ * so Zod `.optional()` treats them as "not provided".
12
+ */
13
+ export declare const emptyStringToUndefined: (value: unknown) => unknown;
14
+ /** Optional trimmed string. Empty strings are coerced to `undefined`. */
15
+ export declare const optionalTrimmedString: (maxLength?: number) => z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
16
+ /** Biological / self-identified gender for a dating profile. */
17
+ export declare const genderSchema: z.ZodEnum<{
18
+ male: "male";
19
+ female: "female";
20
+ non_binary: "non_binary";
21
+ prefer_not_to_say: "prefer_not_to_say";
22
+ }>;
23
+ export type Gender = z.infer<typeof genderSchema>;
24
+ /** Who the user is interested in meeting. */
25
+ export declare const interestedInSchema: z.ZodEnum<{
26
+ male: "male";
27
+ female: "female";
28
+ everyone: "everyone";
29
+ }>;
30
+ export type InterestedIn = z.infer<typeof interestedInSchema>;
31
+ /** Swipe / interaction action a user can take on another profile. */
32
+ export declare const swipeActionSchema: z.ZodEnum<{
33
+ like: "like";
34
+ superlike: "superlike";
35
+ pass: "pass";
36
+ }>;
37
+ export type SwipeAction = z.infer<typeof swipeActionSchema>;
38
+ /** Current marital / relationship history status. */
39
+ export declare const maritalStatusSchema: z.ZodEnum<{
40
+ never_married: "never_married";
41
+ divorced: "divorced";
42
+ widowed: "widowed";
43
+ separated: "separated";
44
+ }>;
45
+ export type MaritalStatus = z.infer<typeof maritalStatusSchema>;
46
+ /** What the user is looking for on the platform. */
47
+ export declare const lookingForSchema: z.ZodEnum<{
48
+ serious_relationship: "serious_relationship";
49
+ friendship: "friendship";
50
+ open_to_all: "open_to_all";
51
+ }>;
52
+ export type LookingFor = z.infer<typeof lookingForSchema>;
53
+ /** Message content type. */
54
+ export declare const messageTypeSchema: z.ZodEnum<{
55
+ text: "text";
56
+ image: "image";
57
+ gif: "gif";
58
+ }>;
59
+ export type MessageType = z.infer<typeof messageTypeSchema>;
60
+ /** Conversation / match status. */
61
+ export declare const matchStatusSchema: z.ZodEnum<{
62
+ active: "active";
63
+ unmatched: "unmatched";
64
+ blocked: "blocked";
65
+ }>;
66
+ export type MatchStatus = z.infer<typeof matchStatusSchema>;
67
+ /** Age range preference filter. */
68
+ export declare const ageRangeSchema: z.ZodObject<{
69
+ min: z.ZodNumber;
70
+ max: z.ZodNumber;
71
+ }, z.core.$strip>;
72
+ export type AgeRange = z.infer<typeof ageRangeSchema>;
73
+ /** A single dating profile photo. */
74
+ export declare const photoSchema: z.ZodObject<{
75
+ url: z.ZodString;
76
+ order: z.ZodNumber;
77
+ assetId: z.ZodOptional<z.ZodString>;
78
+ mimeType: z.ZodOptional<z.ZodString>;
79
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
80
+ }, z.core.$strip>;
81
+ export type Photo = z.infer<typeof photoSchema>;
82
+ /** Pagination query params shared across list endpoints. */
83
+ export declare const paginationSchema: z.ZodObject<{
84
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
85
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
86
+ }, z.core.$strip>;
87
+ export type Pagination = z.infer<typeof paginationSchema>;
88
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,KAAG,OAGvD,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,GAAI,k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,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
package/dist/common.js ADDED
@@ -0,0 +1,64 @@
1
+ /**
2
+ * dating-schema — Shared helpers and core enums
3
+ *
4
+ * These are the stable building blocks reused across all dating schemas.
5
+ *
6
+ * @module dating-schema/common
7
+ */
8
+ import { z } from 'zod';
9
+ // ─── String helpers ──────────────────────────────────────────────────────────
10
+ /**
11
+ * Converts empty / whitespace-only strings to `undefined`
12
+ * so Zod `.optional()` treats them as "not provided".
13
+ */
14
+ export const emptyStringToUndefined = (value) => {
15
+ if (typeof value === 'string' && value.trim() === '')
16
+ return undefined;
17
+ return value;
18
+ };
19
+ /** Optional trimmed string. Empty strings are coerced to `undefined`. */
20
+ export const optionalTrimmedString = (maxLength = 100) => z.preprocess(emptyStringToUndefined, z.string().trim().max(maxLength).optional());
21
+ // ─── Core enums ──────────────────────────────────────────────────────────────
22
+ /** Biological / self-identified gender for a dating profile. */
23
+ export const genderSchema = z.enum(['male', 'female', 'non_binary', 'prefer_not_to_say']);
24
+ /** Who the user is interested in meeting. */
25
+ export const interestedInSchema = z.enum(['male', 'female', 'everyone']);
26
+ /** Swipe / interaction action a user can take on another profile. */
27
+ export const swipeActionSchema = z.enum(['like', 'superlike', 'pass']);
28
+ /** Current marital / relationship history status. */
29
+ export const maritalStatusSchema = z.enum([
30
+ 'never_married',
31
+ 'divorced',
32
+ 'widowed',
33
+ 'separated',
34
+ ]);
35
+ /** What the user is looking for on the platform. */
36
+ export const lookingForSchema = z.enum([
37
+ 'serious_relationship',
38
+ 'friendship',
39
+ 'open_to_all',
40
+ ]);
41
+ /** Message content type. */
42
+ export const messageTypeSchema = z.enum(['text', 'image', 'gif']);
43
+ /** Conversation / match status. */
44
+ export const matchStatusSchema = z.enum(['active', 'unmatched', 'blocked']);
45
+ // ─── Shared sub-schemas ──────────────────────────────────────────────────────
46
+ /** Age range preference filter. */
47
+ export const ageRangeSchema = z.object({
48
+ min: z.number().int().min(18).max(100),
49
+ max: z.number().int().min(18).max(100),
50
+ }).refine((r) => r.min <= r.max, 'min age must be less than or equal to max age');
51
+ /** A single dating profile photo. */
52
+ export const photoSchema = z.object({
53
+ url: z.string().trim().min(1),
54
+ order: z.number().int().min(0),
55
+ assetId: z.string().trim().optional(),
56
+ mimeType: z.string().trim().optional(),
57
+ sizeBytes: z.number().min(0).optional(),
58
+ });
59
+ /** Pagination query params shared across list endpoints. */
60
+ export const paginationSchema = z.object({
61
+ page: z.coerce.number().int().min(1).default(1),
62
+ limit: z.coerce.number().int().min(1).max(100).default(20),
63
+ });
64
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAc,EAAW,EAAE;IAChE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IACvE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,SAAS,GAAG,GAAG,EAAE,EAAE,CACvD,CAAC,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEpF,gFAAgF;AAEhF,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAA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C,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,EAAE,+CAA+C,CAAC,CAAC;AAGlF,qCAAqC;AACrC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACrC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAGH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC3D,CAAC,CAAC","sourcesContent":["/**\r\n * dating-schema — Shared helpers and core enums\r\n *\r\n * These are the stable building blocks reused across all dating schemas.\r\n *\r\n * @module dating-schema/common\r\n */\r\n\r\nimport { z } from 'zod';\r\n\r\n// ─── String helpers ──────────────────────────────────────────────────────────\r\n\r\n/**\r\n * Converts empty / whitespace-only strings to `undefined`\r\n * so Zod `.optional()` treats them as \"not provided\".\r\n */\r\nexport const emptyStringToUndefined = (value: unknown): unknown => {\r\n if (typeof value === 'string' && value.trim() === '') return undefined;\r\n return value;\r\n};\r\n\r\n/** Optional trimmed string. Empty strings are coerced to `undefined`. */\r\nexport const optionalTrimmedString = (maxLength = 100) =>\r\n z.preprocess(emptyStringToUndefined, z.string().trim().max(maxLength).optional());\r\n\r\n// ─── Core enums ──────────────────────────────────────────────────────────────\r\n\r\n/** Biological / self-identified gender for a dating profile. */\r\nexport const genderSchema = z.enum(['male', 'female', 'non_binary', 'prefer_not_to_say']);\r\nexport type Gender = z.infer<typeof genderSchema>;\r\n\r\n/** Who the user is interested in meeting. */\r\nexport const interestedInSchema = z.enum(['male', 'female', 'everyone']);\r\nexport type InterestedIn = z.infer<typeof interestedInSchema>;\r\n\r\n/** Swipe / interaction action a user can take on another profile. */\r\nexport const swipeActionSchema = z.enum(['like', 'superlike', 'pass']);\r\nexport type SwipeAction = z.infer<typeof swipeActionSchema>;\r\n\r\n/** Current marital / relationship history status. */\r\nexport const maritalStatusSchema = z.enum([\r\n 'never_married',\r\n 'divorced',\r\n 'widowed',\r\n 'separated',\r\n]);\r\nexport type MaritalStatus = z.infer<typeof maritalStatusSchema>;\r\n\r\n/** What the user is looking for on the platform. */\r\nexport const lookingForSchema = z.enum([\r\n 'serious_relationship',\r\n 'friendship',\r\n 'open_to_all',\r\n]);\r\nexport type LookingFor = z.infer<typeof lookingForSchema>;\r\n\r\n/** Message content type. */\r\nexport const messageTypeSchema = z.enum(['text', 'image', 'gif']);\r\nexport type MessageType = z.infer<typeof messageTypeSchema>;\r\n\r\n/** Conversation / match status. */\r\nexport const matchStatusSchema = z.enum(['active', 'unmatched', 'blocked']);\r\nexport type MatchStatus = z.infer<typeof matchStatusSchema>;\r\n\r\n// ─── Shared sub-schemas ──────────────────────────────────────────────────────\r\n\r\n/** Age range preference filter. */\r\nexport const ageRangeSchema = z.object({\r\n min: z.number().int().min(18).max(100),\r\n max: z.number().int().min(18).max(100),\r\n}).refine((r) => r.min <= r.max, 'min age must be less than or equal to max age');\r\nexport type AgeRange = z.infer<typeof ageRangeSchema>;\r\n\r\n/** A single dating profile photo. */\r\nexport const photoSchema = z.object({\r\n url: z.string().trim().min(1),\r\n order: z.number().int().min(0),\r\n assetId: z.string().trim().optional(),\r\n mimeType: z.string().trim().optional(),\r\n sizeBytes: z.number().min(0).optional(),\r\n});\r\nexport type Photo = z.infer<typeof photoSchema>;\r\n\r\n/** Pagination query params shared across list endpoints. */\r\nexport const paginationSchema = z.object({\r\n page: z.coerce.number().int().min(1).default(1),\r\n limit: z.coerce.number().int().min(1).max(100).default(20),\r\n});\r\nexport type Pagination = z.infer<typeof paginationSchema>;\r\n"]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * dating-schema — Shared Zod schemas for the Dating feature
3
+ *
4
+ * Single source of truth consumed by both jansathi-frontend and reform-backend.
5
+ * Guarantees identical validation logic and TypeScript types on both sides.
6
+ *
7
+ * @module dating-schema
8
+ */
9
+ export { emptyStringToUndefined, optionalTrimmedString, genderSchema, type Gender, interestedInSchema, type InterestedIn, swipeActionSchema, type SwipeAction, maritalStatusSchema, type MaritalStatus, lookingForSchema, type LookingFor, messageTypeSchema, type MessageType, matchStatusSchema, type MatchStatus, ageRangeSchema, type AgeRange, photoSchema, type Photo, paginationSchema, type Pagination, } from './common.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EAErB,YAAY,EACZ,KAAK,MAAM,EACX,kBAAkB,EAClB,KAAK,YAAY,EACjB,iBAAiB,EACjB,KAAK,WAAW,EAChB,mBAAmB,EACnB,KAAK,aAAa,EAClB,gBAAgB,EAChB,KAAK,UAAU,EACf,iBAAiB,EACjB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,WAAW,EAEhB,cAAc,EACd,KAAK,QAAQ,EACb,WAAW,EACX,KAAK,KAAK,EACV,gBAAgB,EAChB,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * dating-schema — Shared Zod schemas for the Dating feature
3
+ *
4
+ * Single source of truth consumed by both jansathi-frontend and reform-backend.
5
+ * Guarantees identical validation logic and TypeScript types on both sides.
6
+ *
7
+ * @module dating-schema
8
+ */
9
+ // ─── Common helpers and enums ────────────────────────────────────────────────
10
+ export { emptyStringToUndefined, optionalTrimmedString,
11
+ // enums
12
+ genderSchema, interestedInSchema, swipeActionSchema, maritalStatusSchema, lookingForSchema, messageTypeSchema, matchStatusSchema,
13
+ // sub-schemas
14
+ ageRangeSchema, photoSchema, paginationSchema, } from './common.js';
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,OAAO,EACL,sBAAsB,EACtB,qBAAqB;AACrB,QAAQ;AACR,YAAY,EAEZ,kBAAkB,EAElB,iBAAiB,EAEjB,mBAAmB,EAEnB,gBAAgB,EAEhB,iBAAiB,EAEjB,iBAAiB;AAEjB,cAAc;AACd,cAAc,EAEd,WAAW,EAEX,gBAAgB,GAEjB,MAAM,aAAa,CAAC","sourcesContent":["/**\r\n * dating-schema — Shared Zod schemas for the Dating feature\r\n *\r\n * Single source of truth consumed by both jansathi-frontend and reform-backend.\r\n * Guarantees identical validation logic and TypeScript types on both sides.\r\n *\r\n * @module dating-schema\r\n */\r\n\r\n// ─── Common helpers and enums ────────────────────────────────────────────────\r\nexport {\r\n emptyStringToUndefined,\r\n optionalTrimmedString,\r\n // enums\r\n genderSchema,\r\n type Gender,\r\n interestedInSchema,\r\n type InterestedIn,\r\n swipeActionSchema,\r\n type SwipeAction,\r\n maritalStatusSchema,\r\n type MaritalStatus,\r\n lookingForSchema,\r\n type LookingFor,\r\n messageTypeSchema,\r\n type MessageType,\r\n matchStatusSchema,\r\n type MatchStatus,\r\n // sub-schemas\r\n ageRangeSchema,\r\n type AgeRange,\r\n photoSchema,\r\n type Photo,\r\n paginationSchema,\r\n type Pagination,\r\n} from './common.js';\r\n"]}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "dating-schema",
3
+ "version": "0.1.0",
4
+ "description": "Shared Zod schemas for the Dating feature — single source of truth for API contracts, validation, and TypeScript types (frontend + backend).",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "README.md"
19
+ ],
20
+ "sideEffects": false,
21
+ "scripts": {
22
+ "build": "tsc -p tsconfig.json",
23
+ "type-check": "tsc --noEmit",
24
+ "lint": "biome lint .",
25
+ "format": "biome format --write .",
26
+ "check": "npm run type-check && biome check --write .",
27
+ "check:staged": "biome check --staged --write --no-errors-on-unmatched",
28
+ "prepublishOnly": "npm run build && npm run check"
29
+ },
30
+ "keywords": [
31
+ "zod",
32
+ "schema",
33
+ "dating",
34
+ "matchmaking",
35
+ "typescript"
36
+ ],
37
+ "author": "Hari",
38
+ "license": "MIT",
39
+ "peerDependencies": {
40
+ "zod": "^3.25.0 || ^4.0.0"
41
+ },
42
+ "devDependencies": {
43
+ "@biomejs/biome": "^2.4.2",
44
+ "@types/node": "^24.10.1",
45
+ "typescript": "^5.9.3",
46
+ "zod": "^4.1.13"
47
+ }
48
+ }