sinfactura-types 1.6.68 → 1.6.70

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/ai.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ declare global {
2
+ interface AiUsageReport {
3
+ from: string;
4
+ to: string;
5
+ totalUsd: number;
6
+ budget: {
7
+ globalDailyCeilingUsd: number;
8
+ tenantDailyCeilingUsd: number;
9
+ };
10
+ peakDailyUtilizationPct: number;
11
+ byFeature: Array<{
12
+ featureKey: string;
13
+ costUsd: number;
14
+ }>;
15
+ byModel: Array<{
16
+ model: string;
17
+ costUsd: number;
18
+ }>;
19
+ byTenant: Array<{
20
+ storeId: string;
21
+ costUsd: number;
22
+ }>;
23
+ byFeatureModel: Array<{
24
+ featureKey: string;
25
+ model: string;
26
+ costUsd: number;
27
+ }>;
28
+ byDay: Array<{
29
+ dated: string;
30
+ costUsd: number;
31
+ utilizationPct: number;
32
+ }>;
33
+ }
34
+ }
35
+ export {};
package/dist/ai.js ADDED
@@ -0,0 +1,2 @@
1
+ // AI platform-spend contracts (api#1788; MANAGER dashboard app#1044).
2
+ export {};
package/dist/auth.d.ts CHANGED
@@ -2,9 +2,19 @@ declare global {
2
2
  interface Login {
3
3
  email: string;
4
4
  password: string;
5
+ /** TOTP step-up code (6-32 chars) — required by the BE only when the
6
+ * account has 2FA enrolled; otherwise omit. */
7
+ totpCode?: string;
8
+ /** reCAPTCHA v3 token — required by the BE only after a
9
+ * `CAPTCHA_REQUIRED` login rejection (api#1505); otherwise omit. */
10
+ captchaToken?: string;
5
11
  }
6
12
  interface Social {
7
- accessToken?: string;
13
+ /** REQUIRED on the wire (the BE rejects an empty/missing token) —
14
+ * was wrongly optional before 1.6.70. */
15
+ accessToken: string;
16
+ /** TOTP step-up code (6-32 chars) — same semantics as `Login.totpCode`. */
17
+ totpCode?: string;
8
18
  }
9
19
  interface Register {
10
20
  email: string;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./account";
2
2
  export * from "./afip";
3
+ export * from "./ai";
3
4
  export * from "./api";
4
5
  export * from "./audit";
5
6
  export * from "./auth";
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./account";
2
2
  export * from "./afip";
3
+ export * from "./ai";
3
4
  export * from "./api";
4
5
  export * from "./audit";
5
6
  export * from "./auth";
@@ -17,6 +17,10 @@ declare global {
17
17
  expiresAt: number;
18
18
  connectedAt: number;
19
19
  }
20
+ interface MlOauthDisconnectResponse {
21
+ disconnected: true;
22
+ storeId: string;
23
+ }
20
24
  type MlOauthErrorCode = "OAUTH_USER_DENIED" | "OAUTH_STATE_MISMATCH" | "OAUTH_EXCHANGE_FAILED" | "ML_OAUTH_NOT_CONFIGURED" | "ML_REDIRECT_URI_MISMATCH" | "ML_OFFLINE_ACCESS_NOT_GRANTED" | "ML_OPERATOR_SUB_ACCOUNT" | "ML_SELLER_ALREADY_LINKED";
21
25
  interface MercadolibreStatus {
22
26
  connected: boolean;
package/dist/order.d.ts CHANGED
@@ -68,6 +68,14 @@ declare global {
68
68
  mercadolibre?: OrderMercadolibre;
69
69
  }
70
70
  type OrderChannel = 'meli';
71
+ interface MercadolibreCreditNoteStamp {
72
+ creditNoteNumber?: number;
73
+ emittedAt?: number;
74
+ status?: 'emitted' | 'skipped' | 'failed';
75
+ reason?: string;
76
+ claimId?: string;
77
+ source: 'manual' | 'auto';
78
+ }
71
79
  interface OrderMercadolibre {
72
80
  mlOrderId: string;
73
81
  packId?: string;
@@ -21,3 +21,17 @@ export interface PlatformGlobalsPostBody {
21
21
  scope: 'app' | 'web' | 'landing' | 'storefront';
22
22
  }>;
23
23
  }
24
+ export interface PlatformProviderHealth {
25
+ tenantsConnected: number;
26
+ /** 24h success ratio in [0, 1] (a fraction, NOT a percentage). */
27
+ syncSuccessRate24h?: number;
28
+ /** Integer milliseconds. */
29
+ p95LatencyMs?: number;
30
+ /** Shared platform DLQ depth — the same value is repeated on every provider row. */
31
+ dlqDepth: number;
32
+ /** Epoch ms of the most recent error datapoint in the 24h window. */
33
+ lastIncidentAt?: number;
34
+ refreshFailures24h: number;
35
+ killSwitchEnabled?: boolean;
36
+ }
37
+ export type PlatformIntegrationsAggregate = Record<string, PlatformProviderHealth>;
package/dist/store.d.ts CHANGED
@@ -102,6 +102,7 @@ declare global {
102
102
  storeId: string;
103
103
  createdAt: number;
104
104
  type?: 'production' | 'demo';
105
+ seededAt?: number;
105
106
  name: string;
106
107
  address: {
107
108
  street: string;
@@ -339,6 +340,9 @@ declare global {
339
340
  */
340
341
  interface MercadolibrePatchInput {
341
342
  autoInvoice?: boolean;
343
+ /** Auto-emit a Nota de Crédito on a finalized full-sale ML return (api#1684).
344
+ * BE-enforced: requires `autoInvoice` to be true (400 otherwise). */
345
+ autoCreditNote?: boolean;
342
346
  defaultPosId?: number | null;
343
347
  /** WRITE-ONLY attestation flag (api#1655): `true` = the operator
344
348
  * confirms ML's own Facturador is OFF for this account. The BE stamps
@@ -394,6 +398,19 @@ declare global {
394
398
  fceEnabled?: boolean;
395
399
  wscdcEnabled?: boolean;
396
400
  }
401
+ /**
402
+ * Write shape for the `afip` key of `PATCH /store`'s body. The wire accepts an
403
+ * explicit `null` for these clearable keys — `null` deletes the key, omitting it
404
+ * keeps the current value — but the read-side `Afip` interface can't express that
405
+ * WRITE-ONLY null-clear semantic. Same convention as `MercadolibrePatchInput`'s
406
+ * `defaultPosId`/`syncPolicy` null-knobs above.
407
+ */
408
+ interface AfipPatchInput {
409
+ facturaMLegend?: 'retencion' | 'cbu_informada' | null;
410
+ cbu?: string | null;
411
+ iibbTransparency?: Afip['iibbTransparency'] | null;
412
+ actividades?: number[] | null;
413
+ }
397
414
  type StoreAttributeNames = keyof Store;
398
415
  interface Method {
399
416
  id: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.6.68",
3
+ "version": "1.6.70",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",