@careflair/common 1.0.40 → 1.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.
|
@@ -10,17 +10,18 @@ export type Actions = "create" | "read" | "update" | "delete" | "apply" | "initi
|
|
|
10
10
|
export type Subjects = "Job" | "Chat" | "NDISScreening" | "WorkingWithChildren" | "Profile" | "all";
|
|
11
11
|
/**
|
|
12
12
|
* AppAbility type for type-safe permission checks
|
|
13
|
-
* Uses PureAbility (modern API)
|
|
13
|
+
* Uses PureAbility (modern API) + mongoQueryMatcher so we can define conditional rules
|
|
14
|
+
* (e.g. { postedBy: user.id }) without runtime errors.
|
|
14
15
|
*/
|
|
15
|
-
export type AppAbility = PureAbility<[Actions, Subjects]>;
|
|
16
|
+
export type AppAbility = PureAbility<[Actions, Subjects], any>;
|
|
16
17
|
/**
|
|
17
|
-
* User
|
|
18
|
+
* User type for ability definition
|
|
18
19
|
* Only requires id and role - minimal interface for permission checks
|
|
19
20
|
*/
|
|
20
|
-
export
|
|
21
|
+
export type UserForAbility = {
|
|
21
22
|
id: string;
|
|
22
23
|
role: UserRole;
|
|
23
|
-
}
|
|
24
|
+
};
|
|
24
25
|
/**
|
|
25
26
|
* Define abilities for a user based on their role
|
|
26
27
|
* This is the SINGLE SOURCE OF TRUTH for permissions
|
package/dist/abilities/index.js
CHANGED
package/dist/enums/index.d.ts
CHANGED
|
@@ -363,7 +363,8 @@ export declare enum JOB_TABS {
|
|
|
363
363
|
ALL = "all",
|
|
364
364
|
MY_JOBS = "my-jobs",
|
|
365
365
|
APPLIED_JOBS = "applied-jobs",
|
|
366
|
-
MATCHED_JOBS = "matched-jobs"
|
|
366
|
+
MATCHED_JOBS = "matched-jobs",
|
|
367
|
+
OTHER_JOBS = "other-jobs"
|
|
367
368
|
}
|
|
368
369
|
export declare enum DocumentType {
|
|
369
370
|
NDIS_WORKER_SCREENING = "NDIS_WORKER_SCREENING",
|
package/dist/enums/index.js
CHANGED
|
@@ -420,6 +420,7 @@ var JOB_TABS;
|
|
|
420
420
|
JOB_TABS["MY_JOBS"] = "my-jobs";
|
|
421
421
|
JOB_TABS["APPLIED_JOBS"] = "applied-jobs";
|
|
422
422
|
JOB_TABS["MATCHED_JOBS"] = "matched-jobs";
|
|
423
|
+
JOB_TABS["OTHER_JOBS"] = "other-jobs";
|
|
423
424
|
})(JOB_TABS || (exports.JOB_TABS = JOB_TABS = {}));
|
|
424
425
|
var DocumentType;
|
|
425
426
|
(function (DocumentType) {
|