@valentine-efagene/qshelter-common 2.0.65 → 2.0.67

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.
Files changed (36) hide show
  1. package/dist/generated/client/browser.d.ts +29 -0
  2. package/dist/generated/client/client.d.ts +29 -0
  3. package/dist/generated/client/commonInputTypes.d.ts +120 -0
  4. package/dist/generated/client/enums.d.ts +32 -0
  5. package/dist/generated/client/enums.js +28 -0
  6. package/dist/generated/client/internal/class.d.ts +55 -0
  7. package/dist/generated/client/internal/class.js +2 -2
  8. package/dist/generated/client/internal/prismaNamespace.d.ts +475 -1
  9. package/dist/generated/client/internal/prismaNamespace.js +113 -0
  10. package/dist/generated/client/internal/prismaNamespaceBrowser.d.ts +123 -0
  11. package/dist/generated/client/internal/prismaNamespaceBrowser.js +113 -0
  12. package/dist/generated/client/models/EventChannel.d.ts +1305 -0
  13. package/dist/generated/client/models/EventChannel.js +1 -0
  14. package/dist/generated/client/models/EventHandler.d.ts +1749 -0
  15. package/dist/generated/client/models/EventHandler.js +1 -0
  16. package/dist/generated/client/models/EventHandlerExecution.d.ts +1525 -0
  17. package/dist/generated/client/models/EventHandlerExecution.js +1 -0
  18. package/dist/generated/client/models/EventType.d.ts +1653 -0
  19. package/dist/generated/client/models/EventType.js +1 -0
  20. package/dist/generated/client/models/Tenant.d.ts +796 -0
  21. package/dist/generated/client/models/WorkflowEvent.d.ts +1654 -0
  22. package/dist/generated/client/models/WorkflowEvent.js +1 -0
  23. package/dist/generated/client/models/index.d.ts +5 -0
  24. package/dist/generated/client/models/index.js +5 -0
  25. package/dist/generated/client/models.d.ts +5 -0
  26. package/dist/src/events/event-config.service.d.ts +123 -0
  27. package/dist/src/events/event-config.service.js +416 -0
  28. package/dist/src/events/index.d.ts +3 -0
  29. package/dist/src/events/index.js +5 -0
  30. package/dist/src/events/workflow-event.service.d.ts +189 -0
  31. package/dist/src/events/workflow-event.service.js +588 -0
  32. package/dist/src/events/workflow-types.d.ts +288 -0
  33. package/dist/src/events/workflow-types.js +14 -0
  34. package/package.json +1 -1
  35. package/prisma/migrations/20260105151535_add_event_workflow_system/migration.sql +132 -0
  36. package/prisma/schema.prisma +271 -0
@@ -232,6 +232,35 @@ export type PaymentMethodChangeRequest = Prisma.PaymentMethodChangeRequestModel;
232
232
  *
233
233
  */
234
234
  export type DocumentRequirementRule = Prisma.DocumentRequirementRuleModel;
235
+ /**
236
+ * Model EventChannel
237
+ * Event Channel - A logical grouping of events
238
+ * Channels help organize events and route them to appropriate handlers
239
+ */
240
+ export type EventChannel = Prisma.EventChannelModel;
241
+ /**
242
+ * Model EventType
243
+ * Event Type - Defines a type of event that can occur
244
+ * Each event type belongs to a channel and can have multiple handlers
245
+ */
246
+ export type EventType = Prisma.EventTypeModel;
247
+ /**
248
+ * Model EventHandler
249
+ * Event Handler - Defines what should happen when an event fires
250
+ * Handlers can be internal (call a service), external (webhook), or workflow triggers
251
+ */
252
+ export type EventHandler = Prisma.EventHandlerModel;
253
+ /**
254
+ * Model WorkflowEvent
255
+ * Workflow Event - An actual event instance that occurred
256
+ * This is the audit log of all events in the system
257
+ */
258
+ export type WorkflowEvent = Prisma.WorkflowEventModel;
259
+ /**
260
+ * Model EventHandlerExecution
261
+ * Event Handler Execution - Log of a handler processing an event
262
+ */
263
+ export type EventHandlerExecution = Prisma.EventHandlerExecutionModel;
235
264
  /**
236
265
  * Model DomainEvent
237
266
  *
@@ -249,6 +249,35 @@ export type PaymentMethodChangeRequest = Prisma.PaymentMethodChangeRequestModel;
249
249
  *
250
250
  */
