@stndrds/schema 1.0.0-alpha.239 → 1.0.0-alpha.241
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.d.mts +3 -10
- package/dist/index.d.ts +3 -10
- package/dist/index.js +13 -13
- package/dist/index.mjs +13 -13
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -7797,7 +7797,7 @@ interface DomainEvent<T extends EventType = EventType> {
|
|
|
7797
7797
|
type LiveChannelKind = "workspace" | "object" | "record" | "view" | "agent" | "user" | "conversation";
|
|
7798
7798
|
type LiveChannel = {
|
|
7799
7799
|
kind: "workspace";
|
|
7800
|
-
|
|
7800
|
+
tenantId: string;
|
|
7801
7801
|
} | {
|
|
7802
7802
|
kind: "object";
|
|
7803
7803
|
objectId: string;
|
|
@@ -7810,7 +7810,7 @@ type LiveChannel = {
|
|
|
7810
7810
|
viewId: string;
|
|
7811
7811
|
} | {
|
|
7812
7812
|
kind: "agent";
|
|
7813
|
-
|
|
7813
|
+
tenantId: string;
|
|
7814
7814
|
} | {
|
|
7815
7815
|
kind: "user";
|
|
7816
7816
|
actorId: string;
|
|
@@ -7856,7 +7856,6 @@ type ViewProjectionStaleLiveEvent = {
|
|
|
7856
7856
|
};
|
|
7857
7857
|
type AgentSessionPatchLiveEvent = {
|
|
7858
7858
|
type: "agent.session.patch";
|
|
7859
|
-
workspaceId: string;
|
|
7860
7859
|
sessionId: string;
|
|
7861
7860
|
patch: Record<string, unknown>;
|
|
7862
7861
|
version: number;
|
|
@@ -7870,7 +7869,6 @@ type AgentSessionPatchLiveEvent = {
|
|
|
7870
7869
|
};
|
|
7871
7870
|
type AgentUnreadPatchLiveEvent = {
|
|
7872
7871
|
type: "agent.unread.patch";
|
|
7873
|
-
workspaceId: string;
|
|
7874
7872
|
targetActorId: string;
|
|
7875
7873
|
sessionId: string;
|
|
7876
7874
|
unreadCount: number;
|
|
@@ -7929,7 +7927,6 @@ type LiveNotificationRecipientPatch = {
|
|
|
7929
7927
|
};
|
|
7930
7928
|
type NotificationCreatedLiveEvent = {
|
|
7931
7929
|
type: "notification.created";
|
|
7932
|
-
workspaceId: string;
|
|
7933
7930
|
notification: LiveNotification;
|
|
7934
7931
|
recipients: LiveNotificationRecipient[];
|
|
7935
7932
|
version: number;
|
|
@@ -7937,7 +7934,6 @@ type NotificationCreatedLiveEvent = {
|
|
|
7937
7934
|
};
|
|
7938
7935
|
type NotificationRecipientPatchLiveEvent = {
|
|
7939
7936
|
type: "notification.recipient.patch";
|
|
7940
|
-
workspaceId: string;
|
|
7941
7937
|
recipientId: string;
|
|
7942
7938
|
recipientActorId: string;
|
|
7943
7939
|
patch: LiveNotificationRecipientPatch;
|
|
@@ -7946,7 +7942,6 @@ type NotificationRecipientPatchLiveEvent = {
|
|
|
7946
7942
|
};
|
|
7947
7943
|
type NotificationCountPatchLiveEvent = {
|
|
7948
7944
|
type: "notification.count.patch";
|
|
7949
|
-
workspaceId: string;
|
|
7950
7945
|
targetActorId: string;
|
|
7951
7946
|
unread: number;
|
|
7952
7947
|
pendingWork: number;
|
|
@@ -7955,7 +7950,6 @@ type NotificationCountPatchLiveEvent = {
|
|
|
7955
7950
|
};
|
|
7956
7951
|
type ConversationRenamedLiveEvent = {
|
|
7957
7952
|
type: "conversation.renamed";
|
|
7958
|
-
workspaceId: string;
|
|
7959
7953
|
sessionId: string;
|
|
7960
7954
|
title: string;
|
|
7961
7955
|
version: number;
|
|
@@ -7980,8 +7974,7 @@ type LiveEventEnvelope = {
|
|
|
7980
7974
|
type: string;
|
|
7981
7975
|
payload: UnknownRecord;
|
|
7982
7976
|
occurredAt: string;
|
|
7983
|
-
tenantId
|
|
7984
|
-
workspaceId?: string;
|
|
7977
|
+
tenantId: string;
|
|
7985
7978
|
actorId?: string | null;
|
|
7986
7979
|
correlationId?: string | null;
|
|
7987
7980
|
schemaVersion?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -7797,7 +7797,7 @@ interface DomainEvent<T extends EventType = EventType> {
|
|
|
7797
7797
|
type LiveChannelKind = "workspace" | "object" | "record" | "view" | "agent" | "user" | "conversation";
|
|
7798
7798
|
type LiveChannel = {
|
|
7799
7799
|
kind: "workspace";
|
|
7800
|
-
|
|
7800
|
+
tenantId: string;
|
|
7801
7801
|
} | {
|
|
7802
7802
|
kind: "object";
|
|
7803
7803
|
objectId: string;
|
|
@@ -7810,7 +7810,7 @@ type LiveChannel = {
|
|
|
7810
7810
|
viewId: string;
|
|
7811
7811
|
} | {
|
|
7812
7812
|
kind: "agent";
|
|
7813
|
-
|
|
7813
|
+
tenantId: string;
|
|
7814
7814
|
} | {
|
|
7815
7815
|
kind: "user";
|
|
7816
7816
|
actorId: string;
|
|
@@ -7856,7 +7856,6 @@ type ViewProjectionStaleLiveEvent = {
|
|
|
7856
7856
|
};
|
|
7857
7857
|
type AgentSessionPatchLiveEvent = {
|
|
7858
7858
|
type: "agent.session.patch";
|
|
7859
|
-
workspaceId: string;
|
|
7860
7859
|
sessionId: string;
|
|
7861
7860
|
patch: Record<string, unknown>;
|
|
7862
7861
|
version: number;
|
|
@@ -7870,7 +7869,6 @@ type AgentSessionPatchLiveEvent = {
|
|
|
7870
7869
|
};
|
|
7871
7870
|
type AgentUnreadPatchLiveEvent = {
|
|
7872
7871
|
type: "agent.unread.patch";
|
|
7873
|
-
workspaceId: string;
|
|
7874
7872
|
targetActorId: string;
|
|
7875
7873
|
sessionId: string;
|
|
7876
7874
|
unreadCount: number;
|
|
@@ -7929,7 +7927,6 @@ type LiveNotificationRecipientPatch = {
|
|
|
7929
7927
|
};
|
|
7930
7928
|
type NotificationCreatedLiveEvent = {
|
|
7931
7929
|
type: "notification.created";
|
|
7932
|
-
workspaceId: string;
|
|
7933
7930
|
notification: LiveNotification;
|
|
7934
7931
|
recipients: LiveNotificationRecipient[];
|
|
7935
7932
|
version: number;
|
|
@@ -7937,7 +7934,6 @@ type NotificationCreatedLiveEvent = {
|
|
|
7937
7934
|
};
|
|
7938
7935
|
type NotificationRecipientPatchLiveEvent = {
|
|
7939
7936
|
type: "notification.recipient.patch";
|
|
7940
|
-
workspaceId: string;
|
|
7941
7937
|
recipientId: string;
|
|
7942
7938
|
recipientActorId: string;
|
|
7943
7939
|
patch: LiveNotificationRecipientPatch;
|
|
@@ -7946,7 +7942,6 @@ type NotificationRecipientPatchLiveEvent = {
|
|
|
7946
7942
|
};
|
|
7947
7943
|
type NotificationCountPatchLiveEvent = {
|
|
7948
7944
|
type: "notification.count.patch";
|
|
7949
|
-
workspaceId: string;
|
|
7950
7945
|
targetActorId: string;
|
|
7951
7946
|
unread: number;
|
|
7952
7947
|
pendingWork: number;
|
|
@@ -7955,7 +7950,6 @@ type NotificationCountPatchLiveEvent = {
|
|
|
7955
7950
|
};
|
|
7956
7951
|
type ConversationRenamedLiveEvent = {
|
|
7957
7952
|
type: "conversation.renamed";
|
|
7958
|
-
workspaceId: string;
|
|
7959
7953
|
sessionId: string;
|
|
7960
7954
|
title: string;
|
|
7961
7955
|
version: number;
|
|
@@ -7980,8 +7974,7 @@ type LiveEventEnvelope = {
|
|
|
7980
7974
|
type: string;
|
|
7981
7975
|
payload: UnknownRecord;
|
|
7982
7976
|
occurredAt: string;
|
|
7983
|
-
tenantId
|
|
7984
|
-
workspaceId?: string;
|
|
7977
|
+
tenantId: string;
|
|
7985
7978
|
actorId?: string | null;
|
|
7986
7979
|
correlationId?: string | null;
|
|
7987
7980
|
schemaVersion?: number;
|
package/dist/index.js
CHANGED
|
@@ -5233,7 +5233,7 @@ var formRegistry = new FormRegistry();
|
|
|
5233
5233
|
function liveChannelKey(channel) {
|
|
5234
5234
|
switch (channel.kind) {
|
|
5235
5235
|
case "workspace":
|
|
5236
|
-
return `workspace:${encodeURIComponent(channel.
|
|
5236
|
+
return `workspace:${encodeURIComponent(channel.tenantId)}`;
|
|
5237
5237
|
case "object":
|
|
5238
5238
|
return `object:${encodeURIComponent(channel.objectId)}`;
|
|
5239
5239
|
case "record":
|
|
@@ -5241,7 +5241,7 @@ function liveChannelKey(channel) {
|
|
|
5241
5241
|
case "view":
|
|
5242
5242
|
return `view:${encodeURIComponent(channel.viewId)}`;
|
|
5243
5243
|
case "agent":
|
|
5244
|
-
return `agent:${encodeURIComponent(channel.
|
|
5244
|
+
return `agent:${encodeURIComponent(channel.tenantId)}`;
|
|
5245
5245
|
case "user":
|
|
5246
5246
|
return `user:${encodeURIComponent(channel.actorId)}`;
|
|
5247
5247
|
case "conversation":
|
|
@@ -5258,8 +5258,8 @@ function decodeLiveChannelPart(part) {
|
|
|
5258
5258
|
function parseLiveChannelKey(key) {
|
|
5259
5259
|
const parts = key.split(":");
|
|
5260
5260
|
if (parts[0] === "workspace" && parts.length === 2 && parts[1]) {
|
|
5261
|
-
const
|
|
5262
|
-
return
|
|
5261
|
+
const tenantId = decodeLiveChannelPart(parts[1]);
|
|
5262
|
+
return tenantId ? { kind: "workspace", tenantId } : null;
|
|
5263
5263
|
}
|
|
5264
5264
|
if (parts[0] === "object" && parts.length === 2 && parts[1]) {
|
|
5265
5265
|
const objectId = decodeLiveChannelPart(parts[1]);
|
|
@@ -5280,8 +5280,8 @@ function parseLiveChannelKey(key) {
|
|
|
5280
5280
|
return viewId ? { kind: "view", viewId } : null;
|
|
5281
5281
|
}
|
|
5282
5282
|
if (parts[0] === "agent" && parts.length === 2 && parts[1]) {
|
|
5283
|
-
const
|
|
5284
|
-
return
|
|
5283
|
+
const tenantId = decodeLiveChannelPart(parts[1]);
|
|
5284
|
+
return tenantId ? { kind: "agent", tenantId } : null;
|
|
5285
5285
|
}
|
|
5286
5286
|
if (parts[0] === "user" && parts.length === 2 && parts[1]) {
|
|
5287
5287
|
const actorId = decodeLiveChannelPart(parts[1]);
|
|
@@ -5481,10 +5481,10 @@ function isViewProjectionStalePayload(payload) {
|
|
|
5481
5481
|
return payload.type === "view.projection.stale" && hasString(payload, "viewId") && isOneOf(payload.reason, VIEW_PROJECTION_STALE_REASONS);
|
|
5482
5482
|
}
|
|
5483
5483
|
function isAgentSessionPatchPayload(payload) {
|
|
5484
|
-
return payload.type === "agent.session.patch" && hasString(payload, "
|
|
5484
|
+
return payload.type === "agent.session.patch" && hasString(payload, "sessionId") && isRecord(payload.patch) && hasVersion(payload, "version") && hasString(payload, "updatedAt");
|
|
5485
5485
|
}
|
|
5486
5486
|
function isAgentUnreadPatchPayload(payload) {
|
|
5487
|
-
return payload.type === "agent.unread.patch" && hasString(payload, "
|
|
5487
|
+
return payload.type === "agent.unread.patch" && hasString(payload, "targetActorId") && hasString(payload, "sessionId") && hasVersion(payload, "unreadCount") && hasVersion(payload, "version") && hasString(payload, "updatedAt") && (!Object.hasOwn(payload, "session") || isRecord(payload.session) && payload.session.id === payload.sessionId);
|
|
5488
5488
|
}
|
|
5489
5489
|
function isLiveNotification(value) {
|
|
5490
5490
|
return isRecord(value) && hasString(value, "id") && hasString(value, "tenantId") && hasOptional(value, "senderActorId", isString) && hasOptional(value, "rootActorId", isString) && hasOptional(value, "triggeredByActorId", isString) && isNotificationKind(value.kind) && hasString(value, "type") && hasOptional(value, "subject", isNotificationSubject) && hasString(value, "title") && hasOptional(value, "summary", isString) && isRecord(value.payload) && isNotificationPriority(value.priority) && isNotificationSensitivity(value.sensitivity) && hasOptional(value, "threadKey", isString) && hasOptional(value, "idempotencyKey", isString) && hasOptional(value, "expiresAt", isIsoDateString) && hasIsoDateString(value, "createdAt") && hasIsoDateString(value, "updatedAt");
|
|
@@ -5502,18 +5502,18 @@ function isNotificationRecipientPatch(value) {
|
|
|
5502
5502
|
}
|
|
5503
5503
|
function isNotificationCreatedPayload(payload) {
|
|
5504
5504
|
const notification = isLiveNotification(payload.notification) ? payload.notification : null;
|
|
5505
|
-
return payload.type === "notification.created" &&
|
|
5505
|
+
return payload.type === "notification.created" && notification !== null && Array.isArray(payload.recipients) && payload.recipients.length > 0 && payload.recipients.every(
|
|
5506
5506
|
(recipient) => isLiveNotificationRecipient(recipient) && recipient.notificationId === notification.id
|
|
5507
5507
|
) && hasVersion(payload, "version") && hasIsoDateString(payload, "updatedAt");
|
|
5508
5508
|
}
|
|
5509
5509
|
function isNotificationRecipientPatchPayload(payload) {
|
|
5510
|
-
return payload.type === "notification.recipient.patch" && hasString(payload, "
|
|
5510
|
+
return payload.type === "notification.recipient.patch" && hasString(payload, "recipientId") && hasString(payload, "recipientActorId") && isNotificationRecipientPatch(payload.patch) && hasVersion(payload, "version") && hasIsoDateString(payload, "updatedAt");
|
|
5511
5511
|
}
|
|
5512
5512
|
function isNotificationCountPatchPayload(payload) {
|
|
5513
|
-
return payload.type === "notification.count.patch" && hasString(payload, "
|
|
5513
|
+
return payload.type === "notification.count.patch" && hasString(payload, "targetActorId") && hasVersion(payload, "unread") && hasVersion(payload, "pendingWork") && hasVersion(payload, "version") && hasIsoDateString(payload, "updatedAt");
|
|
5514
5514
|
}
|
|
5515
5515
|
function isConversationRenamedPayload(payload) {
|
|
5516
|
-
return payload.type === "conversation.renamed" && hasString(payload, "
|
|
5516
|
+
return payload.type === "conversation.renamed" && hasString(payload, "sessionId") && hasString(payload, "title") && hasVersion(payload, "version") && hasString(payload, "updatedAt");
|
|
5517
5517
|
}
|
|
5518
5518
|
function isChannelRevokedPayload(payload) {
|
|
5519
5519
|
return payload.type === "channel.revoked" && hasString(payload, "channel") && isOneOf(payload.reason, CHANNEL_REVOKED_REASONS);
|
|
@@ -5532,7 +5532,7 @@ function getLiveProtocolPayloadChannel(payload) {
|
|
|
5532
5532
|
}
|
|
5533
5533
|
function isLiveEventEnvelope(payload) {
|
|
5534
5534
|
if (!isRecord2(payload)) return false;
|
|
5535
|
-
return typeof payload.id === "string" && isLiveStreamCursor(payload.id) && typeof payload.channel === "string" && typeof payload.type === "string" && typeof payload.occurredAt === "string" && isRecord2(payload.payload);
|
|
5535
|
+
return typeof payload.id === "string" && isLiveStreamCursor(payload.id) && typeof payload.channel === "string" && typeof payload.type === "string" && typeof payload.tenantId === "string" && payload.tenantId.length > 0 && typeof payload.occurredAt === "string" && isRecord2(payload.payload);
|
|
5536
5536
|
}
|
|
5537
5537
|
function parseLiveSubscribePayload(payload) {
|
|
5538
5538
|
if (!isRecord2(payload)) return null;
|
package/dist/index.mjs
CHANGED
|
@@ -5230,7 +5230,7 @@ var formRegistry = new FormRegistry();
|
|
|
5230
5230
|
function liveChannelKey(channel) {
|
|
5231
5231
|
switch (channel.kind) {
|
|
5232
5232
|
case "workspace":
|
|
5233
|
-
return `workspace:${encodeURIComponent(channel.
|
|
5233
|
+
return `workspace:${encodeURIComponent(channel.tenantId)}`;
|
|
5234
5234
|
case "object":
|
|
5235
5235
|
return `object:${encodeURIComponent(channel.objectId)}`;
|
|
5236
5236
|
case "record":
|
|
@@ -5238,7 +5238,7 @@ function liveChannelKey(channel) {
|
|
|
5238
5238
|
case "view":
|
|
5239
5239
|
return `view:${encodeURIComponent(channel.viewId)}`;
|
|
5240
5240
|
case "agent":
|
|
5241
|
-
return `agent:${encodeURIComponent(channel.
|
|
5241
|
+
return `agent:${encodeURIComponent(channel.tenantId)}`;
|
|
5242
5242
|
case "user":
|
|
5243
5243
|
return `user:${encodeURIComponent(channel.actorId)}`;
|
|
5244
5244
|
case "conversation":
|
|
@@ -5255,8 +5255,8 @@ function decodeLiveChannelPart(part) {
|
|
|
5255
5255
|
function parseLiveChannelKey(key) {
|
|
5256
5256
|
const parts = key.split(":");
|
|
5257
5257
|
if (parts[0] === "workspace" && parts.length === 2 && parts[1]) {
|
|
5258
|
-
const
|
|
5259
|
-
return
|
|
5258
|
+
const tenantId = decodeLiveChannelPart(parts[1]);
|
|
5259
|
+
return tenantId ? { kind: "workspace", tenantId } : null;
|
|
5260
5260
|
}
|
|
5261
5261
|
if (parts[0] === "object" && parts.length === 2 && parts[1]) {
|
|
5262
5262
|
const objectId = decodeLiveChannelPart(parts[1]);
|
|
@@ -5277,8 +5277,8 @@ function parseLiveChannelKey(key) {
|
|
|
5277
5277
|
return viewId ? { kind: "view", viewId } : null;
|
|
5278
5278
|
}
|
|
5279
5279
|
if (parts[0] === "agent" && parts.length === 2 && parts[1]) {
|
|
5280
|
-
const
|
|
5281
|
-
return
|
|
5280
|
+
const tenantId = decodeLiveChannelPart(parts[1]);
|
|
5281
|
+
return tenantId ? { kind: "agent", tenantId } : null;
|
|
5282
5282
|
}
|
|
5283
5283
|
if (parts[0] === "user" && parts.length === 2 && parts[1]) {
|
|
5284
5284
|
const actorId = decodeLiveChannelPart(parts[1]);
|
|
@@ -5478,10 +5478,10 @@ function isViewProjectionStalePayload(payload) {
|
|
|
5478
5478
|
return payload.type === "view.projection.stale" && hasString(payload, "viewId") && isOneOf(payload.reason, VIEW_PROJECTION_STALE_REASONS);
|
|
5479
5479
|
}
|
|
5480
5480
|
function isAgentSessionPatchPayload(payload) {
|
|
5481
|
-
return payload.type === "agent.session.patch" && hasString(payload, "
|
|
5481
|
+
return payload.type === "agent.session.patch" && hasString(payload, "sessionId") && isRecord(payload.patch) && hasVersion(payload, "version") && hasString(payload, "updatedAt");
|
|
5482
5482
|
}
|
|
5483
5483
|
function isAgentUnreadPatchPayload(payload) {
|
|
5484
|
-
return payload.type === "agent.unread.patch" && hasString(payload, "
|
|
5484
|
+
return payload.type === "agent.unread.patch" && hasString(payload, "targetActorId") && hasString(payload, "sessionId") && hasVersion(payload, "unreadCount") && hasVersion(payload, "version") && hasString(payload, "updatedAt") && (!Object.hasOwn(payload, "session") || isRecord(payload.session) && payload.session.id === payload.sessionId);
|
|
5485
5485
|
}
|
|
5486
5486
|
function isLiveNotification(value) {
|
|
5487
5487
|
return isRecord(value) && hasString(value, "id") && hasString(value, "tenantId") && hasOptional(value, "senderActorId", isString) && hasOptional(value, "rootActorId", isString) && hasOptional(value, "triggeredByActorId", isString) && isNotificationKind(value.kind) && hasString(value, "type") && hasOptional(value, "subject", isNotificationSubject) && hasString(value, "title") && hasOptional(value, "summary", isString) && isRecord(value.payload) && isNotificationPriority(value.priority) && isNotificationSensitivity(value.sensitivity) && hasOptional(value, "threadKey", isString) && hasOptional(value, "idempotencyKey", isString) && hasOptional(value, "expiresAt", isIsoDateString) && hasIsoDateString(value, "createdAt") && hasIsoDateString(value, "updatedAt");
|
|
@@ -5499,18 +5499,18 @@ function isNotificationRecipientPatch(value) {
|
|
|
5499
5499
|
}
|
|
5500
5500
|
function isNotificationCreatedPayload(payload) {
|
|
5501
5501
|
const notification = isLiveNotification(payload.notification) ? payload.notification : null;
|
|
5502
|
-
return payload.type === "notification.created" &&
|
|
5502
|
+
return payload.type === "notification.created" && notification !== null && Array.isArray(payload.recipients) && payload.recipients.length > 0 && payload.recipients.every(
|
|
5503
5503
|
(recipient) => isLiveNotificationRecipient(recipient) && recipient.notificationId === notification.id
|
|
5504
5504
|
) && hasVersion(payload, "version") && hasIsoDateString(payload, "updatedAt");
|
|
5505
5505
|
}
|
|
5506
5506
|
function isNotificationRecipientPatchPayload(payload) {
|
|
5507
|
-
return payload.type === "notification.recipient.patch" && hasString(payload, "
|
|
5507
|
+
return payload.type === "notification.recipient.patch" && hasString(payload, "recipientId") && hasString(payload, "recipientActorId") && isNotificationRecipientPatch(payload.patch) && hasVersion(payload, "version") && hasIsoDateString(payload, "updatedAt");
|
|
5508
5508
|
}
|
|
5509
5509
|
function isNotificationCountPatchPayload(payload) {
|
|
5510
|
-
return payload.type === "notification.count.patch" && hasString(payload, "
|
|
5510
|
+
return payload.type === "notification.count.patch" && hasString(payload, "targetActorId") && hasVersion(payload, "unread") && hasVersion(payload, "pendingWork") && hasVersion(payload, "version") && hasIsoDateString(payload, "updatedAt");
|
|
5511
5511
|
}
|
|
5512
5512
|
function isConversationRenamedPayload(payload) {
|
|
5513
|
-
return payload.type === "conversation.renamed" && hasString(payload, "
|
|
5513
|
+
return payload.type === "conversation.renamed" && hasString(payload, "sessionId") && hasString(payload, "title") && hasVersion(payload, "version") && hasString(payload, "updatedAt");
|
|
5514
5514
|
}
|
|
5515
5515
|
function isChannelRevokedPayload(payload) {
|
|
5516
5516
|
return payload.type === "channel.revoked" && hasString(payload, "channel") && isOneOf(payload.reason, CHANNEL_REVOKED_REASONS);
|
|
@@ -5529,7 +5529,7 @@ function getLiveProtocolPayloadChannel(payload) {
|
|
|
5529
5529
|
}
|
|
5530
5530
|
function isLiveEventEnvelope(payload) {
|
|
5531
5531
|
if (!isRecord2(payload)) return false;
|
|
5532
|
-
return typeof payload.id === "string" && isLiveStreamCursor(payload.id) && typeof payload.channel === "string" && typeof payload.type === "string" && typeof payload.occurredAt === "string" && isRecord2(payload.payload);
|
|
5532
|
+
return typeof payload.id === "string" && isLiveStreamCursor(payload.id) && typeof payload.channel === "string" && typeof payload.type === "string" && typeof payload.tenantId === "string" && payload.tenantId.length > 0 && typeof payload.occurredAt === "string" && isRecord2(payload.payload);
|
|
5533
5533
|
}
|
|
5534
5534
|
function parseLiveSubscribePayload(payload) {
|
|
5535
5535
|
if (!isRecord2(payload)) return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stndrds/schema",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.241",
|
|
4
4
|
"description": "Standard schema definitions and utilities",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"@standard-schema/spec": "^1.1.0",
|
|
121
121
|
"libphonenumber-js": "^1.12.31",
|
|
122
122
|
"zod": "^4.2.1",
|
|
123
|
-
"@stndrds/constants": "1.0.0-alpha.
|
|
123
|
+
"@stndrds/constants": "1.0.0-alpha.241"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@types/node": "^25.0.3",
|