sinfactura-types 1.6.32 → 1.6.34

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/audit.d.ts CHANGED
@@ -31,5 +31,47 @@ declare global {
31
31
  newValue: unknown;
32
32
  }
33
33
  type OrderAuditAction = 'order_created' | 'order_edited' | 'order_ready' | 'order_delivered' | 'order_delivery_cancelled' | 'order_disabled' | 'order_enabled' | 'order_returned' | 'discount_changed' | 'payment_method_changed' | 'delivery_method_changed' | 'delivery_address_changed' | 'invoice_created' | 'credit_note_created';
34
+ /** One ARCA fiscal SOAP interaction (FECAESolicitar | FECompConsultar). Stored raw (CUIT unmasked) for 10y; masked at read. */
35
+ interface FiscalAuditEvent {
36
+ /** Schema version for forward-compat (start at 1). */
37
+ schema_version: number;
38
+ /** Unique id for this interaction (uuid). */
39
+ event_id: string;
40
+ /** Owning tenant store id, e.g. STO002. Partition-scoping key. */
41
+ tenant_store_id: string;
42
+ /** Unix ms when the interaction completed. */
43
+ ts: number;
44
+ /** Which ARCA fiscal op. */
45
+ operation: 'FECAESolicitar' | 'FECompConsultar';
46
+ /** Issuer CUIT (RAW — masked only at display). */
47
+ cuit: string;
48
+ /** AFIP environment the call hit. */
49
+ environment: 'homologacion' | 'produccion';
50
+ /** Sales point + voucher type + number when known. */
51
+ salesPoint?: number;
52
+ voucherType?: number;
53
+ voucherNumber?: number;
54
+ /** Internal invoice id correlation (INV000123) when available. */
55
+ invoiceId?: string;
56
+ /** Outcome of the interaction. */
57
+ outcome: 'authorized' | 'rejected' | 'unresolved' | 'queried';
58
+ /** CAE + expiry on success. */
59
+ cae?: string;
60
+ caeExpiration?: string;
61
+ /** Raw ARCA Errores[]/Observaciones[] passthrough (no flattening). */
62
+ errores?: {
63
+ code: number;
64
+ msg: string;
65
+ }[];
66
+ observaciones?: {
67
+ code: number;
68
+ msg: string;
69
+ }[];
70
+ /** Wall-clock duration of the SOAP call in ms. */
71
+ durationMs: number;
72
+ /** Full request args + response body (raw), for the regulator record. */
73
+ requestPayload: Record<string, unknown>;
74
+ responsePayload: Record<string, unknown>;
75
+ }
34
76
  }
35
77
  export {};
package/dist/store.d.ts CHANGED
@@ -179,17 +179,39 @@ declare global {
179
179
  minWithDni: number;
180
180
  maintenance?: MaintenanceInfo;
181
181
  legacyCurrencyIds?: Record<number, string>;
182
+ afipCertAlert?: {
183
+ expiry: number;
184
+ band: 'expired' | '14' | '30' | '60';
185
+ };
186
+ emailSender?: {
187
+ from?: string;
188
+ verified?: boolean;
189
+ };
182
190
  }
183
191
  interface StoreIntegrations {
184
192
  afip?: Afip;
185
193
  mercadopago?: Mercadopago;
186
194
  whatsapp?: WhatsAppConfig;
187
195
  sms?: SmsIntegration;
196
+ gmail?: Gmail;
188
197
  }
189
198
  interface SmsIntegration {
190
199
  /** When true, the store may send SMS through the shared platform account. */
191
200
  enabled?: boolean;
192
201
  }
202
+ interface Gmail {
203
+ connected?: boolean;
204
+ senderEmail?: string;
205
+ /** KMS-encrypted refresh token — never returned in API responses. */
206
+ refreshTokenEncrypted?: string;
207
+ scopes?: string[];
208
+ connectedAt?: number;
209
+ /** Lifecycle fields (api#1459 / #1460). */
210
+ status?: 'connected' | 'expired' | 'disconnected' | 'error' | 'never';
211
+ disconnectedAt?: number;
212
+ lastTokenRefreshAt?: number;
213
+ tokenRefreshFailures?: number;
214
+ }
193
215
  type FxAutoUpdateStrategy = "overwrite" | "overwrite-if-stale" | "notify-only";
194
216
  interface FxAutoUpdateBinding {
195
217
  catalogId: string;
@@ -281,8 +281,10 @@ declare global {
281
281
  target_store_id: string;
282
282
  name: string;
283
283
  }
284
+ type LiteralScope = 'GLOBAL' | 'APP' | 'PLATFORM' | 'WEB' | `APP#${string}` | `WEB#${string}`;
284
285
  interface LiteralUpdatedEvent extends UserActivityEventBase {
285
286
  event: 'Literal Updated';
287
+ scope: LiteralScope;
286
288
  key: string;
287
289
  before: string;
288
290
  after: string;
@@ -21,6 +21,7 @@
21
21
  // - 1.6.18 (+2 variants) — TOTP 2FA enroll/disable lifecycle (types#68, api#636)
22
22
  // - 1.6.20 (+1 variant) — operator 2FA reset, target_user_id (api#1335)
23
23
  // - 1.6.21 (+1 variant) — TOTP recovery codes generated (api#1336); method += 'recovery'
24
+ // - 1.6.34 (+field) — LiteralUpdatedEvent gains `scope`; new `LiteralScope` contract (api#1484)
24
25
  /**
25
26
  * Canonical whitelist of UI-only `UserActivityEvent` variant names — the 8
26
27
  * 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.32",
3
+ "version": "1.6.34",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",