@opengeni/db 4.0.0-canary.2 → 4.0.0-canary.3

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 (38) hide show
  1. package/dist/canonical-human-identities.js +3 -3
  2. package/dist/{chunk-B5Y3TCSP.js → chunk-3JGOYOWD.js} +2 -2
  3. package/dist/{chunk-NPKBYGAK.js → chunk-CZXYNVEU.js} +2 -2
  4. package/dist/{chunk-L2QFSPFP.js → chunk-DIFDLF2C.js} +2 -2
  5. package/dist/{chunk-XIYAXH47.js → chunk-GPKHEPVX.js} +2 -2
  6. package/dist/{chunk-CQF6G4IF.js → chunk-HUCU5BDD.js} +3 -3
  7. package/dist/{chunk-VU2IK37Y.js → chunk-OWZ36ST7.js} +2 -2
  8. package/dist/{chunk-DUB3LUVM.js → chunk-R6LIJYG6.js} +140 -8
  9. package/dist/chunk-R6LIJYG6.js.map +1 -0
  10. package/dist/{chunk-PWJJKCTF.js → chunk-WU3MSPZS.js} +19 -2
  11. package/dist/chunk-WU3MSPZS.js.map +1 -0
  12. package/dist/editable-artifact-durable-export.js +2 -2
  13. package/dist/editable-artifacts.js +3 -3
  14. package/dist/index.d.ts +5 -0
  15. package/dist/index.js +28 -8
  16. package/dist/index.js.map +1 -1
  17. package/dist/managed-auth-session-sets.js +3 -3
  18. package/dist/schema.d.ts +85 -0
  19. package/dist/schema.js +1 -1
  20. package/dist/session-background-commands.js +4 -4
  21. package/dist/session-command-output.js +4 -4
  22. package/dist/session-control.d.ts +26 -1
  23. package/dist/session-event-slices.js +2 -2
  24. package/dist/session-tenancy.js +3 -3
  25. package/dist/video-generation.js +3 -3
  26. package/drizzle/0420_workspace_pause_timers.sql +53 -0
  27. package/package.json +6 -6
  28. package/src/index.ts +21 -0
  29. package/src/schema.ts +20 -1
  30. package/src/session-control.ts +177 -4
  31. package/dist/chunk-DUB3LUVM.js.map +0 -1
  32. package/dist/chunk-PWJJKCTF.js.map +0 -1
  33. /package/dist/{chunk-B5Y3TCSP.js.map → chunk-3JGOYOWD.js.map} +0 -0
  34. /package/dist/{chunk-NPKBYGAK.js.map → chunk-CZXYNVEU.js.map} +0 -0
  35. /package/dist/{chunk-L2QFSPFP.js.map → chunk-DIFDLF2C.js.map} +0 -0
  36. /package/dist/{chunk-XIYAXH47.js.map → chunk-GPKHEPVX.js.map} +0 -0
  37. /package/dist/{chunk-CQF6G4IF.js.map → chunk-HUCU5BDD.js.map} +0 -0
  38. /package/dist/{chunk-VU2IK37Y.js.map → chunk-OWZ36ST7.js.map} +0 -0
@@ -6650,6 +6650,11 @@ var workspaceInferenceControls = pgTable19(
6650
6650
  accountId: uuid19("account_id").notNull(),
6651
6651
  revision: bigint14("revision", { mode: "number" }).notNull().default(0),
6652
6652
  workspaceState: text19("workspace_state").notNull().default("active"),
6653
+ timerId: uuid19("timer_id"),
6654
+ timerAction: text19("timer_action"),
6655
+ timerDueAt: timestamp19("timer_due_at", { withTimezone: true }),
6656
+ timerPauseForSeconds: integer18("timer_pause_for_seconds"),
6657
+ timerPauseRevision: bigint14("timer_pause_revision", { mode: "number" }),
6653
6658
  workspacePauseRevision: bigint14("workspace_pause_revision", {
6654
6659
  mode: "number"
6655
6660
  }),
@@ -6665,6 +6670,18 @@ var workspaceInferenceControls = pgTable19(
6665
6670
  columns: [table.workspaceId, table.accountId],
6666
6671
  foreignColumns: [workspaces.id, workspaces.accountId]
6667
6672
  }).onDelete("cascade"),
6673
+ timerDue: index19("workspace_pause_timer_due_idx").on(table.timerDueAt, table.workspaceId).where(sql16`${table.timerId} is not null`),
6674
+ timerShape: check11(
6675
+ "workspace_pause_timer_shape",
6676
+ sql16`
6677
+ (${table.timerId} is null and ${table.timerAction} is null and ${table.timerDueAt} is null
6678
+ and ${table.timerPauseForSeconds} is null and ${table.timerPauseRevision} is null)
6679
+ or (${table.timerId} is not null and ${table.timerAction} is not null and ${table.timerDueAt} is not null
6680
+ and ((${table.timerAction} = 'pause' and ${table.timerPauseRevision} is null)
6681
+ or (${table.timerAction} = 'resume' and ${table.timerPauseRevision} is not null and ${table.timerPauseForSeconds} is null))
6682
+ and (${table.timerPauseForSeconds} is null or ${table.timerPauseForSeconds} between 60 and 2592000))
6683
+ `
6684
+ ),
6668
6685
  workspaceAccountIdentity: uniqueIndex19("workspace_inference_controls_workspace_account_uq").on(
6669
6686
  table.workspaceId,
6670
6687
  table.accountId
@@ -12834,7 +12851,7 @@ var workspaceControlEvents = pgTable19(
12834
12851
  ),
12835
12852
  actionValid: check11(
12836
12853
  "workspace_control_events_action_check",
12837
- sql16`${table.action} in ('pause', 'resume')`
12854
+ sql16`${table.action} in ('pause', 'resume', 'timer_set', 'timer_cancelled')`
12838
12855
  )
12839
12856
  })
12840
12857
  );
@@ -18173,4 +18190,4 @@ export {
18173
18190
  organizationModelProviderCustomModels,
18174
18191
  schema_exports
18175
18192
  };
18176
- //# sourceMappingURL=chunk-PWJJKCTF.js.map
18193
+ //# sourceMappingURL=chunk-WU3MSPZS.js.map