Files
backend/src/common/special-group-key.ts
T
Alireza HassaniandCursor f233665d13 Add stable keys for special groups and SSL sync agent hooks.
English keys on store/website specials stay unique per business; domain-admin can trigger dashboard SSL sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 00:06:44 +03:30

10 lines
346 B
TypeScript

/** English stable key for website special group lookups (e.g. top-selling). */
export const SPECIAL_GROUP_KEY_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]*$/;
export const SPECIAL_GROUP_KEY_MESSAGE =
'key must be English letters, numbers, hyphens, or underscores';
export function normalizeSpecialGroupKey(raw: string): string {
return raw.trim();
}