@managemint-solutions/entities 1.9.0 → 1.11.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.
|
@@ -12,6 +12,8 @@ export type GetProjectsDto = {
|
|
|
12
12
|
end_date_after?: string | Date | null;
|
|
13
13
|
end_date_before?: string | Date | null;
|
|
14
14
|
status_id_in?: string | null;
|
|
15
|
+
status_id_not_in?: string | null;
|
|
16
|
+
completed?: boolean | null;
|
|
15
17
|
client_id?: string | null;
|
|
16
18
|
archive: boolean;
|
|
17
19
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The contract for the portal's edge cache of each member's own `GET /users/me`.
|
|
3
|
+
*
|
|
4
|
+
* The portal owns the cache (Vercel Runtime Cache, one entry per member, written on a
|
|
5
|
+
* miss); the api never reads it and only expires tags after a write. Both sides import
|
|
6
|
+
* these so a change to the shape or the tagging is one edit.
|
|
7
|
+
*/
|
|
8
|
+
/** Bump when the LoggedInUser wire shape changes; old entries simply stop matching. */
|
|
9
|
+
export declare const USER_ME_CACHE_VERSION = "v1";
|
|
10
|
+
/** The hard ceiling on how stale a cached profile may be, in seconds (one day). */
|
|
11
|
+
export declare const USER_ME_CACHE_TTL_SECONDS = 86400;
|
|
12
|
+
/** The cache key of one member's LoggedInUser blob. Portal-internal; versioned here. */
|
|
13
|
+
export declare const userMeCacheKey: (mmsId: string) => string;
|
|
14
|
+
/** Expiring this tag drops one member's blob - every write to that member's row or permissions. */
|
|
15
|
+
export declare const userCacheTag: (mmsId: string) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Expiring this tag drops every member's blob in the organization - a write that changes
|
|
18
|
+
* what all of them see (the module set folded into their permissions).
|
|
19
|
+
*/
|
|
20
|
+
export declare const organizationCacheTag: (organizationId: string) => string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The contract for the portal's edge cache of each member's own `GET /users/me`.
|
|
4
|
+
*
|
|
5
|
+
* The portal owns the cache (Vercel Runtime Cache, one entry per member, written on a
|
|
6
|
+
* miss); the api never reads it and only expires tags after a write. Both sides import
|
|
7
|
+
* these so a change to the shape or the tagging is one edit.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.organizationCacheTag = exports.userCacheTag = exports.userMeCacheKey = exports.USER_ME_CACHE_TTL_SECONDS = exports.USER_ME_CACHE_VERSION = void 0;
|
|
11
|
+
/** Bump when the LoggedInUser wire shape changes; old entries simply stop matching. */
|
|
12
|
+
exports.USER_ME_CACHE_VERSION = 'v1';
|
|
13
|
+
/** The hard ceiling on how stale a cached profile may be, in seconds (one day). */
|
|
14
|
+
exports.USER_ME_CACHE_TTL_SECONDS = 86400;
|
|
15
|
+
/** The cache key of one member's LoggedInUser blob. Portal-internal; versioned here. */
|
|
16
|
+
const userMeCacheKey = (mmsId) => `user:me:${exports.USER_ME_CACHE_VERSION}:${mmsId}`;
|
|
17
|
+
exports.userMeCacheKey = userMeCacheKey;
|
|
18
|
+
/** Expiring this tag drops one member's blob - every write to that member's row or permissions. */
|
|
19
|
+
const userCacheTag = (mmsId) => `user:${mmsId}`;
|
|
20
|
+
exports.userCacheTag = userCacheTag;
|
|
21
|
+
/**
|
|
22
|
+
* Expiring this tag drops every member's blob in the organization - a write that changes
|
|
23
|
+
* what all of them see (the module set folded into their permissions).
|
|
24
|
+
*/
|
|
25
|
+
const organizationCacheTag = (organizationId) => `org:${organizationId}`;
|
|
26
|
+
exports.organizationCacheTag = organizationCacheTag;
|
package/dist/users/index.d.ts
CHANGED
|
@@ -163,6 +163,12 @@ export interface Alerts {
|
|
|
163
163
|
cancelled: boolean;
|
|
164
164
|
card_expiring_soon: boolean;
|
|
165
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* The caller's own profile as the portal boots on it. Billing alerts are not part of it:
|
|
168
|
+
* they move with the organization's billing state rather than with the user, so they are
|
|
169
|
+
* served separately by `GET /users/me/alerts` and fetched in the background.
|
|
170
|
+
*/
|
|
166
171
|
export interface LoggedInUser extends UserEntity, Permissions {
|
|
167
|
-
|
|
172
|
+
/** The caller's own organization - what the portal's edge cache tags the entry with. */
|
|
173
|
+
organization_id: string;
|
|
168
174
|
}
|
package/package.json
CHANGED