qati-sdk 1.0.3 → 1.0.4
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 +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -34
- package/dist/index.d.ts +85 -34
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -839,7 +839,7 @@ var EventPrincipalSchema = zod.z.object({
|
|
|
839
839
|
// src/v1/schemas/raw-event.ts
|
|
840
840
|
var BaseEventSchema = zod.z.object({
|
|
841
841
|
tenant_id: zod.z.string().describe("Tenant partition key (required)."),
|
|
842
|
-
signal_version: zod.z.string().describe("Schema version (e.g. v1)."),
|
|
842
|
+
signal_version: zod.z.string().default("v1").describe("Schema version (e.g. v1)."),
|
|
843
843
|
signal_type: zod.z.enum(SIGNAL_TYPES).describe("Type of signal."),
|
|
844
844
|
signal_payload: zod.z.record(zod.z.any()).describe("Payload validated per signal_type."),
|
|
845
845
|
principal: EventPrincipalSchema,
|
|
@@ -848,7 +848,8 @@ var BaseEventSchema = zod.z.object({
|
|
|
848
848
|
provenance: ProvenanceSchema.optional().describe(
|
|
849
849
|
"Optional provenance (mode, source_id, epoch_counter, health_summary)."
|
|
850
850
|
),
|
|
851
|
-
integrity: IntegritySchema.optional()
|
|
851
|
+
integrity: IntegritySchema.optional(),
|
|
852
|
+
event_source: zod.z.string().default("SDK_CLIENT").describe("Origin of the event (e.g. SDK_CLIENT, API_GATEWAY).")
|
|
852
853
|
});
|
|
853
854
|
var RawEventRequestSchema = zod.z.object({
|
|
854
855
|
tenant_id: zod.z.string().describe("Tenant partition key (required)."),
|
|
@@ -874,7 +875,8 @@ var buildRawEventPayload = (event, signalPayload, signalType) => {
|
|
|
874
875
|
signal_version: "v1",
|
|
875
876
|
signal_type: signalType,
|
|
876
877
|
signal_payload: signalPayload,
|
|
877
|
-
integrity: event.integrity
|
|
878
|
+
integrity: event.integrity,
|
|
879
|
+
event_source: event.event_source ?? "SDK_CLIENT"
|
|
878
880
|
};
|
|
879
881
|
return BaseEventSchema.parse(rawEventPayload);
|
|
880
882
|
};
|