@brite-future-schools-contracts/contracts 2.0.2 → 2.0.4

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.
@@ -1,127 +0,0 @@
1
- // src/schemas/base.ts
2
- import * as z from "zod";
3
- var CuidSchema = z.string().regex(/^[a-z][a-z0-9]{24}$/, "Invalid cuid2 identifier").meta({ description: "cuid2 \u2014 prefixed, collision-resistant identifier" });
4
- var UuidSchema = z.uuidv4().meta({ description: "RFC-4122 UUID v4" });
5
- var IsoDatetime = z.iso.datetime();
6
- var TimestampsSchema = z.object({
7
- createdAt: IsoDatetime.meta({ description: "ISO-8601 creation time (UTC)" }),
8
- updatedAt: IsoDatetime.meta({ description: "ISO-8601 last update time (UTC)" })
9
- });
10
- var SoftDeleteSchema = z.object({
11
- deletedAt: IsoDatetime.nullable().meta({
12
- description: "Set when the record is soft-deleted; null if active"
13
- })
14
- });
15
- var PaginationInputSchema = z.object({
16
- cursor: CuidSchema.optional().meta({
17
- description: "Opaque cursor from the previous page response"
18
- }),
19
- limit: z.int().min(1).max(100).default(20).meta({ description: "Number of items to return (1\u2013100, default 20)" })
20
- });
21
- function paginatedOutputSchema(itemSchema) {
22
- return z.object({
23
- items: z.array(itemSchema),
24
- nextCursor: CuidSchema.nullable().meta({
25
- description: "Pass as `cursor` on the next request; null when no more pages"
26
- }),
27
- total: z.int().nonnegative().meta({ description: "Total matching records (before pagination)" })
28
- });
29
- }
30
- var BranchRefSchema = z.object({
31
- branchId: CuidSchema.meta({ description: "The branch this record belongs to" })
32
- });
33
-
34
- // src/schemas/auth.ts
35
- import * as z2 from "zod";
36
- var SessionUserRoleSchema = z2.object({
37
- id: CuidSchema,
38
- name: z2.string().meta({ description: "Role name, e.g. PRINCIPAL" }),
39
- branchId: CuidSchema,
40
- isPrimary: z2.boolean()
41
- });
42
- var SessionUserSubRoleSchema = z2.object({
43
- id: CuidSchema,
44
- name: z2.string().meta({ description: "Sub-role name, e.g. HEAD_PREFECT" }),
45
- branchId: CuidSchema
46
- });
47
- var SessionUserOutputSchema = z2.object({
48
- id: CuidSchema,
49
- email: z2.email(),
50
- firstName: z2.string(),
51
- lastName: z2.string(),
52
- activeBranchId: CuidSchema,
53
- roles: z2.array(SessionUserRoleSchema),
54
- subRoles: z2.array(SessionUserSubRoleSchema),
55
- isActive: z2.boolean(),
56
- mustChangePassword: z2.boolean()
57
- });
58
- var LoginInputSchema = z2.object({
59
- email: z2.email().meta({ description: "User email address" }),
60
- password: z2.string().min(1).meta({ description: "Plain-text password (sent over TLS)" }),
61
- branchId: CuidSchema.optional().meta({
62
- description: "Branch to activate on login; defaults to user primary branch"
63
- })
64
- });
65
- var LoginOutputSchema = z2.object({
66
- accessToken: z2.string().meta({ description: "Short-lived JWT (15 min)" }),
67
- refreshToken: z2.string().meta({ description: "Long-lived opaque refresh token (7 days)" }),
68
- expiresIn: z2.int().positive().meta({ description: "Access token TTL in seconds" }),
69
- user: SessionUserOutputSchema
70
- });
71
- var RefreshTokenInputSchema = z2.object({
72
- refreshToken: z2.string().min(1)
73
- });
74
- var RefreshTokenOutputSchema = z2.object({
75
- accessToken: z2.string(),
76
- expiresIn: z2.int().positive()
77
- });
78
- var LogoutInputSchema = z2.object({
79
- refreshToken: z2.string().min(1).meta({
80
- description: "The refresh token to revoke; also invalidated server-side"
81
- })
82
- });
83
- var ChangePasswordInputSchema = z2.object({
84
- currentPassword: z2.string().min(1),
85
- newPassword: z2.string().min(8, { error: "Password must be at least 8 characters" }),
86
- confirmPassword: z2.string().min(1)
87
- }).refine((v) => v.newPassword === v.confirmPassword, {
88
- error: "Passwords do not match",
89
- path: ["confirmPassword"]
90
- });
91
- var RequestPasswordResetInputSchema = z2.object({
92
- email: z2.email()
93
- });
94
- var ResetPasswordInputSchema = z2.object({
95
- token: z2.string().min(1).meta({ description: "One-time reset token from email link" }),
96
- newPassword: z2.string().min(8, { error: "Password must be at least 8 characters" }),
97
- confirmPassword: z2.string().min(1)
98
- }).refine((v) => v.newPassword === v.confirmPassword, {
99
- error: "Passwords do not match",
100
- path: ["confirmPassword"]
101
- });
102
- var SwitchBranchInputSchema = z2.object({
103
- branchId: CuidSchema.meta({ description: "Branch to switch the active session to" })
104
- });
105
-
106
- export {
107
- CuidSchema,
108
- UuidSchema,
109
- TimestampsSchema,
110
- SoftDeleteSchema,
111
- PaginationInputSchema,
112
- paginatedOutputSchema,
113
- BranchRefSchema,
114
- SessionUserRoleSchema,
115
- SessionUserSubRoleSchema,
116
- SessionUserOutputSchema,
117
- LoginInputSchema,
118
- LoginOutputSchema,
119
- RefreshTokenInputSchema,
120
- RefreshTokenOutputSchema,
121
- LogoutInputSchema,
122
- ChangePasswordInputSchema,
123
- RequestPasswordResetInputSchema,
124
- ResetPasswordInputSchema,
125
- SwitchBranchInputSchema
126
- };
127
- //# sourceMappingURL=chunk-AEZO7MJD.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/schemas/base.ts","../src/schemas/auth.ts"],"sourcesContent":["/**\n * Brite Future Schools — bfs-contracts\n * Base Zod schemas: reusable primitives shared across all domain schemas.\n *\n * Phase History:\n * Phase 0.1 (2026-06-05): Initial creation\n *\n * @module src/schemas/base\n * @since Phase 0.1\n */\n\nimport * as z from 'zod'\n\n// ── ID ─────────────────────────────────────────────────────────────────────────\n\nexport const CuidSchema = z\n .string()\n .regex(/^[a-z][a-z0-9]{24}$/, 'Invalid cuid2 identifier')\n .meta({ description: 'cuid2 — prefixed, collision-resistant identifier' })\n\n// ── UUID ───────────────────────────────────────────────────────────────────────\n\nexport const UuidSchema = z\n .uuidv4()\n .meta({ description: 'RFC-4122 UUID v4' })\n\n// ── Timestamps ─────────────────────────────────────────────────────────────────\n\nconst IsoDatetime = z.iso.datetime()\n\nexport const TimestampsSchema = z.object({\n createdAt: IsoDatetime.meta({ description: 'ISO-8601 creation time (UTC)' }),\n updatedAt: IsoDatetime.meta({ description: 'ISO-8601 last update time (UTC)' }),\n})\n\n// ── Soft-delete ────────────────────────────────────────────────────────────────\n\nexport const SoftDeleteSchema = z.object({\n deletedAt: IsoDatetime.nullable().meta({\n description: 'Set when the record is soft-deleted; null if active',\n }),\n})\n\n// ── Pagination ─────────────────────────────────────────────────────────────────\n\nexport const PaginationInputSchema = z.object({\n cursor: CuidSchema.optional().meta({\n description: 'Opaque cursor from the previous page response',\n }),\n limit: z\n .int()\n .min(1)\n .max(100)\n .default(20)\n .meta({ description: 'Number of items to return (1–100, default 20)' }),\n})\n\nexport function paginatedOutputSchema<T extends z.ZodTypeAny>(itemSchema: T) {\n return z.object({\n items: z.array(itemSchema),\n nextCursor: CuidSchema.nullable().meta({\n description: 'Pass as `cursor` on the next request; null when no more pages',\n }),\n total: z\n .int()\n .nonnegative()\n .meta({ description: 'Total matching records (before pagination)' }),\n })\n}\n\n// ── Branch reference ───────────────────────────────────────────────────────────\n\nexport const BranchRefSchema = z.object({\n branchId: CuidSchema.meta({ description: 'The branch this record belongs to' }),\n})\n\n// ── Inferred types ─────────────────────────────────────────────────────────────\n\nexport type Timestamps = z.infer<typeof TimestampsSchema>\nexport type SoftDelete = z.infer<typeof SoftDeleteSchema>\nexport type PaginationInput = z.infer<typeof PaginationInputSchema>","/**\n * Brite Future Schools — bfs-contracts\n * Auth-related Zod schemas.\n *\n * Phase History:\n * Phase 0.1 (2026-06-05): Initial creation\n *\n * @module src/schemas/auth\n * @since Phase 0.1\n */\n\nimport * as z from 'zod'\nimport { CuidSchema } from './base.js'\n\n// ── Session user (defined first — referenced by LoginOutputSchema below) ───────\n\nexport const SessionUserRoleSchema = z.object({\n id: CuidSchema,\n name: z.string().meta({ description: 'Role name, e.g. PRINCIPAL' }),\n branchId: CuidSchema,\n isPrimary: z.boolean(),\n})\n\nexport const SessionUserSubRoleSchema = z.object({\n id: CuidSchema,\n name: z.string().meta({ description: 'Sub-role name, e.g. HEAD_PREFECT' }),\n branchId: CuidSchema,\n})\n\nexport const SessionUserOutputSchema = z.object({\n id: CuidSchema,\n email: z.email(),\n firstName: z.string(),\n lastName: z.string(),\n activeBranchId: CuidSchema,\n roles: z.array(SessionUserRoleSchema),\n subRoles: z.array(SessionUserSubRoleSchema),\n isActive: z.boolean(),\n mustChangePassword: z.boolean(),\n})\n\n// ── Login ──────────────────────────────────────────────────────────────────────\n\nexport const LoginInputSchema = z.object({\n email: z.email().meta({ description: 'User email address' }),\n password: z.string().min(1).meta({ description: 'Plain-text password (sent over TLS)' }),\n branchId: CuidSchema.optional().meta({\n description: 'Branch to activate on login; defaults to user primary branch',\n }),\n})\n\nexport const LoginOutputSchema = z.object({\n accessToken: z.string().meta({ description: 'Short-lived JWT (15 min)' }),\n refreshToken: z.string().meta({ description: 'Long-lived opaque refresh token (7 days)' }),\n expiresIn: z.int().positive().meta({ description: 'Access token TTL in seconds' }),\n user: SessionUserOutputSchema,\n})\n\n// ── Token refresh ──────────────────────────────────────────────────────────────\n\nexport const RefreshTokenInputSchema = z.object({\n refreshToken: z.string().min(1),\n})\n\nexport const RefreshTokenOutputSchema = z.object({\n accessToken: z.string(),\n expiresIn: z.int().positive(),\n})\n\n// ── Logout ─────────────────────────────────────────────────────────────────────\n\nexport const LogoutInputSchema = z.object({\n refreshToken: z.string().min(1).meta({\n description: 'The refresh token to revoke; also invalidated server-side',\n }),\n})\n\n// ── Password change ─────────────────────────────────────────────────────────────\n\nexport const ChangePasswordInputSchema = z\n .object({\n currentPassword: z.string().min(1),\n newPassword: z\n .string()\n .min(8, { error: 'Password must be at least 8 characters' }),\n confirmPassword: z.string().min(1),\n })\n .refine((v) => v.newPassword === v.confirmPassword, {\n error: 'Passwords do not match',\n path: ['confirmPassword'],\n })\n\n// ── Password reset ─────────────────────────────────────────────────────────────\n\nexport const RequestPasswordResetInputSchema = z.object({\n email: z.email(),\n})\n\nexport const ResetPasswordInputSchema = z\n .object({\n token: z.string().min(1).meta({ description: 'One-time reset token from email link' }),\n newPassword: z.string().min(8, { error: 'Password must be at least 8 characters' }),\n confirmPassword: z.string().min(1),\n })\n .refine((v) => v.newPassword === v.confirmPassword, {\n error: 'Passwords do not match',\n path: ['confirmPassword'],\n })\n\n// ── Branch switch ───────────────────────────────────────────────────────────────\n\nexport const SwitchBranchInputSchema = z.object({\n branchId: CuidSchema.meta({ description: 'Branch to switch the active session to' }),\n})\n\n// ── Inferred types ──────────────────────────────────────────────────────────────\n\nexport type LoginInput = z.infer<typeof LoginInputSchema>\nexport type LoginOutput = z.infer<typeof LoginOutputSchema>\nexport type SessionUserOutput = z.infer<typeof SessionUserOutputSchema>\nexport type RefreshTokenInput = z.infer<typeof RefreshTokenInputSchema>\nexport type RefreshTokenOutput = z.infer<typeof RefreshTokenOutputSchema>\nexport type ChangePasswordInput = z.infer<typeof ChangePasswordInputSchema>\nexport type SwitchBranchInput = z.infer<typeof SwitchBranchInputSchema>"],"mappings":";AAWA,YAAY,OAAO;AAIZ,IAAM,aACR,SAAO,EACP,MAAM,uBAAuB,0BAA0B,EACvD,KAAK,EAAE,aAAa,wDAAmD,CAAC;AAItE,IAAM,aACR,SAAO,EACP,KAAK,EAAE,aAAa,mBAAmB,CAAC;AAI7C,IAAM,cAAgB,MAAI,SAAS;AAE5B,IAAM,mBAAqB,SAAO;AAAA,EACrC,WAAW,YAAY,KAAK,EAAE,aAAa,+BAA+B,CAAC;AAAA,EAC3E,WAAW,YAAY,KAAK,EAAE,aAAa,kCAAkC,CAAC;AAClF,CAAC;AAIM,IAAM,mBAAqB,SAAO;AAAA,EACrC,WAAW,YAAY,SAAS,EAAE,KAAK;AAAA,IACnC,aAAa;AAAA,EACjB,CAAC;AACL,CAAC;AAIM,IAAM,wBAA0B,SAAO;AAAA,EAC1C,QAAQ,WAAW,SAAS,EAAE,KAAK;AAAA,IAC/B,aAAa;AAAA,EACjB,CAAC;AAAA,EACD,OACK,MAAI,EACJ,IAAI,CAAC,EACL,IAAI,GAAG,EACP,QAAQ,EAAE,EACV,KAAK,EAAE,aAAa,qDAAgD,CAAC;AAC9E,CAAC;AAEM,SAAS,sBAA8C,YAAe;AACzE,SAAS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AAO;AAAA,EAC5C,UAAU,WAAW,KAAK,EAAE,aAAa,yCAAyC,CAAC;AACvF,CAAC;","names":["z"]}
@@ -1,48 +0,0 @@
1
- import {
2
- ChangePasswordInputSchema,
3
- LoginInputSchema,
4
- LoginOutputSchema,
5
- LogoutInputSchema,
6
- RefreshTokenInputSchema,
7
- RefreshTokenOutputSchema,
8
- RequestPasswordResetInputSchema,
9
- ResetPasswordInputSchema,
10
- SessionUserOutputSchema,
11
- SwitchBranchInputSchema
12
- } from "./chunk-AEZO7MJD.js";
13
-
14
- // src/contracts/auth.ts
15
- import { oc } from "@orpc/contract";
16
- import * as z from "zod";
17
- var EmptyOutputSchema = z.object({}).meta({ description: "Empty success response" });
18
- var loginContract = oc.route({ method: "POST", path: "/auth/login" }).input(LoginInputSchema).output(LoginOutputSchema);
19
- var refreshTokenContract = oc.route({ method: "POST", path: "/auth/refresh" }).input(RefreshTokenInputSchema).output(RefreshTokenOutputSchema);
20
- var logoutContract = oc.route({ method: "POST", path: "/auth/logout" }).input(LogoutInputSchema).output(EmptyOutputSchema);
21
- var getMeContract = oc.route({ method: "GET", path: "/auth/me" }).output(SessionUserOutputSchema);
22
- var changePasswordContract = oc.route({ method: "POST", path: "/auth/change-password" }).input(ChangePasswordInputSchema).output(EmptyOutputSchema);
23
- var requestPasswordResetContract = oc.route({ method: "POST", path: "/auth/request-password-reset" }).input(RequestPasswordResetInputSchema).output(EmptyOutputSchema);
24
- var resetPasswordContract = oc.route({ method: "POST", path: "/auth/reset-password" }).input(ResetPasswordInputSchema).output(EmptyOutputSchema);
25
- var switchBranchContract = oc.route({ method: "POST", path: "/auth/switch-branch" }).input(SwitchBranchInputSchema).output(SessionUserOutputSchema);
26
- var authContract = {
27
- login: loginContract,
28
- refreshToken: refreshTokenContract,
29
- logout: logoutContract,
30
- me: getMeContract,
31
- changePassword: changePasswordContract,
32
- requestPasswordReset: requestPasswordResetContract,
33
- resetPassword: resetPasswordContract,
34
- switchBranch: switchBranchContract
35
- };
36
-
37
- export {
38
- loginContract,
39
- refreshTokenContract,
40
- logoutContract,
41
- getMeContract,
42
- changePasswordContract,
43
- requestPasswordResetContract,
44
- resetPasswordContract,
45
- switchBranchContract,
46
- authContract
47
- };
48
- //# sourceMappingURL=chunk-IR6JUP6L.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/contracts/auth.ts"],"sourcesContent":["/**\n * Brite Future Schools — bfs-contracts\n * Auth oRPC contract.\n *\n * Defines the API surface for authentication. The bfs-api module\n * imports this and passes it to `implement()` — no logic lives here.\n *\n * HTTP method + path pairs follow REST conventions and feed into the\n * OpenAPI spec that oRPC generates automatically.\n *\n * Phase History:\n * Phase 0.1 (2026-06-05): Initial creation\n *\n * @module src/contracts/auth\n * @since Phase 0.1\n */\n\nimport { oc } from '@orpc/contract'\nimport * as z from 'zod'\nimport {\n ChangePasswordInputSchema,\n LoginInputSchema,\n LoginOutputSchema,\n LogoutInputSchema,\n RefreshTokenInputSchema,\n RefreshTokenOutputSchema,\n RequestPasswordResetInputSchema,\n ResetPasswordInputSchema,\n SessionUserOutputSchema,\n SwitchBranchInputSchema,\n} from '../schemas/auth.js'\n\n/** Reusable empty-success output — used by mutations that return nothing */\nconst EmptyOutputSchema = z.object({}).meta({ description: 'Empty success response' })\n\n// ── Individual procedure contracts ────────────────────────────────────────────\n\n/** Exchange email + password for access/refresh token pair */\nexport const loginContract = oc\n .route({ method: 'POST', path: '/auth/login' })\n .input(LoginInputSchema)\n .output(LoginOutputSchema)\n\n/** Exchange a refresh token for a new access token */\nexport const refreshTokenContract = oc\n .route({ method: 'POST', path: '/auth/refresh' })\n .input(RefreshTokenInputSchema)\n .output(RefreshTokenOutputSchema)\n\n/** Revoke the current refresh token and end the session */\nexport const logoutContract = oc\n .route({ method: 'POST', path: '/auth/logout' })\n .input(LogoutInputSchema)\n .output(EmptyOutputSchema)\n\n/** Return the session user object for the current access token */\nexport const getMeContract = oc\n .route({ method: 'GET', path: '/auth/me' })\n .output(SessionUserOutputSchema)\n\n/** Change password (authenticated, requires current password) */\nexport const changePasswordContract = oc\n .route({ method: 'POST', path: '/auth/change-password' })\n .input(ChangePasswordInputSchema)\n .output(EmptyOutputSchema)\n\n/** Request a password-reset email */\nexport const requestPasswordResetContract = oc\n .route({ method: 'POST', path: '/auth/request-password-reset' })\n .input(RequestPasswordResetInputSchema)\n .output(EmptyOutputSchema)\n\n/** Complete a password reset using the emailed one-time token */\nexport const resetPasswordContract = oc\n .route({ method: 'POST', path: '/auth/reset-password' })\n .input(ResetPasswordInputSchema)\n .output(EmptyOutputSchema)\n\n/** Switch the active branch within an existing session */\nexport const switchBranchContract = oc\n .route({ method: 'POST', path: '/auth/switch-branch' })\n .input(SwitchBranchInputSchema)\n .output(SessionUserOutputSchema)\n\n// ── Auth contract router ──────────────────────────────────────────────────────\n\nexport const authContract = {\n login: loginContract,\n refreshToken: refreshTokenContract,\n logout: logoutContract,\n me: getMeContract,\n changePassword: changePasswordContract,\n requestPasswordReset: requestPasswordResetContract,\n resetPassword: resetPasswordContract,\n switchBranch: switchBranchContract,\n}\n"],"mappings":";;;;;;;;;;;;;;AAiBA,SAAS,UAAU;AACnB,YAAY,OAAO;AAenB,IAAM,oBAAsB,SAAO,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,yBAAyB,CAAC;AAK9E,IAAM,gBAAgB,GAC1B,MAAM,EAAE,QAAQ,QAAQ,MAAM,cAAc,CAAC,EAC7C,MAAM,gBAAgB,EACtB,OAAO,iBAAiB;AAGpB,IAAM,uBAAuB,GACjC,MAAM,EAAE,QAAQ,QAAQ,MAAM,gBAAgB,CAAC,EAC/C,MAAM,uBAAuB,EAC7B,OAAO,wBAAwB;AAG3B,IAAM,iBAAiB,GAC3B,MAAM,EAAE,QAAQ,QAAQ,MAAM,eAAe,CAAC,EAC9C,MAAM,iBAAiB,EACvB,OAAO,iBAAiB;AAGpB,IAAM,gBAAgB,GAC1B,MAAM,EAAE,QAAQ,OAAO,MAAM,WAAW,CAAC,EACzC,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