sinfactura-types 1.10.608 → 1.10.609
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 +2 -0
- package/dist/auditEnvelope.d.ts +73 -0
- package/dist/auditEnvelope.js +1 -0
- package/dist/cjs/auditEnvelope.js +2 -0
- package/dist/cjs/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/subscription.d.ts +2 -0
- package/package.json +1 -1
package/dist/audit.d.ts
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
type EntityAuditEntity = 'PLAN' | 'STORE' | 'PAYMENT' | 'ORDER' | 'MERCADOPAGO' | 'INVOICE' | 'SUBSCRIPTION' | 'USER' | 'CUSTOMER' | 'INTEGRATION' | 'PLATFORM';
|
|
3
|
+
/** Existing business fields with independently projected public metadata. */
|
|
4
|
+
interface EntityAuditHttpEntry {
|
|
5
|
+
entity: EntityAuditEntity;
|
|
6
|
+
entityId: string;
|
|
7
|
+
storeId?: string;
|
|
8
|
+
timestamp: number;
|
|
9
|
+
actor: OrderAuditActor;
|
|
10
|
+
action: string;
|
|
11
|
+
before: Record<string, unknown>;
|
|
12
|
+
after: Record<string, unknown>;
|
|
13
|
+
reason: string;
|
|
14
|
+
createdAt: number;
|
|
15
|
+
origin?: OrderAuditOrigin;
|
|
16
|
+
audit: PublicAuditMetadata;
|
|
17
|
+
}
|
|
18
|
+
/** Internal, forward-only metadata; independent of each event's schema_version. */
|
|
19
|
+
interface AuditEnvelopeV1 {
|
|
20
|
+
envelopeVersion: 1;
|
|
21
|
+
eventId: string;
|
|
22
|
+
surface: AuditSurface;
|
|
23
|
+
dataClass: AuditDataClass;
|
|
24
|
+
scope: {
|
|
25
|
+
kind: 'tenant';
|
|
26
|
+
tenantId: string;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'platform';
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'unknown';
|
|
31
|
+
};
|
|
32
|
+
occurredAt: string;
|
|
33
|
+
recordedAt: string;
|
|
34
|
+
actor: {
|
|
35
|
+
principal: {
|
|
36
|
+
kind: 'user' | 'customer' | 'platform-user';
|
|
37
|
+
id: string;
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'system' | 'anonymous' | 'unknown';
|
|
40
|
+
};
|
|
41
|
+
resolution: 'named' | 'name-unresolved' | 'system' | 'anonymous' | 'unknown';
|
|
42
|
+
/** Trusted support context only; never a public projection. */
|
|
43
|
+
support?: {
|
|
44
|
+
operatorId: string;
|
|
45
|
+
sessionId: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
subject?: {
|
|
49
|
+
type: string;
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
targets?: {
|
|
53
|
+
type: string;
|
|
54
|
+
id: string;
|
|
55
|
+
}[];
|
|
56
|
+
action: string;
|
|
57
|
+
correlationId?: string;
|
|
58
|
+
causationId?: string;
|
|
59
|
+
}
|
|
60
|
+
type AuditSurface = 'storefrontEvents' | 'userActivity' | 'entityAudit' | 'storeLogPartition' | 'errorPartition' | 'fiscalAudit' | 'loginHistory' | 'outboundMessageLog' | 'impersonationAudit' | 'notifyDelivery' | 'orderOutbox';
|
|
61
|
+
type AuditDataClass = 'customer-analytics' | 'operator-audit' | 'entity-diff-history' | 'legacy-mixed-log' | 'operational-error' | 'fiscal-interaction-log' | 'security-audit' | 'outbound-message-forensics' | 'privileged-access-audit' | 'notification-delivery-outcome' | 'delivery-intent';
|
|
62
|
+
/** Public metadata contains no internal attribution, references or bookkeeping. */
|
|
63
|
+
type PublicAuditMetadata = {
|
|
64
|
+
status: 'legacy';
|
|
65
|
+
} | {
|
|
66
|
+
status: 'v1';
|
|
67
|
+
envelopeVersion: 1;
|
|
68
|
+
eventId: string;
|
|
69
|
+
occurredAt: string;
|
|
70
|
+
recordedAt: string;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/cjs/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __exportStar(require("./ai.js"), exports);
|
|
|
28
28
|
__exportStar(require("./api.js"), exports);
|
|
29
29
|
__exportStar(require("./appointment.js"), exports);
|
|
30
30
|
__exportStar(require("./audit.js"), exports);
|
|
31
|
+
__exportStar(require("./auditEnvelope.js"), exports);
|
|
31
32
|
__exportStar(require("./attendance.js"), exports);
|
|
32
33
|
__exportStar(require("./auth.js"), exports);
|
|
33
34
|
__exportStar(require("./basket.js"), exports);
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/subscription.d.ts
CHANGED
|
@@ -247,6 +247,7 @@ declare global {
|
|
|
247
247
|
* `before`/`after` carry only the fields that changed (diff slice).
|
|
248
248
|
*/
|
|
249
249
|
interface PlanAuditEntry {
|
|
250
|
+
audit?: PublicAuditMetadata;
|
|
250
251
|
entity: 'PLAN';
|
|
251
252
|
entityId: string;
|
|
252
253
|
timestamp: number;
|
|
@@ -495,6 +496,7 @@ declare global {
|
|
|
495
496
|
* each side structurally rather than trusting every field to be present.
|
|
496
497
|
*/
|
|
497
498
|
interface SubscriptionAuditEntry {
|
|
499
|
+
audit?: PublicAuditMetadata;
|
|
498
500
|
storeId: string;
|
|
499
501
|
timestamp: number;
|
|
500
502
|
actor: {
|