251
251
  export type DocumentRequirementRule = Prisma.DocumentRequirementRuleModel;
252
+ /**
253
+ * Model EventChannel
254
+ * Event Channel - A logical grouping of events
255
+ * Channels help organize events and route them to appropriate handlers
256
+ */
257
+ export type EventChannel = Prisma.EventChannelModel;
258
+ /**
259
+ * Model EventType
260
+ * Event Type - Defines a type of event that can occur
261
+ * Each event type belongs to a channel and can have multiple handlers
262
+ */
263
+ export type EventType = Prisma.EventTypeModel;
264
+ /**
265
+ * Model EventHandler
266
+ * Event Handler - Defines what should happen when an event fires
267
+ * Handlers can be internal (call a service), external (webhook), or workflow triggers
268
+ */
269
+ export type EventHandler = Prisma.EventHandlerModel;
270
+ /**
271
+ * Model WorkflowEvent
272
+ * Workflow Event - An actual event instance that occurred
273
+ * This is the audit log of all events in the system
274
+ */
275
+ export type WorkflowEvent = Prisma.WorkflowEventModel;
276
+ /**
277
+ * Model EventHandlerExecution
278
+ * Event Handler Execution - Log of a handler processing an event
279
+ */
280
+ export type EventHandlerExecution = Prisma.EventHandlerExecutionModel;
252
281
  /**
253
282
  * Model DomainEvent
254
283
  *
@@ -609,6 +609,66 @@ export type EnumDocumentRequirementContextWithAggregatesFilter<$PrismaModel = ne
609
609
  _min?: Prisma.NestedEnumDocumentRequirementContextFilter<$PrismaModel>;
610
610
  _max?: Prisma.NestedEnumDocumentRequirementContextFilter<$PrismaModel>;
611
611
  };
612
+ export type EnumEventHandlerTypeFilter<$PrismaModel = never> = {
613
+ equals?: $Enums.EventHandlerType | Prisma.EnumEventHandlerTypeFieldRefInput<$PrismaModel>;
614
+ in?: $Enums.EventHandlerType[];
615
+ notIn?: $Enums.EventHandlerType[];
616
+ not?: Prisma.NestedEnumEventHandlerTypeFilter<$PrismaModel> | $Enums.EventHandlerType;
617
+ };
618
+ export type EnumEventHandlerTypeWithAggregatesFilter<$PrismaModel = never> = {
619
+ equals?: $Enums.EventHandlerType | Prisma.EnumEventHandlerTypeFieldRefInput<$PrismaModel>;
620
+ in?: $Enums.EventHandlerType[];
621
+ notIn?: $Enums.EventHandlerType[];
622
+ not?: Prisma.NestedEnumEventHandlerTypeWithAggregatesFilter<$PrismaModel> | $Enums.EventHandlerType;
623
+ _count?: Prisma.NestedIntFilter<$PrismaModel>;
624
+ _min?: Prisma.NestedEnumEventHandlerTypeFilter<$PrismaModel>;
625
+ _max?: Prisma.NestedEnumEventHandlerTypeFilter<$PrismaModel>;
626
+ };
627
+ export type EnumActorTypeFilter<$PrismaModel = never> = {
628
+ equals?: $Enums.ActorType | Prisma.EnumActorTypeFieldRefInput<$PrismaModel>;
629
+ in?: $Enums.ActorType[];
630
+ notIn?: $Enums.ActorType[];
631
+ not?: Prisma.NestedEnumActorTypeFilter<$PrismaModel> | $Enums.ActorType;
632
+ };
633
+ export type EnumWorkflowEventStatusFilter<$PrismaModel = never> = {
634
+ equals?: $Enums.WorkflowEventStatus | Prisma.EnumWorkflowEventStatusFieldRefInput<$PrismaModel>;
635
+ in?: $Enums.WorkflowEventStatus[];
636
+ notIn?: $Enums.WorkflowEventStatus[];
637
+ not?: Prisma.NestedEnumWorkflowEventStatusFilter<$PrismaModel> | $Enums.WorkflowEventStatus;
638
+ };
639
+ export type EnumActorTypeWithAggregatesFilter<$PrismaModel = never> = {
640
+ equals?: $Enums.ActorType | Prisma.EnumActorTypeFieldRefInput<$PrismaModel>;
641
+ in?: $Enums.ActorType[];
642
+ notIn?: $Enums.ActorType[];
643
+ not?: Prisma.NestedEnumActorTypeWithAggregatesFilter<$PrismaModel> | $Enums.ActorType;
644
+ _count?: Prisma.NestedIntFilter<$PrismaModel>;
645
+ _min?: Prisma.NestedEnumActorTypeFilter<$PrismaModel>;
646
+ _max?: Prisma.NestedEnumActorTypeFilter<$PrismaModel>;
647
+ };
648
+ export type EnumWorkflowEventStatusWithAggregatesFilter<$PrismaModel = never> = {
649
+ equals?: $Enums.WorkflowEventStatus | Prisma.EnumWorkflowEventStatusFieldRefInput<$PrismaModel>;
650
+ in?: $Enums.WorkflowEventStatus[];
651
+ notIn?: $Enums.WorkflowEventStatus[];
652
+ not?: Prisma.NestedEnumWorkflowEventStatusWithAggregatesFilter<$PrismaModel> | $Enums.WorkflowEventStatus;
653
+ _count?: Prisma.NestedIntFilter<$PrismaModel>;
654
+ _min?: Prisma.NestedEnumWorkflowEventStatusFilter<$PrismaModel>;
655
+ _max?: Prisma.NestedEnumWorkflowEventStatusFilter<$PrismaModel>;
656
+ };
657
+ export type EnumExecutionStatusFilter<$PrismaModel = never> = {
658
+ equals?: $Enums.ExecutionStatus | Prisma.EnumExecutionStatusFieldRefInput<$PrismaModel>;
659
+ in?: $Enums.ExecutionStatus[];
660
+ notIn?: $Enums.ExecutionStatus[];
661
+ not?: Prisma.NestedEnumExecutionStatusFilter<$PrismaModel> | $Enums.ExecutionStatus;
662
+ };
663
+ export type EnumExecutionStatusWithAggregatesFilter<$PrismaModel = never> = {
664
+ equals?: $Enums.ExecutionStatus | Prisma.EnumExecutionStatusFieldRefInput<$PrismaModel>;
665
+ in?: $Enums.ExecutionStatus[];
666
+ notIn?: $Enums.ExecutionStatus[];
667
+ not?: Prisma.NestedEnumExecutionStatusWithAggregatesFilter<$PrismaModel> | $Enums.ExecutionStatus;
668
+ _count?: Prisma.NestedIntFilter<$PrismaModel>;
669
+ _min?: Prisma.NestedEnumExecutionStatusFilter<$PrismaModel>;
670
+ _max?: Prisma.NestedEnumExecutionStatusFilter<$PrismaModel>;
671
+ };
612
672
  export type NestedStringFilter<$PrismaModel = never> = {
613
673
  equals?: string | Prisma.StringFieldRefInput<$PrismaModel>;
614
674
  in?: string[];
@@ -1173,3 +1233,63 @@ export type NestedEnumDocumentRequirementContextWithAggregatesFilter<$PrismaMode
1173
1233
  _min?: Prisma.NestedEnumDocumentRequirementContextFilter<$PrismaModel>;
1174
1234
  _max?: Prisma.NestedEnumDocumentRequirementContextFilter<$PrismaModel>;
1175
1235
  };
1236
+ export type NestedEnumEventHandlerTypeFilter<$PrismaModel = never> = {
1237
+ equals?: $Enums.EventHandlerType | Prisma.EnumEventHandlerTypeFieldRefInput<$PrismaModel>;
1238
+ in?: $Enums.EventHandlerType[];
1239
+ notIn?: $Enums.EventHandlerType[];
1240
+ not?: Prisma.NestedEnumEventHandlerTypeFilter<$PrismaModel> | $Enums.EventHandlerType;
1241
+ };
1242
+ export type NestedEnumEventHandlerTypeWithAggregatesFilter<$PrismaModel = never> = {
1243
+ equals?: $Enums.EventHandlerType | Prisma.EnumEventHandlerTypeFieldRefInput<$PrismaModel>;
1244
+ in?: $Enums.EventHandlerType[];
1245
+ notIn?: $Enums.EventHandlerType[];
1246
+ not?: Prisma.NestedEnumEventHandlerTypeWithAggregatesFilter<$PrismaModel> | $Enums.EventHandlerType;
1247
+ _count?: Prisma.NestedIntFilter<$PrismaModel>;
1248
+ _min?: Prisma.NestedEnumEventHandlerTypeFilter<$PrismaModel>;
1249
+ _max?: Prisma.NestedEnumEventHandlerTypeFilter<$PrismaModel>;
1250
+ };
1251
+ export type NestedEnumActorTypeFilter<$PrismaModel = never> = {
1252
+ equals?: $Enums.ActorType | Prisma.EnumActorTypeFieldRefInput<$PrismaModel>;
1253
+ in?: $Enums.ActorType[];
1254
+ notIn?: $Enums.ActorType[];
1255
+ not?: Prisma.NestedEnumActorTypeFilter<$PrismaModel> | $Enums.ActorType;
1256
+ };
1257
+ export type NestedEnumWorkflowEventStatusFilter<$PrismaModel = never> = {
1258
+ equals?: $Enums.WorkflowEventStatus | Prisma.EnumWorkflowEventStatusFieldRefInput<$PrismaModel>;
1259
+ in?: $Enums.WorkflowEventStatus[];
1260
+ notIn?: $Enums.WorkflowEventStatus[];
1261
+ not?: Prisma.NestedEnumWorkflowEventStatusFilter<$PrismaModel> | $Enums.WorkflowEventStatus;
1262
+ };
1263
+ export type NestedEnumActorTypeWithAggregatesFilter<$PrismaModel = never> = {
1264
+ equals?: $Enums.ActorType | Prisma.EnumActorTypeFieldRefInput<$PrismaModel>;
1265
+ in?: $Enums.ActorType[];
1266
+ notIn?: $Enums.ActorType[];
1267
+ not?: Prisma.NestedEnumActorTypeWithAggregatesFilter<$PrismaModel> | $Enums.ActorType;
1268
+ _count?: Prisma.NestedIntFilter<$PrismaModel>;
1269
+ _min?: Prisma.NestedEnumActorTypeFilter<$PrismaModel>;
1270
+ _max?: Prisma.NestedEnumActorTypeFilter<$PrismaModel>;
1271
+ };
1272
+ export type NestedEnumWorkflowEventStatusWithAggregatesFilter<$PrismaModel = never> = {
1273
+ equals?: $Enums.WorkflowEventStatus | Prisma.EnumWorkflowEventStatusFieldRefInput<$PrismaModel>;
1274
+ in?: $Enums.WorkflowEventStatus[];
1275
+ notIn?: $Enums.WorkflowEventStatus[];
1276
+ not?: Prisma.NestedEnumWorkflowEventStatusWithAggregatesFilter<$PrismaModel> | $Enums.WorkflowEventStatus;
1277
+ _count?: Prisma.NestedIntFilter<$PrismaModel>;
1278
+ _min?: Prisma.NestedEnumWorkflowEventStatusFilter<$PrismaModel>;
1279
+ _max?: Prisma.NestedEnumWorkflowEventStatusFilter<$PrismaModel>;
1280
+ };
1281
+ export type NestedEnumExecutionStatusFilter<$PrismaModel = never> = {
1282
+ equals?: $Enums.ExecutionStatus | Prisma.EnumExecutionStatusFieldRefInput<$PrismaModel>;
1283
+ in?: $Enums.ExecutionStatus[];
1284
+ notIn?: $Enums.ExecutionStatus[];
1285
+ not?: Prisma.NestedEnumExecutionStatusFilter<$PrismaModel> | $Enums.ExecutionStatus;
1286
+ };
1287
+ export type NestedEnumExecutionStatusWithAggregatesFilter<$PrismaModel = never> = {
1288
+ equals?: $Enums.ExecutionStatus | Prisma.EnumExecutionStatusFieldRefInput<$PrismaModel>;
1289
+ in?: $Enums.ExecutionStatus[];
1290
+ notIn?: $Enums.ExecutionStatus[];
1291
+ not?: Prisma.NestedEnumExecutionStatusWithAggregatesFilter<$PrismaModel> | $Enums.ExecutionStatus;
1292
+ _count?: Prisma.NestedIntFilter<$PrismaModel>;
1293
+ _min?: Prisma.NestedEnumExecutionStatusFilter<$PrismaModel>;
1294
+ _max?: Prisma.NestedEnumExecutionStatusFilter<$PrismaModel>;
1295
+ };
@@ -160,6 +160,38 @@ export declare const OfferLetterStatus: {
160
160
  readonly CANCELLED: "CANCELLED";
161
161
  };
162
162
  export type OfferLetterStatus = (typeof OfferLetterStatus)[keyof typeof OfferLetterStatus];
163
+ export declare const EventHandlerType: {
164
+ readonly INTERNAL: "INTERNAL";
165
+ readonly WEBHOOK: "WEBHOOK";
166
+ readonly WORKFLOW: "WORKFLOW";
167
+ readonly NOTIFICATION: "NOTIFICATION";
168
+ readonly SCRIPT: "SCRIPT";
169
+ };
170
+ export type EventHandlerType = (typeof EventHandlerType)[keyof typeof EventHandlerType];
171
+ export declare const ActorType: {
172
+ readonly USER: "USER";
173
+ readonly API_KEY: "API_KEY";
174
+ readonly SYSTEM: "SYSTEM";
175
+ readonly WEBHOOK: "WEBHOOK";
176
+ };
177
+ export type ActorType = (typeof ActorType)[keyof typeof ActorType];
178
+ export declare const WorkflowEventStatus: {
179
+ readonly PENDING: "PENDING";
180
+ readonly PROCESSING: "PROCESSING";
181
+ readonly COMPLETED: "COMPLETED";
182
+ readonly FAILED: "FAILED";
183
+ readonly SKIPPED: "SKIPPED";
184
+ };
185
+ export type WorkflowEventStatus = (typeof WorkflowEventStatus)[keyof typeof WorkflowEventStatus];
186
+ export declare const ExecutionStatus: {
187
+ readonly PENDING: "PENDING";
188
+ readonly RUNNING: "RUNNING";
189
+ readonly COMPLETED: "COMPLETED";
190
+ readonly FAILED: "FAILED";
191
+ readonly RETRYING: "RETRYING";
192
+ readonly SKIPPED: "SKIPPED";
193
+ };
194
+ export type ExecutionStatus = (typeof ExecutionStatus)[keyof typeof ExecutionStatus];
163
195
  export declare const PaymentMethodChangeStatus: {
164
196
  readonly PENDING_DOCUMENTS: "PENDING_DOCUMENTS";
165
197
  readonly DOCUMENTS_SUBMITTED: "DOCUMENTS_SUBMITTED";
@@ -151,6 +151,34 @@ export const OfferLetterStatus = {
151
151
  EXPIRED: 'EXPIRED',
152
152
  CANCELLED: 'CANCELLED'
153
153
  };
154
+ export const EventHandlerType = {
155
+ INTERNAL: 'INTERNAL',
156
+ WEBHOOK: 'WEBHOOK',
157
+ WORKFLOW: 'WORKFLOW',
158
+ NOTIFICATION: 'NOTIFICATION',
159
+ SCRIPT: 'SCRIPT'
160
+ };
161
+ export const ActorType = {
162
+ USER: 'USER',
163
+ API_KEY: 'API_KEY',
164
+ SYSTEM: 'SYSTEM',
165
+ WEBHOOK: 'WEBHOOK'
166
+ };
167
+ export const WorkflowEventStatus = {
168
+ PENDING: 'PENDING',
169
+ PROCESSING: 'PROCESSING',
170
+ COMPLETED: 'COMPLETED',
171
+ FAILED: 'FAILED',
172
+ SKIPPED: 'SKIPPED'
173
+ };
174
+ export const ExecutionStatus = {
175
+ PENDING: 'PENDING',
176
+ RUNNING: 'RUNNING',
177
+ COMPLETED: 'COMPLETED',
178
+ FAILED: 'FAILED',
179
+ RETRYING: 'RETRYING',
180
+ SKIPPED: 'SKIPPED'
181
+ };
154
182
  export const PaymentMethodChangeStatus = {
155
183
  PENDING_DOCUMENTS: 'PENDING_DOCUMENTS',
156
184
  DOCUMENTS_SUBMITTED: 'DOCUMENTS_SUBMITTED',
@@ -617,6 +617,61 @@ export interface PrismaClient<in LogOpts extends Prisma.LogLevel = never, in out
617
617
  get documentRequirementRule(): Prisma.DocumentRequirementRuleDelegate<ExtArgs, {
618
618
  omit: OmitOpts;
619
619
  }>;
620
+ /**
621
+ * `prisma.eventChannel`: Exposes CRUD operations for the **EventChannel** model.
622
+ * Example usage:
623
+ * ```ts
624
+ * // Fetch zero or more EventChannels
625
+ * const eventChannels = await prisma.eventChannel.findMany()
626
+ * ```
627
+ */
628
+ get eventChannel(): Prisma.EventChannelDelegate<ExtArgs, {
629
+ omit: OmitOpts;
630
+ }>;
631
+ /**
632
+ * `prisma.eventType`: Exposes CRUD operations for the **EventType** model.
633
+ * Example usage:
634
+ * ```ts
635
+ * // Fetch zero or more EventTypes
636
+ * const eventTypes = await prisma.eventType.findMany()
637
+ * ```
638
+ */
639
+ get eventType(): Prisma.EventTypeDelegate<ExtArgs, {
640
+ omit: OmitOpts;
641
+ }>;
642
+ /**
643
+ * `prisma.eventHandler`: Exposes CRUD operations for the **EventHandler** model.
644
+ * Example usage:
645
+ * ```ts
646
+ * // Fetch zero or more EventHandlers
647
+ * const eventHandlers = await prisma.eventHandler.findMany()
648
+ * ```
649
+ */
650
+ get eventHandler(): Prisma.EventHandlerDelegate<ExtArgs, {
651
+ omit: OmitOpts;
652
+ }>;
653
+ /**
654
+ * `prisma.workflowEvent`: Exposes CRUD operations for the **WorkflowEvent** model.
655
+ * Example usage:
656
+ * ```ts
657
+ * // Fetch zero or more WorkflowEvents
658
+ * const workflowEvents = await prisma.workflowEvent.findMany()
659
+ * ```
660
+ */
661
+ get workflowEvent(): Prisma.WorkflowEventDelegate<ExtArgs, {
662
+ omit: OmitOpts;
663
+ }>;
664
+ /**
665
+ * `prisma.eventHandlerExecution`: Exposes CRUD operations for the **EventHandlerExecution** model.
666
+ * Example usage:
667
+ * ```ts
668
+ * // Fetch zero or more EventHandlerExecutions
669
+ * const eventHandlerExecutions = await prisma.eventHandlerExecution.findMany()
670
+ * ```
671
+ */
672
+ get eventHandlerExecution(): Prisma.EventHandlerExecutionDelegate<ExtArgs, {
673
+ omit: OmitOpts;
674
+ }>;
620
675
  /**
621
676
  * `prisma.domainEvent`: Exposes CRUD operations for the **DomainEvent** model.
622
677
  * Example usage: