| ... | @@ -769,20 +769,6 @@ const EventBaseFields = { | ... | @@ -769,20 +769,6 @@ const EventBaseFields = { |
| 769 | metadata: OrchestrationEventMetadata, | 769 | metadata: OrchestrationEventMetadata, |
| 770 | } as const; | 770 | } as const; |
| 771 | | 771 | |
| 772 | const PersistedEventBaseFields = { | | |
| 773 | sequence: NonNegativeInt, | | |
| 774 | eventId: EventId, | | |
| 775 | aggregateKind: OrchestrationAggregateKind, | | |
| 776 | streamId: Schema.Union([ProjectId, ThreadId]), | | |
| 777 | streamVersion: NonNegativeInt, | | |
| 778 | occurredAt: IsoDateTime, | | |
| 779 | commandId: Schema.NullOr(CommandId), | | |
| 780 | causationEventId: Schema.NullOr(EventId), | | |
| 781 | correlationId: Schema.NullOr(CommandId), | | |
| 782 | actorKind: OrchestrationActorKind, | | |
| 783 | metadata: OrchestrationEventMetadata, | | |
| 784 | } as const; | | |
| 785 | | | |
| 786 | export const OrchestrationEvent = Schema.Union([ | 772 | export const OrchestrationEvent = Schema.Union([ |
| 787 | Schema.Struct({ | 773 | Schema.Struct({ |
| 788 | ...EventBaseFields, | 774 | ...EventBaseFields, |
| ... | @@ -887,110 +873,6 @@ export const OrchestrationEvent = Schema.Union([ | ... | @@ -887,110 +873,6 @@ export const OrchestrationEvent = Schema.Union([ |
| 887 | ]); | 873 | ]); |
| 888 | export type OrchestrationEvent = typeof OrchestrationEvent.Type; | 874 | export type OrchestrationEvent = typeof OrchestrationEvent.Type; |
| 889 | | 875 | |
| 890 | export const OrchestrationPersistedEvent = Schema.Union([ | | |
| 891 | Schema.Struct({ | | |
| 892 | ...PersistedEventBaseFields, | | |
| 893 | eventType: Schema.Literal("project.created"), | | |
| 894 | payload: ProjectCreatedPayload, | | |
| 895 | }), | | |
| 896 | Schema.Struct({ | | |
| 897 | ...PersistedEventBaseFields, | | |
| 898 | eventType: Schema.Literal("project.meta-updated"), | | |
| 899 | payload: ProjectMetaUpdatedPayload, | | |
| 900 | }), | | |
| 901 | Schema.Struct({ | | |
| 902 | ...PersistedEventBaseFields, | | |
| 903 | eventType: Schema.Literal("project.deleted"), | | |
| 904 | payload: ProjectDeletedPayload, | | |
| 905 | }), | | |
| 906 | Schema.Struct({ | | |
| 907 | ...PersistedEventBaseFields, | | |
| 908 | eventType: Schema.Literal("thread.created"), | | |
| 909 | payload: ThreadCreatedPayload, | | |
| 910 | }), | | |
| 911 | Schema.Struct({ | | |
| 912 | ...PersistedEventBaseFields, | | |
| 913 | eventType: Schema.Literal("thread.deleted"), | | |
| 914 | payload: ThreadDeletedPayload, | | |
| 915 | }), | | |
| 916 | Schema.Struct({ | | |
| 917 | ...PersistedEventBaseFields, | | |
| 918 | eventType: Schema.Literal("thread.meta-updated"), | | |
| 919 | payload: ThreadMetaUpdatedPayload, | | |
| 920 | }), | | |
| 921 | Schema.Struct({ | | |
| 922 | ...PersistedEventBaseFields, | | |
| 923 | eventType: Schema.Literal("thread.runtime-mode-set"), | | |
| 924 | payload: ThreadRuntimeModeSetPayload, | | |
| 925 | }), | | |
| 926 | Schema.Struct({ | | |
| 927 | ...PersistedEventBaseFields, | | |
| 928 | eventType: Schema.Literal("thread.interaction-mode-set"), | | |
| 929 | payload: ThreadInteractionModeSetPayload, | | |
| 930 | }), | | |
| 931 | Schema.Struct({ | | |
| 932 | ...PersistedEventBaseFields, | | |
| 933 | eventType: Schema.Literal("thread.message-sent"), | | |
| 934 | payload: ThreadMessageSentPayload, | | |
| 935 | }), | | |
| 936 | Schema.Struct({ | | |
| 937 | ...PersistedEventBaseFields, | | |
| 938 | eventType: Schema.Literal("thread.turn-start-requested"), | | |
| 939 | payload: ThreadTurnStartRequestedPayload, | | |
| 940 | }), | | |
| 941 | Schema.Struct({ | | |
| 942 | ...PersistedEventBaseFields, | | |
| 943 | eventType: Schema.Literal("thread.turn-interrupt-requested"), | | |
| 944 | payload: ThreadTurnInterruptRequestedPayload, | | |
| 945 | }), | | |
| 946 | Schema.Struct({ | | |
| 947 | ...PersistedEventBaseFields, | | |
| 948 | eventType: Schema.Literal("thread.approval-response-requested"), | | |
| 949 | payload: ThreadApprovalResponseRequestedPayload, | | |
| 950 | }), | | |
| 951 | Schema.Struct({ | | |
| 952 | ...PersistedEventBaseFields, | | |
| 953 | eventType: Schema.Literal("thread.user-input-response-requested"), | | |
| 954 | payload: ThreadUserInputResponseRequestedPayload, | | |
| 955 | }), | | |
| 956 | Schema.Struct({ | | |
| 957 | ...PersistedEventBaseFields, | | |
| 958 | eventType: Schema.Literal("thread.checkpoint-revert-requested"), | | |
| 959 | payload: ThreadCheckpointRevertRequestedPayload, | | |
| 960 | }), | | |
| 961 | Schema.Struct({ | | |
| 962 | ...PersistedEventBaseFields, | | |
| 963 | eventType: Schema.Literal("thread.reverted"), | | |
| 964 | payload: ThreadRevertedPayload, | | |
| 965 | }), | | |
| 966 | Schema.Struct({ | | |
| 967 | ...PersistedEventBaseFields, | | |
| 968 | eventType: Schema.Literal("thread.session-stop-requested"), | | |
| 969 | payload: ThreadSessionStopRequestedPayload, | | |
| 970 | }), | | |
| 971 | Schema.Struct({ | | |
| 972 | ...PersistedEventBaseFields, | | |
| 973 | eventType: Schema.Literal("thread.session-set"), | | |
| 974 | payload: ThreadSessionSetPayload, | | |
| 975 | }), | | |
| 976 | Schema.Struct({ | | |
| 977 | ...PersistedEventBaseFields, | | |
| 978 | eventType: Schema.Literal("thread.proposed-plan-upserted"), | | |
| 979 | payload: ThreadProposedPlanUpsertedPayload, | | |
| 980 | }), | | |
| 981 | Schema.Struct({ | | |
| 982 | ...PersistedEventBaseFields, | | |
| 983 | eventType: Schema.Literal("thread.turn-diff-completed"), | | |
| 984 | payload: ThreadTurnDiffCompletedPayload, | | |
| 985 | }), | | |
| 986 | Schema.Struct({ | | |
| 987 | ...PersistedEventBaseFields, | | |
| 988 | eventType: Schema.Literal("thread.activity-appended"), | | |
| 989 | payload: ThreadActivityAppendedPayload, | | |
| 990 | }), | | |
| 991 | ]); | | |
| 992 | export type OrchestrationPersistedEvent = typeof OrchestrationPersistedEvent.Type; | | |
| 993 | | | |
| 994 | export const OrchestrationCommandReceiptStatus = Schema.Literals(["accepted", "rejected"]); | 876 | export const OrchestrationCommandReceiptStatus = Schema.Literals(["accepted", "rejected"]); |
| 995 | export type OrchestrationCommandReceiptStatus = typeof OrchestrationCommandReceiptStatus.Type; | 877 | export type OrchestrationCommandReceiptStatus = typeof OrchestrationCommandReceiptStatus.Type; |
| 996 | | 878 | |