@smplkit/sdk 3.0.19 → 3.0.21
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/index.cjs +0 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -15,7 +15,6 @@ interface AuditEvent {
|
|
|
15
15
|
actorType: string;
|
|
16
16
|
actorId: string | null;
|
|
17
17
|
actorLabel: string;
|
|
18
|
-
snapshot: Record<string, unknown> | null;
|
|
19
18
|
data: Record<string, unknown>;
|
|
20
19
|
idempotencyKey: string;
|
|
21
20
|
doNotForward: boolean;
|
|
@@ -26,7 +25,11 @@ interface CreateEventInput {
|
|
|
26
25
|
resourceId: string;
|
|
27
26
|
/** Defaults to server-side now() if omitted. */
|
|
28
27
|
occurredAt?: Date | string;
|
|
29
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Free-form contextual JSON. To record a resource snapshot, nest it
|
|
30
|
+
* inside `data` — smplkit's internal convention is `data.snapshot`,
|
|
31
|
+
* but the shape is unconstrained.
|
|
32
|
+
*/
|
|
30
33
|
data?: Record<string, unknown>;
|
|
31
34
|
/** Optional caller-supplied idempotency key. Server derives one from event content if absent. */
|
|
32
35
|
idempotencyKey?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ interface AuditEvent {
|
|
|
15
15
|
actorType: string;
|
|
16
16
|
actorId: string | null;
|
|
17
17
|
actorLabel: string;
|
|
18
|
-
snapshot: Record<string, unknown> | null;
|
|
19
18
|
data: Record<string, unknown>;
|
|
20
19
|
idempotencyKey: string;
|
|
21
20
|
doNotForward: boolean;
|
|
@@ -26,7 +25,11 @@ interface CreateEventInput {
|
|
|
26
25
|
resourceId: string;
|
|
27
26
|
/** Defaults to server-side now() if omitted. */
|
|
28
27
|
occurredAt?: Date | string;
|
|
29
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Free-form contextual JSON. To record a resource snapshot, nest it
|
|
30
|
+
* inside `data` — smplkit's internal convention is `data.snapshot`,
|
|
31
|
+
* but the shape is unconstrained.
|
|
32
|
+
*/
|
|
30
33
|
data?: Record<string, unknown>;
|
|
31
34
|
/** Optional caller-supplied idempotency key. Server derives one from event content if absent. */
|
|
32
35
|
idempotencyKey?: string;
|
package/dist/index.js
CHANGED
|
@@ -16740,7 +16740,6 @@ function _attributesFromInput(input) {
|
|
|
16740
16740
|
const ts = input.occurredAt instanceof Date ? input.occurredAt.toISOString() : input.occurredAt;
|
|
16741
16741
|
attrs.occurred_at = ts;
|
|
16742
16742
|
}
|
|
16743
|
-
if (input.snapshot !== void 0) attrs.snapshot = input.snapshot;
|
|
16744
16743
|
if (input.data !== void 0) attrs.data = input.data;
|
|
16745
16744
|
if (input.doNotForward) attrs.do_not_forward = true;
|
|
16746
16745
|
return attrs;
|
|
@@ -16757,7 +16756,6 @@ function _eventFromResource(resource) {
|
|
|
16757
16756
|
actorType: String(attrs.actor_type ?? ""),
|
|
16758
16757
|
actorId: attrs.actor_id ?? null,
|
|
16759
16758
|
actorLabel: String(attrs.actor_label ?? ""),
|
|
16760
|
-
snapshot: attrs.snapshot ?? null,
|
|
16761
16759
|
data: attrs.data ?? {},
|
|
16762
16760
|
idempotencyKey: String(attrs.idempotency_key ?? ""),
|
|
16763
16761
|
doNotForward: Boolean(attrs.do_not_forward ?? false)
|