sinfactura-types 1.6.17 → 1.6.18

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.
package/dist/user.d.ts CHANGED
@@ -21,6 +21,15 @@ declare global {
21
21
  permissions?: UserPermissions;
22
22
  emailVerified?: boolean;
23
23
  emailVerifiedAt?: number;
24
+ totp?: {
25
+ enabled: boolean;
26
+ secretRef?: string;
27
+ pendingSecretRef?: string;
28
+ pendingAt?: number;
29
+ enrolledAt?: number;
30
+ lastUsedAt?: number;
31
+ lastCounter?: number;
32
+ };
24
33
  }
25
34
  type UserNotifications = Partial<Record<NotificationTypeEnum, boolean>>;
26
35
  type UserPermissions = {
@@ -25,6 +25,12 @@ declare global {
25
25
  target_user_id: string;
26
26
  reason: string;
27
27
  }
28
+ interface TwoFactorEnrolledEvent extends UserActivityEventBase {
29
+ event: 'Two-Factor Enrolled';
30
+ }
31
+ interface TwoFactorDisabledEvent extends UserActivityEventBase {
32
+ event: 'Two-Factor Disabled';
33
+ }
28
34
  interface StorePaletteChangedEvent extends UserActivityEventBase {
29
35
  event: 'Store Palette Changed';
30
36
  before: Record<string, unknown>;
@@ -313,7 +319,7 @@ declare global {
313
319
  event: 'Impersonation UI Ended';
314
320
  target_store_id: string;
315
321
  }
316
- type UserActivityEvent = UserLoggedInEvent | UserLoggedOutEvent | UserPasswordChangedEvent | UserSuspendedEvent | StorePaletteChangedEvent | StoreSettingsUpdatedEvent | PlanChangedEvent | InvoiceCreatedEvent | OrderCreatedEvent | OrderCancelledEvent | ProductPriceChangedEvent | CustomerCreatedEvent | CustomerEditedEvent | CashDrawerOpenedEvent | CashDrawerClosedEvent | TenantImpersonatedEvent | SecretRotatedEvent | UserCreatedEvent | UserUpdatedEvent | ProductCreatedEvent | ProductUpdatedEvent | StockIncomeCreatedEvent | CategoryCreatedEvent | CategoryUpdatedEvent | BrandCreatedEvent | BrandUpdatedEvent | SupplierCreatedEvent | SupplierUpdatedEvent | SupplierInvoiceCreatedEvent | SupplierAccountCreatedEvent | SupplierAccountUpdatedEvent | AccountCreatedEvent | AccountDeletedEvent | BasketUpdatedEvent | BasketDeletedEvent | CashDrawerMovementEvent | PaymentCreatedEvent | PaymentLinkedEvent | PaymentUnlinkedEvent | PaymentLinkageUpdatedEvent | NotificationReadEvent | LogDeletedEvent | PlanCreatedEvent | StoreMaintenanceToggledEvent | PlatformMaintenanceToggledEvent | TenantCreatedEvent | LiteralUpdatedEvent | SupportTicketCreatedEvent | SupportTicketUpdatedEvent | AuditTrailViewedEvent | ReportViewedEvent | CustomerPiiViewedEvent | CashDrawerUiOpenedEvent | CashDrawerUiClosedEvent | ExportInitiatedEvent | ImpersonationUiStartedEvent | ImpersonationUiEndedEvent;
322
+ type UserActivityEvent = UserLoggedInEvent | UserLoggedOutEvent | UserPasswordChangedEvent | UserSuspendedEvent | TwoFactorEnrolledEvent | TwoFactorDisabledEvent | StorePaletteChangedEvent | StoreSettingsUpdatedEvent | PlanChangedEvent | InvoiceCreatedEvent | OrderCreatedEvent | OrderCancelledEvent | ProductPriceChangedEvent | CustomerCreatedEvent | CustomerEditedEvent | CashDrawerOpenedEvent | CashDrawerClosedEvent | TenantImpersonatedEvent | SecretRotatedEvent | UserCreatedEvent | UserUpdatedEvent | ProductCreatedEvent | ProductUpdatedEvent | StockIncomeCreatedEvent | CategoryCreatedEvent | CategoryUpdatedEvent | BrandCreatedEvent | BrandUpdatedEvent | SupplierCreatedEvent | SupplierUpdatedEvent | SupplierInvoiceCreatedEvent | SupplierAccountCreatedEvent | SupplierAccountUpdatedEvent | AccountCreatedEvent | AccountDeletedEvent | BasketUpdatedEvent | BasketDeletedEvent | CashDrawerMovementEvent | PaymentCreatedEvent | PaymentLinkedEvent | PaymentUnlinkedEvent | PaymentLinkageUpdatedEvent | NotificationReadEvent | LogDeletedEvent | PlanCreatedEvent | StoreMaintenanceToggledEvent | PlatformMaintenanceToggledEvent | TenantCreatedEvent | LiteralUpdatedEvent | SupportTicketCreatedEvent | SupportTicketUpdatedEvent | AuditTrailViewedEvent | ReportViewedEvent | CustomerPiiViewedEvent | CashDrawerUiOpenedEvent | CashDrawerUiClosedEvent | ExportInitiatedEvent | ImpersonationUiStartedEvent | ImpersonationUiEndedEvent;
317
323
  }
318
324
  /**
319
325
  * Canonical whitelist of UI-only `UserActivityEvent` variant names — the 8
@@ -14,10 +14,11 @@
14
14
  // - Erasure: append-only / anti-erasure per Ley 25.326 audit-trail exemption
15
15
  // - Ingest: synchronous REST-handler helper (WS ingest explicitly disallowed)
16
16
  //
17
- // 57 variants:
17
+ // 59 variants:
18
18
  // - 1.6.11 (Phase 1, 17 variants) — MVP wire-ins covering the hot paths
19
19
  // - 1.6.12 (Phase 2, +32 variants) — full mutating admin-handler coverage
20
20
  // - 1.6.13 (Phase 3, +8 UI-only variants) — FE companion (app#1642, api#1247)
21
+ // - 1.6.18 (+2 variants) — TOTP 2FA enroll/disable lifecycle (types#68, api#636)
21
22
  /**
22
23
  * Canonical whitelist of UI-only `UserActivityEvent` variant names — the 8
23
24
  * Phase 3 verbs shipped in 1.6.13 (types#74). Imported by the api side
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.6.17",
3
+ "version": "1.6.18",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",