Files
keysat-activate-template/startos/licensing/store.ts
T
2026-05-07 10:41:57 -05:00

32 lines
1.0 KiB
TypeScript

// Store shape additions for the licensing template.
//
// Merge these fields into your package's existing store shape (e.g. in
// `startos/init/index.ts` or wherever you declare `sdk.setupStore`).
//
// Example merge:
//
// export const initStore: StoreShape = {
// // ...your existing fields...
// ...licensingStoreDefaults,
// }
//
// The actions here write into these fields; your main process reads them.
export interface LicensingStoreFields {
/** The raw license key string, e.g. "LIC1-...-..." */
license_key: string | null
/** ISO timestamp of when the key was activated. */
license_activated_at: string | null
/** Last known validation status from the licensing server, for display. */
license_last_status: string | null
/** Invoice id of an in-progress purchase, if any. */
license_pending_invoice_id: string | null
}
export const licensingStoreDefaults: LicensingStoreFields = {
license_key: null,
license_activated_at: null,
license_last_status: null,
license_pending_invoice_id: null,
}