sahab-utils 2.0.0 → 2.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.
|
@@ -845,8 +845,6 @@ export type AppSettings = {
|
|
|
845
845
|
pushTransport?: PushTransport;
|
|
846
846
|
/** Kill switch for staff push broadcasts. Off unless true; test sends to the dev team still work. */
|
|
847
847
|
broadcastEnabled?: boolean;
|
|
848
|
-
/** Staff push for an order that used a car Sahab has not verified. Off unless true, so deploying does not send one per model already in use. */
|
|
849
|
-
carReviewAlertsEnabled?: boolean;
|
|
850
848
|
};
|
|
851
849
|
export type OrderReview = {
|
|
852
850
|
ratingId: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Permissions, StaffRole } from './staffAccess';
|
|
2
2
|
/** Which alerts a back-office admin gets. The shared contract between sahab-website (the Admin notifications page) and cloudFun. */
|
|
3
3
|
/** App (push) alerts, each sent to the admin's customer-app account. */
|
|
4
|
-
export declare const ADMIN_PUSH_KINDS: readonly ["newOrder", "newCarwash", "newGift", "newClient", "needsAttention", "statements"];
|
|
4
|
+
export declare const ADMIN_PUSH_KINDS: readonly ["newOrder", "newCarwash", "newGift", "newClient", "newCarModel", "needsAttention", "statements"];
|
|
5
5
|
export type AdminPushKind = (typeof ADMIN_PUSH_KINDS)[number];
|
|
6
6
|
/** Every switch on the page: the app alerts plus the lead e-mail. */
|
|
7
|
-
export declare const ADMIN_NOTIFICATION_KEYS: readonly ["newOrder", "newCarwash", "newGift", "newClient", "needsAttention", "statements", "leadEmails"];
|
|
7
|
+
export declare const ADMIN_NOTIFICATION_KEYS: readonly ["newOrder", "newCarwash", "newGift", "newClient", "newCarModel", "needsAttention", "statements", "leadEmails"];
|
|
8
8
|
export type AdminNotificationKey = (typeof ADMIN_NOTIFICATION_KEYS)[number];
|
|
9
9
|
export type AdminNotificationPrefs = Record<AdminNotificationKey, boolean>;
|
|
10
10
|
export declare const ADMIN_NOTIFICATION_LABELS: Record<AdminNotificationKey, {
|
|
@@ -4,7 +4,7 @@ exports.isValidAppUid = exports.isValidAdminEmail = exports.normalizeAdminEmail
|
|
|
4
4
|
exports.normalizeAdminNotificationPrefs = normalizeAdminNotificationPrefs;
|
|
5
5
|
/** Which alerts a back-office admin gets. The shared contract between sahab-website (the Admin notifications page) and cloudFun. */
|
|
6
6
|
/** App (push) alerts, each sent to the admin's customer-app account. */
|
|
7
|
-
exports.ADMIN_PUSH_KINDS = ['newOrder', 'newCarwash', 'newGift', 'newClient', 'needsAttention', 'statements'];
|
|
7
|
+
exports.ADMIN_PUSH_KINDS = ['newOrder', 'newCarwash', 'newGift', 'newClient', 'newCarModel', 'needsAttention', 'statements'];
|
|
8
8
|
/** Every switch on the page: the app alerts plus the lead e-mail. */
|
|
9
9
|
exports.ADMIN_NOTIFICATION_KEYS = [...exports.ADMIN_PUSH_KINDS, 'leadEmails'];
|
|
10
10
|
exports.ADMIN_NOTIFICATION_LABELS = {
|
|
@@ -12,6 +12,7 @@ exports.ADMIN_NOTIFICATION_LABELS = {
|
|
|
12
12
|
newCarwash: { label: 'New carwash', description: 'A carwash registers or finishes its registration.' },
|
|
13
13
|
newGift: { label: 'New gift', description: 'A customer buys a gift.' },
|
|
14
14
|
newClient: { label: 'New customer', description: 'A customer joins the app.' },
|
|
15
|
+
newCarModel: { label: 'Car model to review', description: 'An order uses a car model Sahab has not reviewed yet.' },
|
|
15
16
|
needsAttention: { label: 'Carwash needs attention', description: 'A carwash changed something that needs a look.' },
|
|
16
17
|
statements: { label: 'Statements', description: 'The daily and weekly statements are ready.' },
|
|
17
18
|
leadEmails: { label: 'Lead e-mails', description: 'A visitor sends an enquiry or a carwash request on the website.' },
|