@brite-future-schools-contracts/contracts 2.0.38 → 2.0.42
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/{chunk-SJF5H2NM.js → chunk-C4UISE2G.js} +25 -4
- package/dist/chunk-C4UISE2G.js.map +1 -0
- package/dist/{chunk-2Q7S637J.js → chunk-FFST2NEY.js} +35 -1
- package/dist/chunk-FFST2NEY.js.map +1 -0
- package/dist/contracts/index.cjs +51 -3
- package/dist/contracts/index.cjs.map +1 -1
- package/dist/contracts/index.d.cts +76 -1
- package/dist/contracts/index.d.ts +76 -1
- package/dist/contracts/index.js +14 -4
- package/dist/index.cjs +63 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.cjs +40 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +35 -1
- package/dist/schemas/index.d.ts +35 -1
- package/dist/schemas/index.js +13 -1
- package/package.json +1 -1
- package/dist/chunk-2Q7S637J.js.map +0 -1
- package/dist/chunk-SJF5H2NM.js.map +0 -1
|
@@ -102,6 +102,46 @@ declare const switchBranchContract: _orpc_contract.ContractProcedureBuilderWithI
|
|
|
102
102
|
isActive: z.ZodBoolean;
|
|
103
103
|
mustChangePassword: z.ZodBoolean;
|
|
104
104
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
105
|
+
/** Confirm the current password before a sensitive change (e.g. email change) */
|
|
106
|
+
declare const verifyPasswordContract: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
107
|
+
password: z.ZodString;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
valid: z.ZodBoolean;
|
|
110
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
111
|
+
/** Return the full self-service profile for the current user */
|
|
112
|
+
declare const getProfileContract: _orpc_contract.ContractProcedureBuilderWithOutput<_orpc_contract.Schema<unknown, unknown>, z.ZodObject<{
|
|
113
|
+
id: z.ZodString;
|
|
114
|
+
email: z.ZodEmail;
|
|
115
|
+
firstName: z.ZodString;
|
|
116
|
+
middleName: z.ZodNullable<z.ZodString>;
|
|
117
|
+
lastName: z.ZodString;
|
|
118
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
119
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
120
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
121
|
+
/** Update the current user's own profile fields (name, phone) */
|
|
122
|
+
declare const updateProfileContract: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
123
|
+
firstName: z.ZodString;
|
|
124
|
+
middleName: z.ZodOptional<z.ZodString>;
|
|
125
|
+
lastName: z.ZodString;
|
|
126
|
+
phone: z.ZodString;
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
email: z.ZodEmail;
|
|
130
|
+
firstName: z.ZodString;
|
|
131
|
+
middleName: z.ZodNullable<z.ZodString>;
|
|
132
|
+
lastName: z.ZodString;
|
|
133
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
134
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
135
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
136
|
+
/** Request an email change — requires current password, sends a verification link to the new address */
|
|
137
|
+
declare const requestEmailChangeContract: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
138
|
+
newEmail: z.ZodEmail;
|
|
139
|
+
password: z.ZodString;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
141
|
+
/** Confirm an email change using the token from the verification email */
|
|
142
|
+
declare const confirmEmailChangeContract: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
143
|
+
token: z.ZodString;
|
|
144
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
105
145
|
declare const authContract: {
|
|
106
146
|
login: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
107
147
|
email: z.ZodEmail;
|
|
@@ -196,6 +236,41 @@ declare const authContract: {
|
|
|
196
236
|
isActive: z.ZodBoolean;
|
|
197
237
|
mustChangePassword: z.ZodBoolean;
|
|
198
238
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
239
|
+
verifyPassword: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
240
|
+
password: z.ZodString;
|
|
241
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
242
|
+
valid: z.ZodBoolean;
|
|
243
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
244
|
+
profile: _orpc_contract.ContractProcedureBuilderWithOutput<_orpc_contract.Schema<unknown, unknown>, z.ZodObject<{
|
|
245
|
+
id: z.ZodString;
|
|
246
|
+
email: z.ZodEmail;
|
|
247
|
+
firstName: z.ZodString;
|
|
248
|
+
middleName: z.ZodNullable<z.ZodString>;
|
|
249
|
+
lastName: z.ZodString;
|
|
250
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
251
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
252
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
253
|
+
updateProfile: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
254
|
+
firstName: z.ZodString;
|
|
255
|
+
middleName: z.ZodOptional<z.ZodString>;
|
|
256
|
+
lastName: z.ZodString;
|
|
257
|
+
phone: z.ZodString;
|
|
258
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
email: z.ZodEmail;
|
|
261
|
+
firstName: z.ZodString;
|
|
262
|
+
middleName: z.ZodNullable<z.ZodString>;
|
|
263
|
+
lastName: z.ZodString;
|
|
264
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
265
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
266
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
267
|
+
requestEmailChange: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
268
|
+
newEmail: z.ZodEmail;
|
|
269
|
+
password: z.ZodString;
|
|
270
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
271
|
+
confirmEmailChange: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
272
|
+
token: z.ZodString;
|
|
273
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
199
274
|
};
|
|
200
275
|
|
|
201
276
|
declare const createStaffContract: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -3374,4 +3449,4 @@ declare const blocksContract: {
|
|
|
3374
3449
|
}, z.core.$strip>, z.ZodUnknown, Record<never, never>, Record<never, never>>;
|
|
3375
3450
|
};
|
|
3376
3451
|
|
|
3377
|
-
export { acknowledgeContract, acknowledgeDiaryEntryContract, approveContract, approveLiftContract, attendanceContract, authContract, bankingContract, blocksContract, bulkUploadStudentsContract, calendarContract, calendarListTermsContract, cancelContract, changePasswordContract, createBankAccountContract, createCategoryContract, createDepartmentContract, createEntryContract, createGradeContract, createNotificationContract, createStaffContract, createStudentContract, createTermContract, createYearContract, deactivateContract, diaryContract, getByClassContract, getByIdContract, getByStudentContract, getEntryContract, getMeContract, getResponseSummaryContract, getStaffByIdContract, getStudentByIdContract, getTemplateContract, gradesContract, hrContract, linkGuardianContract, listAccountsContract, listAcknowledgementsContract, listActiveBlocksContract, listBanksContract, listCategoriesContract, listClassesContract, listDeliveriesContract, listDepartmentsContract, listEntriesContract, listForGuardianContract, listGradesContract, listResponsesContract, listStaffContract, listStudentsContract, listTemplatesContract, listTermsContract, listYearsContract, loginContract, logoutContract, markAttendanceContract, markReadContract, markUnreadContract, notificationsContract, refreshTokenContract, rejectContract, requestLiftContract, requestPasswordResetContract, resetPasswordContract, resolveBlockAltContract, resolveBlockContract, respondContract, respondToBlockContract, respondToDiaryEntryContract, setCurrentTermContract, setCurrentYearContract, setDefaultContract, studentsContract, submitContract, switchBranchContract, updateBankAccountContract, updateCategoryContract, updateStaffStatusContract };
|
|
3452
|
+
export { acknowledgeContract, acknowledgeDiaryEntryContract, approveContract, approveLiftContract, attendanceContract, authContract, bankingContract, blocksContract, bulkUploadStudentsContract, calendarContract, calendarListTermsContract, cancelContract, changePasswordContract, confirmEmailChangeContract, createBankAccountContract, createCategoryContract, createDepartmentContract, createEntryContract, createGradeContract, createNotificationContract, createStaffContract, createStudentContract, createTermContract, createYearContract, deactivateContract, diaryContract, getByClassContract, getByIdContract, getByStudentContract, getEntryContract, getMeContract, getProfileContract, getResponseSummaryContract, getStaffByIdContract, getStudentByIdContract, getTemplateContract, gradesContract, hrContract, linkGuardianContract, listAccountsContract, listAcknowledgementsContract, listActiveBlocksContract, listBanksContract, listCategoriesContract, listClassesContract, listDeliveriesContract, listDepartmentsContract, listEntriesContract, listForGuardianContract, listGradesContract, listResponsesContract, listStaffContract, listStudentsContract, listTemplatesContract, listTermsContract, listYearsContract, loginContract, logoutContract, markAttendanceContract, markReadContract, markUnreadContract, notificationsContract, refreshTokenContract, rejectContract, requestEmailChangeContract, requestLiftContract, requestPasswordResetContract, resetPasswordContract, resolveBlockAltContract, resolveBlockContract, respondContract, respondToBlockContract, respondToDiaryEntryContract, setCurrentTermContract, setCurrentYearContract, setDefaultContract, studentsContract, submitContract, switchBranchContract, updateBankAccountContract, updateCategoryContract, updateProfileContract, updateStaffStatusContract, verifyPasswordContract };
|
|
@@ -102,6 +102,46 @@ declare const switchBranchContract: _orpc_contract.ContractProcedureBuilderWithI
|
|
|
102
102
|
isActive: z.ZodBoolean;
|
|
103
103
|
mustChangePassword: z.ZodBoolean;
|
|
104
104
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
105
|
+
/** Confirm the current password before a sensitive change (e.g. email change) */
|
|
106
|
+
declare const verifyPasswordContract: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
107
|
+
password: z.ZodString;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
valid: z.ZodBoolean;
|
|
110
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
111
|
+
/** Return the full self-service profile for the current user */
|
|
112
|
+
declare const getProfileContract: _orpc_contract.ContractProcedureBuilderWithOutput<_orpc_contract.Schema<unknown, unknown>, z.ZodObject<{
|
|
113
|
+
id: z.ZodString;
|
|
114
|
+
email: z.ZodEmail;
|
|
115
|
+
firstName: z.ZodString;
|
|
116
|
+
middleName: z.ZodNullable<z.ZodString>;
|
|
117
|
+
lastName: z.ZodString;
|
|
118
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
119
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
120
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
121
|
+
/** Update the current user's own profile fields (name, phone) */
|
|
122
|
+
declare const updateProfileContract: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
123
|
+
firstName: z.ZodString;
|
|
124
|
+
middleName: z.ZodOptional<z.ZodString>;
|
|
125
|
+
lastName: z.ZodString;
|
|
126
|
+
phone: z.ZodString;
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
email: z.ZodEmail;
|
|
130
|
+
firstName: z.ZodString;
|
|
131
|
+
middleName: z.ZodNullable<z.ZodString>;
|
|
132
|
+
lastName: z.ZodString;
|
|
133
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
134
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
135
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
136
|
+
/** Request an email change — requires current password, sends a verification link to the new address */
|
|
137
|
+
declare const requestEmailChangeContract: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
138
|
+
newEmail: z.ZodEmail;
|
|
139
|
+
password: z.ZodString;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
141
|
+
/** Confirm an email change using the token from the verification email */
|
|
142
|
+
declare const confirmEmailChangeContract: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
143
|
+
token: z.ZodString;
|
|
144
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
105
145
|
declare const authContract: {
|
|
106
146
|
login: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
107
147
|
email: z.ZodEmail;
|
|
@@ -196,6 +236,41 @@ declare const authContract: {
|
|
|
196
236
|
isActive: z.ZodBoolean;
|
|
197
237
|
mustChangePassword: z.ZodBoolean;
|
|
198
238
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
239
|
+
verifyPassword: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
240
|
+
password: z.ZodString;
|
|
241
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
242
|
+
valid: z.ZodBoolean;
|
|
243
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
244
|
+
profile: _orpc_contract.ContractProcedureBuilderWithOutput<_orpc_contract.Schema<unknown, unknown>, z.ZodObject<{
|
|
245
|
+
id: z.ZodString;
|
|
246
|
+
email: z.ZodEmail;
|
|
247
|
+
firstName: z.ZodString;
|
|
248
|
+
middleName: z.ZodNullable<z.ZodString>;
|
|
249
|
+
lastName: z.ZodString;
|
|
250
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
251
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
252
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
253
|
+
updateProfile: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
254
|
+
firstName: z.ZodString;
|
|
255
|
+
middleName: z.ZodOptional<z.ZodString>;
|
|
256
|
+
lastName: z.ZodString;
|
|
257
|
+
phone: z.ZodString;
|
|
258
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
email: z.ZodEmail;
|
|
261
|
+
firstName: z.ZodString;
|
|
262
|
+
middleName: z.ZodNullable<z.ZodString>;
|
|
263
|
+
lastName: z.ZodString;
|
|
264
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
265
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
266
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
267
|
+
requestEmailChange: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
268
|
+
newEmail: z.ZodEmail;
|
|
269
|
+
password: z.ZodString;
|
|
270
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
271
|
+
confirmEmailChange: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
272
|
+
token: z.ZodString;
|
|
273
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
199
274
|
};
|
|
200
275
|
|
|
201
276
|
declare const createStaffContract: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -3374,4 +3449,4 @@ declare const blocksContract: {
|
|
|
3374
3449
|
}, z.core.$strip>, z.ZodUnknown, Record<never, never>, Record<never, never>>;
|
|
3375
3450
|
};
|
|
3376
3451
|
|
|
3377
|
-
export { acknowledgeContract, acknowledgeDiaryEntryContract, approveContract, approveLiftContract, attendanceContract, authContract, bankingContract, blocksContract, bulkUploadStudentsContract, calendarContract, calendarListTermsContract, cancelContract, changePasswordContract, createBankAccountContract, createCategoryContract, createDepartmentContract, createEntryContract, createGradeContract, createNotificationContract, createStaffContract, createStudentContract, createTermContract, createYearContract, deactivateContract, diaryContract, getByClassContract, getByIdContract, getByStudentContract, getEntryContract, getMeContract, getResponseSummaryContract, getStaffByIdContract, getStudentByIdContract, getTemplateContract, gradesContract, hrContract, linkGuardianContract, listAccountsContract, listAcknowledgementsContract, listActiveBlocksContract, listBanksContract, listCategoriesContract, listClassesContract, listDeliveriesContract, listDepartmentsContract, listEntriesContract, listForGuardianContract, listGradesContract, listResponsesContract, listStaffContract, listStudentsContract, listTemplatesContract, listTermsContract, listYearsContract, loginContract, logoutContract, markAttendanceContract, markReadContract, markUnreadContract, notificationsContract, refreshTokenContract, rejectContract, requestLiftContract, requestPasswordResetContract, resetPasswordContract, resolveBlockAltContract, resolveBlockContract, respondContract, respondToBlockContract, respondToDiaryEntryContract, setCurrentTermContract, setCurrentYearContract, setDefaultContract, studentsContract, submitContract, switchBranchContract, updateBankAccountContract, updateCategoryContract, updateStaffStatusContract };
|
|
3452
|
+
export { acknowledgeContract, acknowledgeDiaryEntryContract, approveContract, approveLiftContract, attendanceContract, authContract, bankingContract, blocksContract, bulkUploadStudentsContract, calendarContract, calendarListTermsContract, cancelContract, changePasswordContract, confirmEmailChangeContract, createBankAccountContract, createCategoryContract, createDepartmentContract, createEntryContract, createGradeContract, createNotificationContract, createStaffContract, createStudentContract, createTermContract, createYearContract, deactivateContract, diaryContract, getByClassContract, getByIdContract, getByStudentContract, getEntryContract, getMeContract, getProfileContract, getResponseSummaryContract, getStaffByIdContract, getStudentByIdContract, getTemplateContract, gradesContract, hrContract, linkGuardianContract, listAccountsContract, listAcknowledgementsContract, listActiveBlocksContract, listBanksContract, listCategoriesContract, listClassesContract, listDeliveriesContract, listDepartmentsContract, listEntriesContract, listForGuardianContract, listGradesContract, listResponsesContract, listStaffContract, listStudentsContract, listTemplatesContract, listTermsContract, listYearsContract, loginContract, logoutContract, markAttendanceContract, markReadContract, markUnreadContract, notificationsContract, refreshTokenContract, rejectContract, requestEmailChangeContract, requestLiftContract, requestPasswordResetContract, resetPasswordContract, resolveBlockAltContract, resolveBlockContract, respondContract, respondToBlockContract, respondToDiaryEntryContract, setCurrentTermContract, setCurrentYearContract, setDefaultContract, studentsContract, submitContract, switchBranchContract, updateBankAccountContract, updateCategoryContract, updateProfileContract, updateStaffStatusContract, verifyPasswordContract };
|
package/dist/contracts/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
calendarListTermsContract,
|
|
13
13
|
cancelContract,
|
|
14
14
|
changePasswordContract,
|
|
15
|
+
confirmEmailChangeContract,
|
|
15
16
|
createBankAccountContract,
|
|
16
17
|
createCategoryContract,
|
|
17
18
|
createDepartmentContract,
|
|
@@ -29,6 +30,7 @@ import {
|
|
|
29
30
|
getByStudentContract,
|
|
30
31
|
getEntryContract,
|
|
31
32
|
getMeContract,
|
|
33
|
+
getProfileContract,
|
|
32
34
|
getResponseSummaryContract,
|
|
33
35
|
getStaffByIdContract,
|
|
34
36
|
getStudentByIdContract,
|
|
@@ -61,6 +63,7 @@ import {
|
|
|
61
63
|
notificationsContract,
|
|
62
64
|
refreshTokenContract,
|
|
63
65
|
rejectContract,
|
|
66
|
+
requestEmailChangeContract,
|
|
64
67
|
requestLiftContract,
|
|
65
68
|
requestPasswordResetContract,
|
|
66
69
|
resetPasswordContract,
|
|
@@ -77,9 +80,11 @@ import {
|
|
|
77
80
|
switchBranchContract,
|
|
78
81
|
updateBankAccountContract,
|
|
79
82
|
updateCategoryContract,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
updateProfileContract,
|
|
84
|
+
updateStaffStatusContract,
|
|
85
|
+
verifyPasswordContract
|
|
86
|
+
} from "../chunk-C4UISE2G.js";
|
|
87
|
+
import "../chunk-FFST2NEY.js";
|
|
83
88
|
export {
|
|
84
89
|
acknowledgeContract,
|
|
85
90
|
acknowledgeDiaryEntryContract,
|
|
@@ -94,6 +99,7 @@ export {
|
|
|
94
99
|
calendarListTermsContract,
|
|
95
100
|
cancelContract,
|
|
96
101
|
changePasswordContract,
|
|
102
|
+
confirmEmailChangeContract,
|
|
97
103
|
createBankAccountContract,
|
|
98
104
|
createCategoryContract,
|
|
99
105
|
createDepartmentContract,
|
|
@@ -111,6 +117,7 @@ export {
|
|
|
111
117
|
getByStudentContract,
|
|
112
118
|
getEntryContract,
|
|
113
119
|
getMeContract,
|
|
120
|
+
getProfileContract,
|
|
114
121
|
getResponseSummaryContract,
|
|
115
122
|
getStaffByIdContract,
|
|
116
123
|
getStudentByIdContract,
|
|
@@ -143,6 +150,7 @@ export {
|
|
|
143
150
|
notificationsContract,
|
|
144
151
|
refreshTokenContract,
|
|
145
152
|
rejectContract,
|
|
153
|
+
requestEmailChangeContract,
|
|
146
154
|
requestLiftContract,
|
|
147
155
|
requestPasswordResetContract,
|
|
148
156
|
resetPasswordContract,
|
|
@@ -159,6 +167,8 @@ export {
|
|
|
159
167
|
switchBranchContract,
|
|
160
168
|
updateBankAccountContract,
|
|
161
169
|
updateCategoryContract,
|
|
162
|
-
|
|
170
|
+
updateProfileContract,
|
|
171
|
+
updateStaffStatusContract,
|
|
172
|
+
verifyPasswordContract
|
|
163
173
|
};
|
|
164
174
|
//# sourceMappingURL=index.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -46,6 +46,7 @@ __export(src_exports, {
|
|
|
46
46
|
ChangePasswordInputSchema: () => ChangePasswordInputSchema,
|
|
47
47
|
ClassAttendanceRowSchema: () => ClassAttendanceRowSchema,
|
|
48
48
|
ClassSummarySchema: () => ClassSummarySchema,
|
|
49
|
+
ConfirmEmailChangeInputSchema: () => ConfirmEmailChangeInputSchema,
|
|
49
50
|
CreateBankAccountInputSchema: () => CreateBankAccountInputSchema,
|
|
50
51
|
CreateDepartmentInputSchema: () => CreateDepartmentInputSchema,
|
|
51
52
|
CreateDiaryCategoryInputSchema: () => CreateDiaryCategoryInputSchema,
|
|
@@ -103,9 +104,11 @@ __export(src_exports, {
|
|
|
103
104
|
PaginationInputSchema: () => PaginationInputSchema,
|
|
104
105
|
PortalBlockSchema: () => PortalBlockSchema,
|
|
105
106
|
PortalBlockTypeSchema: () => PortalBlockTypeSchema,
|
|
107
|
+
ProfileOutputSchema: () => ProfileOutputSchema,
|
|
106
108
|
RefreshTokenInputSchema: () => RefreshTokenInputSchema,
|
|
107
109
|
RefreshTokenOutputSchema: () => RefreshTokenOutputSchema,
|
|
108
110
|
RejectNotificationInputSchema: () => RejectNotificationInputSchema,
|
|
111
|
+
RequestEmailChangeInputSchema: () => RequestEmailChangeInputSchema,
|
|
109
112
|
RequestPasswordResetInputSchema: () => RequestPasswordResetInputSchema,
|
|
110
113
|
ResetPasswordInputSchema: () => ResetPasswordInputSchema,
|
|
111
114
|
RespondToBlockInputSchema: () => RespondToBlockInputSchema,
|
|
@@ -130,7 +133,10 @@ __export(src_exports, {
|
|
|
130
133
|
TimestampsSchema: () => TimestampsSchema,
|
|
131
134
|
UpdateBankAccountInputSchema: () => UpdateBankAccountInputSchema,
|
|
132
135
|
UpdateDiaryCategoryInputSchema: () => UpdateDiaryCategoryInputSchema,
|
|
136
|
+
UpdateProfileInputSchema: () => UpdateProfileInputSchema,
|
|
133
137
|
UuidSchema: () => UuidSchema,
|
|
138
|
+
VerifyPasswordInputSchema: () => VerifyPasswordInputSchema,
|
|
139
|
+
VerifyPasswordOutputSchema: () => VerifyPasswordOutputSchema,
|
|
134
140
|
acknowledgeContract: () => acknowledgeContract,
|
|
135
141
|
acknowledgeDiaryEntryContract: () => acknowledgeDiaryEntryContract,
|
|
136
142
|
approveContract: () => approveContract,
|
|
@@ -181,6 +187,7 @@ __export(src_exports, {
|
|
|
181
187
|
canViewTransport: () => canViewTransport,
|
|
182
188
|
cancelContract: () => cancelContract,
|
|
183
189
|
changePasswordContract: () => changePasswordContract,
|
|
190
|
+
confirmEmailChangeContract: () => confirmEmailChangeContract,
|
|
184
191
|
createBankAccountContract: () => createBankAccountContract,
|
|
185
192
|
createCategoryContract: () => createCategoryContract,
|
|
186
193
|
createDepartmentContract: () => createDepartmentContract,
|
|
@@ -198,6 +205,7 @@ __export(src_exports, {
|
|
|
198
205
|
getByStudentContract: () => getByStudentContract,
|
|
199
206
|
getEntryContract: () => getEntryContract,
|
|
200
207
|
getMeContract: () => getMeContract,
|
|
208
|
+
getProfileContract: () => getProfileContract,
|
|
201
209
|
getResponseSummaryContract: () => getResponseSummaryContract,
|
|
202
210
|
getStaffByIdContract: () => getStaffByIdContract,
|
|
203
211
|
getStudentByIdContract: () => getStudentByIdContract,
|
|
@@ -261,6 +269,7 @@ __export(src_exports, {
|
|
|
261
269
|
paginatedOutputSchema: () => paginatedOutputSchema,
|
|
262
270
|
refreshTokenContract: () => refreshTokenContract,
|
|
263
271
|
rejectContract: () => rejectContract,
|
|
272
|
+
requestEmailChangeContract: () => requestEmailChangeContract,
|
|
264
273
|
requestLiftContract: () => requestLiftContract,
|
|
265
274
|
requestPasswordResetContract: () => requestPasswordResetContract,
|
|
266
275
|
resetPasswordContract: () => resetPasswordContract,
|
|
@@ -277,7 +286,9 @@ __export(src_exports, {
|
|
|
277
286
|
switchBranchContract: () => switchBranchContract,
|
|
278
287
|
updateBankAccountContract: () => updateBankAccountContract,
|
|
279
288
|
updateCategoryContract: () => updateCategoryContract,
|
|
280
|
-
|
|
289
|
+
updateProfileContract: () => updateProfileContract,
|
|
290
|
+
updateStaffStatusContract: () => updateStaffStatusContract,
|
|
291
|
+
verifyPasswordContract: () => verifyPasswordContract
|
|
281
292
|
});
|
|
282
293
|
module.exports = __toCommonJS(src_exports);
|
|
283
294
|
|
|
@@ -385,6 +396,34 @@ var ResetPasswordInputSchema = z2.object({
|
|
|
385
396
|
var SwitchBranchInputSchema = z2.object({
|
|
386
397
|
branchId: z2.string().uuid().meta({ description: "Branch to switch the active session to" })
|
|
387
398
|
});
|
|
399
|
+
var VerifyPasswordInputSchema = z2.object({
|
|
400
|
+
password: z2.string().min(1).meta({ description: "User's current password, for step-up confirmation" })
|
|
401
|
+
});
|
|
402
|
+
var VerifyPasswordOutputSchema = z2.object({
|
|
403
|
+
valid: z2.boolean()
|
|
404
|
+
});
|
|
405
|
+
var ProfileOutputSchema = z2.object({
|
|
406
|
+
id: z2.string().uuid(),
|
|
407
|
+
email: z2.email(),
|
|
408
|
+
firstName: z2.string(),
|
|
409
|
+
middleName: z2.string().nullable(),
|
|
410
|
+
lastName: z2.string(),
|
|
411
|
+
phone: z2.string().nullable(),
|
|
412
|
+
avatarUrl: z2.string().nullable()
|
|
413
|
+
});
|
|
414
|
+
var UpdateProfileInputSchema = z2.object({
|
|
415
|
+
firstName: z2.string().min(1),
|
|
416
|
+
middleName: z2.string().optional(),
|
|
417
|
+
lastName: z2.string().min(1),
|
|
418
|
+
phone: z2.string().regex(/^\+[1-9]\d{1,14}$/, { error: "Phone must be in E.164 format, e.g. +254712345678" })
|
|
419
|
+
});
|
|
420
|
+
var RequestEmailChangeInputSchema = z2.object({
|
|
421
|
+
newEmail: z2.email().meta({ description: "The email address to change to" }),
|
|
422
|
+
password: z2.string().min(1).meta({ description: "Current password \u2014 required to authorize the change" })
|
|
423
|
+
});
|
|
424
|
+
var ConfirmEmailChangeInputSchema = z2.object({
|
|
425
|
+
token: z2.string().min(1).meta({ description: "One-time token from the confirmation email link" })
|
|
426
|
+
});
|
|
388
427
|
|
|
389
428
|
// src/schemas/hr.ts
|
|
390
429
|
var z3 = __toESM(require("zod"), 1);
|
|
@@ -1136,6 +1175,11 @@ var changePasswordContract = import_contract.oc.route({ method: "POST", path: "/
|
|
|
1136
1175
|
var requestPasswordResetContract = import_contract.oc.route({ method: "POST", path: "/auth/request-password-reset" }).input(RequestPasswordResetInputSchema).output(EmptyOutputSchema);
|
|
1137
1176
|
var resetPasswordContract = import_contract.oc.route({ method: "POST", path: "/auth/reset-password" }).input(ResetPasswordInputSchema).output(EmptyOutputSchema);
|
|
1138
1177
|
var switchBranchContract = import_contract.oc.route({ method: "POST", path: "/auth/switch-branch" }).input(SwitchBranchInputSchema).output(SessionUserOutputSchema);
|
|
1178
|
+
var verifyPasswordContract = import_contract.oc.route({ method: "POST", path: "/auth/verify-password" }).input(VerifyPasswordInputSchema).output(VerifyPasswordOutputSchema);
|
|
1179
|
+
var getProfileContract = import_contract.oc.route({ method: "GET", path: "/auth/profile" }).output(ProfileOutputSchema);
|
|
1180
|
+
var updateProfileContract = import_contract.oc.route({ method: "PATCH", path: "/auth/profile" }).input(UpdateProfileInputSchema).output(ProfileOutputSchema);
|
|
1181
|
+
var requestEmailChangeContract = import_contract.oc.route({ method: "POST", path: "/auth/request-email-change" }).input(RequestEmailChangeInputSchema).output(EmptyOutputSchema);
|
|
1182
|
+
var confirmEmailChangeContract = import_contract.oc.route({ method: "POST", path: "/auth/confirm-email-change" }).input(ConfirmEmailChangeInputSchema).output(EmptyOutputSchema);
|
|
1139
1183
|
var authContract = {
|
|
1140
1184
|
login: loginContract,
|
|
1141
1185
|
refreshToken: refreshTokenContract,
|
|
@@ -1144,7 +1188,12 @@ var authContract = {
|
|
|
1144
1188
|
changePassword: changePasswordContract,
|
|
1145
1189
|
requestPasswordReset: requestPasswordResetContract,
|
|
1146
1190
|
resetPassword: resetPasswordContract,
|
|
1147
|
-
switchBranch: switchBranchContract
|
|
1191
|
+
switchBranch: switchBranchContract,
|
|
1192
|
+
verifyPassword: verifyPasswordContract,
|
|
1193
|
+
profile: getProfileContract,
|
|
1194
|
+
updateProfile: updateProfileContract,
|
|
1195
|
+
requestEmailChange: requestEmailChangeContract,
|
|
1196
|
+
confirmEmailChange: confirmEmailChangeContract
|
|
1148
1197
|
};
|
|
1149
1198
|
|
|
1150
1199
|
// src/contracts/hr.ts
|
|
@@ -1613,6 +1662,7 @@ function isScopedToOwnVehicle(user) {
|
|
|
1613
1662
|
ChangePasswordInputSchema,
|
|
1614
1663
|
ClassAttendanceRowSchema,
|
|
1615
1664
|
ClassSummarySchema,
|
|
1665
|
+
ConfirmEmailChangeInputSchema,
|
|
1616
1666
|
CreateBankAccountInputSchema,
|
|
1617
1667
|
CreateDepartmentInputSchema,
|
|
1618
1668
|
CreateDiaryCategoryInputSchema,
|
|
@@ -1670,9 +1720,11 @@ function isScopedToOwnVehicle(user) {
|
|
|
1670
1720
|
PaginationInputSchema,
|
|
1671
1721
|
PortalBlockSchema,
|
|
1672
1722
|
PortalBlockTypeSchema,
|
|
1723
|
+
ProfileOutputSchema,
|
|
1673
1724
|
RefreshTokenInputSchema,
|
|
1674
1725
|
RefreshTokenOutputSchema,
|
|
1675
1726
|
RejectNotificationInputSchema,
|
|
1727
|
+
RequestEmailChangeInputSchema,
|
|
1676
1728
|
RequestPasswordResetInputSchema,
|
|
1677
1729
|
ResetPasswordInputSchema,
|
|
1678
1730
|
RespondToBlockInputSchema,
|
|
@@ -1697,7 +1749,10 @@ function isScopedToOwnVehicle(user) {
|
|
|
1697
1749
|
TimestampsSchema,
|
|
1698
1750
|
UpdateBankAccountInputSchema,
|
|
1699
1751
|
UpdateDiaryCategoryInputSchema,
|
|
1752
|
+
UpdateProfileInputSchema,
|
|
1700
1753
|
UuidSchema,
|
|
1754
|
+
VerifyPasswordInputSchema,
|
|
1755
|
+
VerifyPasswordOutputSchema,
|
|
1701
1756
|
acknowledgeContract,
|
|
1702
1757
|
acknowledgeDiaryEntryContract,
|
|
1703
1758
|
approveContract,
|
|
@@ -1748,6 +1803,7 @@ function isScopedToOwnVehicle(user) {
|
|
|
1748
1803
|
canViewTransport,
|
|
1749
1804
|
cancelContract,
|
|
1750
1805
|
changePasswordContract,
|
|
1806
|
+
confirmEmailChangeContract,
|
|
1751
1807
|
createBankAccountContract,
|
|
1752
1808
|
createCategoryContract,
|
|
1753
1809
|
createDepartmentContract,
|
|
@@ -1765,6 +1821,7 @@ function isScopedToOwnVehicle(user) {
|
|
|
1765
1821
|
getByStudentContract,
|
|
1766
1822
|
getEntryContract,
|
|
1767
1823
|
getMeContract,
|
|
1824
|
+
getProfileContract,
|
|
1768
1825
|
getResponseSummaryContract,
|
|
1769
1826
|
getStaffByIdContract,
|
|
1770
1827
|
getStudentByIdContract,
|
|
@@ -1828,6 +1885,7 @@ function isScopedToOwnVehicle(user) {
|
|
|
1828
1885
|
paginatedOutputSchema,
|
|
1829
1886
|
refreshTokenContract,
|
|
1830
1887
|
rejectContract,
|
|
1888
|
+
requestEmailChangeContract,
|
|
1831
1889
|
requestLiftContract,
|
|
1832
1890
|
requestPasswordResetContract,
|
|
1833
1891
|
resetPasswordContract,
|
|
@@ -1844,6 +1902,8 @@ function isScopedToOwnVehicle(user) {
|
|
|
1844
1902
|
switchBranchContract,
|
|
1845
1903
|
updateBankAccountContract,
|
|
1846
1904
|
updateCategoryContract,
|
|
1847
|
-
|
|
1905
|
+
updateProfileContract,
|
|
1906
|
+
updateStaffStatusContract,
|
|
1907
|
+
verifyPasswordContract
|
|
1848
1908
|
});
|
|
1849
1909
|
//# sourceMappingURL=index.cjs.map
|