@hexclave/js 1.0.70 → 1.0.71

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 (78) hide show
  1. package/dist/{admin-app-impl-DxZSp6ov.d.ts → admin-app-impl-BBSNNr6S.d.ts} +41 -2
  2. package/dist/admin-app-impl-BBSNNr6S.d.ts.map +1 -0
  3. package/dist/clickmap/clickmap-core.d.ts +1 -1
  4. package/dist/clickmap/clickmap-core.js +4 -4
  5. package/dist/clickmap/index.d.ts +1 -1
  6. package/dist/clickmap/index.js +1 -1
  7. package/dist/{client-app-DBcv6rRn.d.ts → client-app-C42iaDoZ.d.ts} +41 -2
  8. package/dist/client-app-C42iaDoZ.d.ts.map +1 -0
  9. package/dist/dev-tool/dev-tool-core.d.ts +1 -1
  10. package/dist/dev-tool/dev-tool-core.js +2 -2
  11. package/dist/dev-tool/index.d.ts +1 -1
  12. package/dist/dev-tool/index.js +1 -1
  13. package/dist/esm/clickmap/clickmap-core.js +4 -4
  14. package/dist/esm/clickmap/index.js +1 -1
  15. package/dist/esm/dev-tool/dev-tool-core.js +2 -2
  16. package/dist/esm/dev-tool/index.js +1 -1
  17. package/dist/esm/lib/auth.js +1 -1
  18. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +39 -0
  19. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  20. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js +98 -0
  21. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
  22. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +2 -2
  23. package/dist/esm/lib/hexclave-app/apps/implementations/common.js +4 -4
  24. package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.js +1 -1
  25. package/dist/esm/lib/hexclave-app/apps/implementations/redirect-page-urls.js +1 -1
  26. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js +1 -1
  27. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts +41 -2
  28. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
  29. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
  30. package/dist/esm/lib/hexclave-app/index.d.ts +2 -1
  31. package/dist/esm/lib/hexclave-app/workflows.d.ts +125 -0
  32. package/dist/esm/lib/hexclave-app/workflows.d.ts.map +1 -0
  33. package/dist/esm/lib/hexclave-app/workflows.js +110 -0
  34. package/dist/esm/lib/hexclave-app/workflows.js.map +1 -0
  35. package/dist/esm/lib/hexclave-app/workflows.test.d.ts +1 -0
  36. package/dist/esm/lib/hexclave-app/workflows.test.js +25 -0
  37. package/dist/esm/lib/hexclave-app/workflows.test.js.map +1 -0
  38. package/dist/esm/pushed-config-error-overlay/index.js +1 -1
  39. package/dist/index.d.ts +3 -2
  40. package/dist/lib/auth.js +1 -1
  41. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -1
  42. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js +98 -0
  43. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
  44. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
  45. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +2 -2
  46. package/dist/lib/hexclave-app/apps/implementations/common.js +4 -4
  47. package/dist/lib/hexclave-app/apps/implementations/event-tracker.js +1 -1
  48. package/dist/lib/hexclave-app/apps/implementations/index.d.ts +1 -1
  49. package/dist/lib/hexclave-app/apps/implementations/redirect-page-urls.js +1 -1
  50. package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +1 -1
  51. package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js +1 -1
  52. package/dist/lib/hexclave-app/apps/index.d.ts +1 -1
  53. package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts +3 -2
  54. package/dist/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
  55. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -1
  56. package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts +1 -1
  57. package/dist/lib/hexclave-app/index.d.ts +3 -2
  58. package/dist/lib/hexclave-app/projects/index.d.ts +1 -1
  59. package/dist/lib/hexclave-app/teams/index.d.ts +1 -1
  60. package/dist/lib/hexclave-app/users/index.d.ts +1 -1
  61. package/dist/lib/hexclave-app/workflows.d.ts +2 -0
  62. package/dist/lib/hexclave-app/workflows.js +116 -0
  63. package/dist/lib/hexclave-app/workflows.js.map +1 -0
  64. package/dist/lib/hexclave-app/workflows.test.d.ts +1 -0
  65. package/dist/lib/hexclave-app/workflows.test.js +24 -0
  66. package/dist/lib/hexclave-app/workflows.test.js.map +1 -0
  67. package/dist/pushed-config-error-overlay/index.d.ts +1 -1
  68. package/dist/pushed-config-error-overlay/index.js +1 -1
  69. package/dist/workflows-DEb7pIuQ.d.ts +125 -0
  70. package/dist/workflows-DEb7pIuQ.d.ts.map +1 -0
  71. package/package.json +2 -2
  72. package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +119 -0
  73. package/src/lib/hexclave-app/apps/interfaces/admin-app.ts +19 -0
  74. package/src/lib/hexclave-app/index.ts +15 -0
  75. package/src/lib/hexclave-app/workflows.test.ts +28 -0
  76. package/src/lib/hexclave-app/workflows.ts +245 -0
  77. package/dist/admin-app-impl-DxZSp6ov.d.ts.map +0 -1
  78. package/dist/client-app-DBcv6rRn.d.ts.map +0 -1
@@ -3,9 +3,10 @@ import { S as AdminSentEmail, b as AdminEmailOutboxStatus, d as AdminEmailOutbox
3
3
  import { a as InternalApiKeyFirstView, i as InternalApiKeyCreateOptions, n as InternalApiKeyBase, r as InternalApiKeyBaseCrudRead, t as InternalApiKey } from "../../index-TUtJOdMm.js";
4
4
  import { a as AdminTeamPermission, c as AdminTeamPermissionDefinitionUpdateOptions, i as AdminProjectPermissionDefinitionUpdateOptions, n as AdminProjectPermissionDefinition, o as AdminTeamPermissionDefinition, r as AdminProjectPermissionDefinitionCreateOptions, s as AdminTeamPermissionDefinitionCreateOptions, t as AdminProjectPermission } from "../../index-DSzMf-rS.js";
5
5
  import { a as PlanUsageRow, i as PlanUsagePlanId, n as PlanUsageKind, r as PlanUsageNextPlanId, t as PlanUsage } from "../../index-B594jg4e.js";
6
+ import { a as AdminWorkflowRunState, c as AdminWorkflowStepAttempt, d as AdminWorkflowUpgradeResult, f as AdminWorkflowVersion, i as AdminWorkflowRunDetails, l as AdminWorkflowSyncResult, n as AdminWorkflowDivergenceDiagnostic, o as AdminWorkflowRunsFilter, r as AdminWorkflowRun, s as AdminWorkflowStep, t as AdminWorkflow, u as AdminWorkflowTrigger } from "../../workflows-DEb7pIuQ.js";
6
7
  import { r as OAuthConnection, t as Connection } from "../../index-ClBTM-St.js";
7
8
  import { i as ServerContactChannel, t as ContactChannel } from "../../index-DN04TjLM.js";
8
- import { $ as TeamCreateOptions, B as StackServerAppConstructor, D as HexclaveAdminApp, E as EmailOutboxUpdateOptions, F as StackAdminAppConstructorOptions, H as EditableTeamMemberProfile, I as HexclaveServerApp, J as ServerTeamCreateOptions, K as ServerListUsersOptions, L as HexclaveServerAppConstructor, N as StackAdminApp, O as HexclaveAdminAppConstructor, Ot as User, P as StackAdminAppConstructor, Q as Team, R as HexclaveServerAppConstructorOptions, St as ServerUser, T as EmailOutboxListResult, U as ReceivedTeamInvitation, V as StackServerAppConstructorOptions, W as SentTeamInvitation, X as ServerTeamUpdateOptions, Y as ServerTeamMemberProfile, Z as ServerTeamUser, _ as AdminProjectCreateOptions, _t as OAuthProvider, a as StackClientApp, c as StackClientAppJson, d as AdminDeploymentEnvVarOptions, et as TeamInvitation, f as AdminDeploymentRunJson, ft as CurrentInternalServerUser, g as AdminProject, h as AdminOwnedProject, ht as CurrentUser, i as HexclaveClientAppJson, it as TeamUser, k as HexclaveAdminAppConstructorOptions, l as AdminDeploymentDomainJson, m as AdminDeploymentServiceJson, mt as CurrentServerUser, n as HexclaveClientAppConstructor, o as StackClientAppConstructor, p as AdminDeploymentServiceBuildOptions, pt as CurrentInternalUser, q as ServerTeam, r as HexclaveClientAppConstructorOptions, rt as TeamUpdateOptions, s as StackClientAppConstructorOptions, t as HexclaveClientApp, tt as TeamMemberProfile, u as AdminDeploymentEnvVarJson, ut as Auth, v as AdminProjectUpdateOptions, w as EmailOutboxListOptions, x as PushedConfigSource, xt as ServerOAuthProvider, y as Project, z as StackServerApp } from "../../client-app-DBcv6rRn.js";
9
+ import { $ as TeamCreateOptions, B as StackServerAppConstructor, D as HexclaveAdminApp, E as EmailOutboxUpdateOptions, F as StackAdminAppConstructorOptions, H as EditableTeamMemberProfile, I as HexclaveServerApp, J as ServerTeamCreateOptions, K as ServerListUsersOptions, L as HexclaveServerAppConstructor, N as StackAdminApp, O as HexclaveAdminAppConstructor, Ot as User, P as StackAdminAppConstructor, Q as Team, R as HexclaveServerAppConstructorOptions, St as ServerUser, T as EmailOutboxListResult, U as ReceivedTeamInvitation, V as StackServerAppConstructorOptions, W as SentTeamInvitation, X as ServerTeamUpdateOptions, Y as ServerTeamMemberProfile, Z as ServerTeamUser, _ as AdminProjectCreateOptions, _t as OAuthProvider, a as StackClientApp, c as StackClientAppJson, d as AdminDeploymentEnvVarOptions, et as TeamInvitation, f as AdminDeploymentRunJson, ft as CurrentInternalServerUser, g as AdminProject, h as AdminOwnedProject, ht as CurrentUser, i as HexclaveClientAppJson, it as TeamUser, k as HexclaveAdminAppConstructorOptions, l as AdminDeploymentDomainJson, m as AdminDeploymentServiceJson, mt as CurrentServerUser, n as HexclaveClientAppConstructor, o as StackClientAppConstructor, p as AdminDeploymentServiceBuildOptions, pt as CurrentInternalUser, q as ServerTeam, r as HexclaveClientAppConstructorOptions, rt as TeamUpdateOptions, s as StackClientAppConstructorOptions, t as HexclaveClientApp, tt as TeamMemberProfile, u as AdminDeploymentEnvVarJson, ut as Auth, v as AdminProjectUpdateOptions, w as EmailOutboxListOptions, x as PushedConfigSource, xt as ServerOAuthProvider, y as Project, z as StackServerApp } from "../../client-app-C42iaDoZ.js";
9
10
  import { a as AdminProjectConfigUpdateOptions, i as AdminProjectConfig, n as AdminEmailConfig, o as OAuthProviderConfig, r as AdminOAuthProviderConfig, s as ProjectConfig, t as AdminDomainConfig } from "../../index-Dq4xsW7_.js";
10
11
  import { r as getPagePrompt } from "../../url-targets-BJgkwPGW.js";
11
- export { type AdminDeploymentDomainJson, type AdminDeploymentEnvVarJson, type AdminDeploymentEnvVarOptions, type AdminDeploymentRunJson, type AdminDeploymentServiceBuildOptions, type AdminDeploymentServiceJson, type AdminDomainConfig, type AdminEmailConfig, type AdminEmailOutbox, type AdminEmailOutboxRecipient, type AdminEmailOutboxSimpleStatus, type AdminEmailOutboxStatus, type AdminOAuthProviderConfig, type AdminOwnedProject, type AdminProject, type AdminProjectConfig, type AdminProjectConfigUpdateOptions, type AdminProjectCreateOptions, type AdminProjectPermission, type AdminProjectPermissionDefinition, type AdminProjectPermissionDefinitionCreateOptions, type AdminProjectPermissionDefinitionUpdateOptions, type AdminProjectUpdateOptions, type AdminSendAttemptError, type AdminSentEmail, type AdminTeamPermission, type AdminTeamPermissionDefinition, type AdminTeamPermissionDefinitionCreateOptions, type AdminTeamPermissionDefinitionUpdateOptions, type Auth, type Connection, type ContactChannel, type CurrentInternalServerUser, type CurrentInternalUser, type CurrentServerUser, type CurrentUser, type EditableTeamMemberProfile, type EmailOutboxListOptions, type EmailOutboxListResult, type EmailOutboxUpdateOptions, type GetCurrentUserOptions, type GetCurrentUserOptions as GetUserOptions, type HandlerUrlOptions, type HandlerUrls, HexclaveAdminApp, type HexclaveAdminAppConstructor, type HexclaveAdminAppConstructorOptions, HexclaveClientApp, type HexclaveClientAppConstructor, type HexclaveClientAppConstructorOptions, type HexclaveClientAppJson, HexclaveServerApp, type HexclaveServerAppConstructor, type HexclaveServerAppConstructorOptions, type InternalApiKey, type InternalApiKeyBase, type InternalApiKeyBaseCrudRead, type InternalApiKeyCreateOptions, type InternalApiKeyFirstView, type OAuthConnection, type OAuthProvider, type OAuthProviderConfig, type OAuthScopesOnSignIn, type PlanUsage, type PlanUsageKind, type PlanUsageNextPlanId, type PlanUsagePlanId, type PlanUsageRow, type Project, type ProjectConfig, type PushedConfigSource, type ReceivedTeamInvitation, type ResolvedHandlerUrls, type SentTeamInvitation, type ServerContactChannel, type ServerListUsersOptions, type ServerOAuthProvider, type ServerTeam, type ServerTeamCreateOptions, type ServerTeamMemberProfile, type ServerTeamUpdateOptions, type ServerTeamUser, type ServerUser, StackAdminApp, type StackAdminAppConstructor, type StackAdminAppConstructorOptions, StackClientApp, type StackClientAppConstructor, type StackClientAppConstructorOptions, type StackClientAppJson, StackServerApp, type StackServerAppConstructor, type StackServerAppConstructorOptions, type Team, type TeamCreateOptions, type TeamInvitation, type TeamMemberProfile, type TeamUpdateOptions, type TeamUser, type User, getPagePrompt, hexclaveAppInternalsSymbol };
12
+ export { type AdminDeploymentDomainJson, type AdminDeploymentEnvVarJson, type AdminDeploymentEnvVarOptions, type AdminDeploymentRunJson, type AdminDeploymentServiceBuildOptions, type AdminDeploymentServiceJson, type AdminDomainConfig, type AdminEmailConfig, type AdminEmailOutbox, type AdminEmailOutboxRecipient, type AdminEmailOutboxSimpleStatus, type AdminEmailOutboxStatus, type AdminOAuthProviderConfig, type AdminOwnedProject, type AdminProject, type AdminProjectConfig, type AdminProjectConfigUpdateOptions, type AdminProjectCreateOptions, type AdminProjectPermission, type AdminProjectPermissionDefinition, type AdminProjectPermissionDefinitionCreateOptions, type AdminProjectPermissionDefinitionUpdateOptions, type AdminProjectUpdateOptions, type AdminSendAttemptError, type AdminSentEmail, type AdminTeamPermission, type AdminTeamPermissionDefinition, type AdminTeamPermissionDefinitionCreateOptions, type AdminTeamPermissionDefinitionUpdateOptions, type AdminWorkflow, type AdminWorkflowDivergenceDiagnostic, type AdminWorkflowRun, type AdminWorkflowRunDetails, type AdminWorkflowRunState, type AdminWorkflowRunsFilter, type AdminWorkflowStep, type AdminWorkflowStepAttempt, type AdminWorkflowSyncResult, type AdminWorkflowTrigger, type AdminWorkflowUpgradeResult, type AdminWorkflowVersion, type Auth, type Connection, type ContactChannel, type CurrentInternalServerUser, type CurrentInternalUser, type CurrentServerUser, type CurrentUser, type EditableTeamMemberProfile, type EmailOutboxListOptions, type EmailOutboxListResult, type EmailOutboxUpdateOptions, type GetCurrentUserOptions, type GetCurrentUserOptions as GetUserOptions, type HandlerUrlOptions, type HandlerUrls, HexclaveAdminApp, type HexclaveAdminAppConstructor, type HexclaveAdminAppConstructorOptions, HexclaveClientApp, type HexclaveClientAppConstructor, type HexclaveClientAppConstructorOptions, type HexclaveClientAppJson, HexclaveServerApp, type HexclaveServerAppConstructor, type HexclaveServerAppConstructorOptions, type InternalApiKey, type InternalApiKeyBase, type InternalApiKeyBaseCrudRead, type InternalApiKeyCreateOptions, type InternalApiKeyFirstView, type OAuthConnection, type OAuthProvider, type OAuthProviderConfig, type OAuthScopesOnSignIn, type PlanUsage, type PlanUsageKind, type PlanUsageNextPlanId, type PlanUsagePlanId, type PlanUsageRow, type Project, type ProjectConfig, type PushedConfigSource, type ReceivedTeamInvitation, type ResolvedHandlerUrls, type SentTeamInvitation, type ServerContactChannel, type ServerListUsersOptions, type ServerOAuthProvider, type ServerTeam, type ServerTeamCreateOptions, type ServerTeamMemberProfile, type ServerTeamUpdateOptions, type ServerTeamUser, type ServerUser, StackAdminApp, type StackAdminAppConstructor, type StackAdminAppConstructorOptions, StackClientApp, type StackClientAppConstructor, type StackClientAppConstructorOptions, type StackClientAppJson, StackServerApp, type StackServerAppConstructor, type StackServerAppConstructorOptions, type Team, type TeamCreateOptions, type TeamInvitation, type TeamMemberProfile, type TeamUpdateOptions, type TeamUser, type User, getPagePrompt, hexclaveAppInternalsSymbol };
@@ -1,2 +1,2 @@
1
- import { C as adminProjectUpdateOptionsToCrud, S as adminProjectCreateOptionsToCrud, _ as AdminProjectCreateOptions, b as PushConfigOptions, d as AdminDeploymentEnvVarOptions, f as AdminDeploymentRunJson, g as AdminProject, h as AdminOwnedProject, l as AdminDeploymentDomainJson, m as AdminDeploymentServiceJson, p as AdminDeploymentServiceBuildOptions, u as AdminDeploymentEnvVarJson, v as AdminProjectUpdateOptions, x as PushedConfigSource, y as Project } from "../../../client-app-DBcv6rRn.js";
1
+ import { C as adminProjectUpdateOptionsToCrud, S as adminProjectCreateOptionsToCrud, _ as AdminProjectCreateOptions, b as PushConfigOptions, d as AdminDeploymentEnvVarOptions, f as AdminDeploymentRunJson, g as AdminProject, h as AdminOwnedProject, l as AdminDeploymentDomainJson, m as AdminDeploymentServiceJson, p as AdminDeploymentServiceBuildOptions, u as AdminDeploymentEnvVarJson, v as AdminProjectUpdateOptions, x as PushedConfigSource, y as Project } from "../../../client-app-C42iaDoZ.js";
2
2
  export { type AdminDeploymentDomainJson, type AdminDeploymentEnvVarJson, type AdminDeploymentEnvVarOptions, type AdminDeploymentRunJson, type AdminDeploymentServiceBuildOptions, type AdminDeploymentServiceJson, AdminOwnedProject, AdminProject, AdminProjectCreateOptions, AdminProjectUpdateOptions, Project, PushConfigOptions, PushedConfigSource, adminProjectCreateOptionsToCrud, adminProjectUpdateOptionsToCrud };
@@ -1,2 +1,2 @@
1
- import { $ as TeamCreateOptions, G as ServerListTeamsOptions, H as EditableTeamMemberProfile, J as ServerTeamCreateOptions, K as ServerListUsersOptions, Q as Team, U as ReceivedTeamInvitation, W as SentTeamInvitation, X as ServerTeamUpdateOptions, Y as ServerTeamMemberProfile, Z as ServerTeamUser, at as serverTeamCreateOptionsToCrud, ct as teamUpdateOptionsToCrud, et as TeamInvitation, it as TeamUser, nt as TeamMemberProfileUpdateOptions, ot as serverTeamUpdateOptionsToCrud, q as ServerTeam, rt as TeamUpdateOptions, st as teamCreateOptionsToCrud, tt as TeamMemberProfile } from "../../../client-app-DBcv6rRn.js";
1
+ import { $ as TeamCreateOptions, G as ServerListTeamsOptions, H as EditableTeamMemberProfile, J as ServerTeamCreateOptions, K as ServerListUsersOptions, Q as Team, U as ReceivedTeamInvitation, W as SentTeamInvitation, X as ServerTeamUpdateOptions, Y as ServerTeamMemberProfile, Z as ServerTeamUser, at as serverTeamCreateOptionsToCrud, ct as teamUpdateOptionsToCrud, et as TeamInvitation, it as TeamUser, nt as TeamMemberProfileUpdateOptions, ot as serverTeamUpdateOptionsToCrud, q as ServerTeam, rt as TeamUpdateOptions, st as teamCreateOptionsToCrud, tt as TeamMemberProfile } from "../../../client-app-C42iaDoZ.js";
2
2
  export { EditableTeamMemberProfile, ReceivedTeamInvitation, SentTeamInvitation, ServerListTeamsOptions, ServerListUsersOptions, ServerTeam, ServerTeamCreateOptions, ServerTeamMemberProfile, ServerTeamUpdateOptions, ServerTeamUser, Team, TeamCreateOptions, TeamInvitation, TeamMemberProfile, TeamMemberProfileUpdateOptions, TeamUpdateOptions, TeamUser, serverTeamCreateOptionsToCrud, serverTeamUpdateOptionsToCrud, teamCreateOptionsToCrud, teamUpdateOptionsToCrud };
@@ -1,2 +1,2 @@
1
- import { At as UserUpdateOptions, Ct as ServerUserCreateOptions, Dt as TokenPartialUser, Et as SyncedPartialUser, Mt as serverUserUpdateOptionsToCrud, Nt as userUpdateOptionsToCrud, Ot as User, Pt as withUserDestructureGuard, St as ServerUser, Tt as SyncedPartialServerUser, _t as OAuthProvider, bt as ServerBaseUser, dt as BaseUser, ft as CurrentInternalServerUser, gt as InternalUserExtra, ht as CurrentUser, jt as serverUserCreateOptionsToCrud, kt as UserExtra, lt as ActiveSession, mt as CurrentServerUser, pt as CurrentInternalUser, ut as Auth, vt as ProjectCurrentServerUser, wt as ServerUserUpdateOptions, xt as ServerOAuthProvider, yt as ProjectCurrentUser } from "../../../client-app-DBcv6rRn.js";
1
+ import { At as UserUpdateOptions, Ct as ServerUserCreateOptions, Dt as TokenPartialUser, Et as SyncedPartialUser, Mt as serverUserUpdateOptionsToCrud, Nt as userUpdateOptionsToCrud, Ot as User, Pt as withUserDestructureGuard, St as ServerUser, Tt as SyncedPartialServerUser, _t as OAuthProvider, bt as ServerBaseUser, dt as BaseUser, ft as CurrentInternalServerUser, gt as InternalUserExtra, ht as CurrentUser, jt as serverUserCreateOptionsToCrud, kt as UserExtra, lt as ActiveSession, mt as CurrentServerUser, pt as CurrentInternalUser, ut as Auth, vt as ProjectCurrentServerUser, wt as ServerUserUpdateOptions, xt as ServerOAuthProvider, yt as ProjectCurrentUser } from "../../../client-app-C42iaDoZ.js";
2
2
  export { ActiveSession, Auth, BaseUser, CurrentInternalServerUser, CurrentInternalUser, CurrentServerUser, CurrentUser, InternalUserExtra, OAuthProvider, ProjectCurrentServerUser, ProjectCurrentUser, ServerBaseUser, ServerOAuthProvider, ServerUser, ServerUserCreateOptions, ServerUserUpdateOptions, SyncedPartialServerUser, SyncedPartialUser, TokenPartialUser, User, UserExtra, UserUpdateOptions, serverUserCreateOptionsToCrud, serverUserUpdateOptionsToCrud, userUpdateOptionsToCrud, withUserDestructureGuard };
@@ -0,0 +1,2 @@
1
+ import { _ as adminWorkflowVersionFromCrud, a as AdminWorkflowRunState, c as AdminWorkflowStepAttempt, d as AdminWorkflowUpgradeResult, f as AdminWorkflowVersion, g as adminWorkflowSyncResultFromCrud, h as adminWorkflowRunFromCrud, i as AdminWorkflowRunDetails, l as AdminWorkflowSyncResult, m as adminWorkflowRunDetailsFromCrud, n as AdminWorkflowDivergenceDiagnostic, o as AdminWorkflowRunsFilter, p as adminWorkflowFromCrud, r as AdminWorkflowRun, s as AdminWorkflowStep, t as AdminWorkflow, u as AdminWorkflowTrigger, v as isWorkflowRunDetailsJson } from "../../workflows-DEb7pIuQ.js";
2
+ export { AdminWorkflow, AdminWorkflowDivergenceDiagnostic, AdminWorkflowRun, AdminWorkflowRunDetails, AdminWorkflowRunState, AdminWorkflowRunsFilter, AdminWorkflowStep, AdminWorkflowStepAttempt, AdminWorkflowSyncResult, AdminWorkflowTrigger, AdminWorkflowUpgradeResult, AdminWorkflowVersion, adminWorkflowFromCrud, adminWorkflowRunDetailsFromCrud, adminWorkflowRunFromCrud, adminWorkflowSyncResultFromCrud, adminWorkflowVersionFromCrud, isWorkflowRunDetailsJson };
@@ -0,0 +1,116 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/lib/hexclave-app/workflows.ts
3
+ function adminWorkflowFromCrud(crud) {
4
+ return {
5
+ id: crud.id,
6
+ displayName: crud.display_name,
7
+ latestVersion: crud.latest_version,
8
+ triggers: crud.triggers.map((trigger) => trigger.type === "event" ? {
9
+ type: "event",
10
+ eventType: trigger.event_type
11
+ } : {
12
+ type: "schedule",
13
+ cron: trigger.cron,
14
+ timezone: trigger.timezone
15
+ }),
16
+ stats: {
17
+ activeRuns: crud.stats.active_runs,
18
+ sleepingRuns: crud.stats.sleeping_runs,
19
+ failed7d: crud.stats.failed_7d,
20
+ runVolume14d: crud.stats.run_volume_14d
21
+ },
22
+ createdAtMillis: crud.created_at_millis,
23
+ lastDeployedAtMillis: crud.last_deployed_at_millis
24
+ };
25
+ }
26
+ function adminDivergenceFromCrud(crud) {
27
+ if (crud == null) return null;
28
+ return {
29
+ reason: crud.reason,
30
+ suspendedStepKey: crud.suspended_step_key,
31
+ foundStepKey: crud.found_step_key,
32
+ consumedStepKeys: crud.consumed_step_keys,
33
+ unconsumedStepKeys: crud.unconsumed_step_keys,
34
+ details: crud.details
35
+ };
36
+ }
37
+ function adminWorkflowRunFromCrud(crud) {
38
+ return {
39
+ id: crud.id,
40
+ workflowId: crud.workflow_id,
41
+ runKey: crud.run_key,
42
+ state: crud.state,
43
+ version: crud.version,
44
+ triggerType: crud.trigger_type,
45
+ triggerSummary: crud.trigger_summary,
46
+ currentStepId: crud.current_step_id,
47
+ stepsRecorded: crud.steps_recorded,
48
+ errorSummary: crud.error_summary,
49
+ failureKind: crud.failure_kind,
50
+ lastUpgradeDivergence: adminDivergenceFromCrud(crud.last_upgrade_divergence),
51
+ createdAtMillis: crud.created_at_millis,
52
+ completedAtMillis: crud.completed_at_millis,
53
+ nextWakeAtMillis: crud.next_wake_at_millis
54
+ };
55
+ }
56
+ function isWorkflowRunDetailsJson(crud) {
57
+ return "trigger_payload" in crud && "steps" in crud && Array.isArray(crud.steps) && "step_attempts" in crud && Array.isArray(crud.step_attempts);
58
+ }
59
+ function adminWorkflowRunDetailsFromCrud(crud) {
60
+ return {
61
+ ...adminWorkflowRunFromCrud(crud),
62
+ triggerPayload: crud.trigger_payload,
63
+ steps: crud.steps.map((step) => ({
64
+ stepKey: step.step_key,
65
+ stepId: step.step_id,
66
+ kind: step.kind,
67
+ result: step.result,
68
+ resultSizeBytes: step.result_size_bytes,
69
+ attempts: step.attempts,
70
+ executedAtVersion: step.executed_at_version,
71
+ elapsedMs: step.elapsed_ms,
72
+ createdAtMillis: step.created_at_millis
73
+ })),
74
+ stepAttempts: crud.step_attempts.map((attempt) => ({
75
+ stepKey: attempt.step_key,
76
+ stepId: attempt.step_id,
77
+ retryEpoch: attempt.retry_epoch,
78
+ attempt: attempt.attempt,
79
+ outcome: attempt.outcome,
80
+ error: attempt.error,
81
+ failureKind: attempt.failure_kind,
82
+ logs: attempt.logs,
83
+ startedAtMillis: attempt.started_at_millis,
84
+ finishedAtMillis: attempt.finished_at_millis
85
+ }))
86
+ };
87
+ }
88
+ function adminWorkflowVersionFromCrud(crud) {
89
+ return {
90
+ workflowId: crud.workflow_id,
91
+ version: crud.version,
92
+ sourceHash: crud.source_hash,
93
+ source: crud.source,
94
+ runtimeEnvVersion: crud.runtime_env_version,
95
+ isLatest: crud.is_latest,
96
+ inFlightRuns: crud.in_flight_runs,
97
+ createdAtMillis: crud.created_at_millis
98
+ };
99
+ }
100
+ function adminWorkflowSyncResultFromCrud(crud) {
101
+ return {
102
+ workflowId: crud.workflow_id,
103
+ version: crud.version,
104
+ created: crud.created,
105
+ inFlightRunsOnOlderVersions: crud.in_flight_runs_on_older_versions
106
+ };
107
+ }
108
+ //#endregion
109
+ exports.adminWorkflowFromCrud = adminWorkflowFromCrud;
110
+ exports.adminWorkflowRunDetailsFromCrud = adminWorkflowRunDetailsFromCrud;
111
+ exports.adminWorkflowRunFromCrud = adminWorkflowRunFromCrud;
112
+ exports.adminWorkflowSyncResultFromCrud = adminWorkflowSyncResultFromCrud;
113
+ exports.adminWorkflowVersionFromCrud = adminWorkflowVersionFromCrud;
114
+ exports.isWorkflowRunDetailsJson = isWorkflowRunDetailsJson;
115
+
116
+ //# sourceMappingURL=workflows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows.js","names":[],"sources":["../../../src/lib/hexclave-app/workflows.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport type {\n WorkflowDivergenceDiagnosticJson,\n WorkflowRunDetailsJson,\n WorkflowRunJson,\n WorkflowSummaryJson,\n WorkflowSyncResultJson,\n WorkflowVersionJson,\n} from \"@hexclave/shared/dist/interface/workflows\";\n\n// SDK-side (camelCase) types + converters for the workflows admin surface.\n// The wire types live in @hexclave/shared/dist/interface/workflows; these\n// mirror them 1:1 so the dashboard never touches snake_case.\n\nexport type AdminWorkflowTrigger =\n | { type: \"event\", eventType: string }\n | { type: \"schedule\", cron: string, timezone: string };\n\nexport type AdminWorkflow = {\n id: string,\n displayName: string,\n latestVersion: number,\n triggers: AdminWorkflowTrigger[],\n stats: {\n activeRuns: number,\n sleepingRuns: number,\n failed7d: number,\n runVolume14d: number[],\n },\n createdAtMillis: number,\n lastDeployedAtMillis: number,\n};\n\nexport type AdminWorkflowRunState = \"queued\" | \"running\" | \"sleeping\" | \"completed\" | \"failed\" | \"canceled\";\n\nexport type AdminWorkflowDivergenceDiagnostic = {\n reason: WorkflowDivergenceDiagnosticJson[\"reason\"],\n suspendedStepKey: string | null,\n foundStepKey: string | null,\n consumedStepKeys: string[],\n unconsumedStepKeys: string[],\n details: string,\n};\n\nexport type AdminWorkflowRun = {\n id: string,\n workflowId: string,\n runKey: string | null,\n state: AdminWorkflowRunState,\n version: number,\n triggerType: string,\n triggerSummary: string,\n currentStepId: string | null,\n stepsRecorded: number,\n errorSummary: string | null,\n failureKind: \"user\" | \"platform\" | null,\n lastUpgradeDivergence: AdminWorkflowDivergenceDiagnostic | null,\n createdAtMillis: number,\n completedAtMillis: number | null,\n nextWakeAtMillis: number | null,\n};\n\nexport type AdminWorkflowStep = {\n stepKey: string,\n stepId: string,\n kind: \"run\" | \"sleep\",\n result: unknown,\n resultSizeBytes: number,\n attempts: number,\n executedAtVersion: number,\n elapsedMs: number | null,\n createdAtMillis: number,\n};\n\nexport type AdminWorkflowStepAttempt = {\n stepKey: string,\n stepId: string,\n /** 0 for the original execution; incremented by each manual retry of the run. */\n retryEpoch: number,\n attempt: number,\n outcome: \"succeeded\" | \"failed\",\n error: { name: string, message: string, stack?: string } | null,\n failureKind: \"user\" | \"platform\" | null,\n logs: string | null,\n startedAtMillis: number,\n finishedAtMillis: number,\n};\n\nexport type AdminWorkflowRunDetails = AdminWorkflowRun & {\n triggerPayload: unknown,\n steps: AdminWorkflowStep[],\n stepAttempts: AdminWorkflowStepAttempt[],\n};\n\nexport type AdminWorkflowVersion = {\n workflowId: string,\n version: number,\n sourceHash: string,\n source: string,\n runtimeEnvVersion: string,\n isLatest: boolean,\n inFlightRuns: number,\n createdAtMillis: number,\n};\n\nexport type AdminWorkflowSyncResult = {\n workflowId: string,\n version: number,\n created: boolean,\n inFlightRunsOnOlderVersions: number,\n};\n\nexport type AdminWorkflowUpgradeResult = {\n upgradedCount: number,\n skipped: {\n runId: string,\n runKey: string | null,\n fromVersion: number,\n diagnostic: AdminWorkflowDivergenceDiagnostic,\n }[],\n};\n\nexport type AdminWorkflowRunsFilter = {\n state?: AdminWorkflowRunState,\n version?: number,\n runKey?: string,\n cursor?: string,\n limit?: number,\n /** Include each run's memoized steps and attempt history. */\n includeState?: boolean,\n};\n\nexport function adminWorkflowFromCrud(crud: WorkflowSummaryJson): AdminWorkflow {\n return {\n id: crud.id,\n displayName: crud.display_name,\n latestVersion: crud.latest_version,\n triggers: crud.triggers.map((trigger) => trigger.type === \"event\"\n ? { type: \"event\", eventType: trigger.event_type }\n : { type: \"schedule\", cron: trigger.cron, timezone: trigger.timezone }),\n stats: {\n activeRuns: crud.stats.active_runs,\n sleepingRuns: crud.stats.sleeping_runs,\n failed7d: crud.stats.failed_7d,\n runVolume14d: crud.stats.run_volume_14d,\n },\n createdAtMillis: crud.created_at_millis,\n lastDeployedAtMillis: crud.last_deployed_at_millis,\n };\n}\n\nfunction adminDivergenceFromCrud(crud: WorkflowDivergenceDiagnosticJson | null): AdminWorkflowDivergenceDiagnostic | null {\n if (crud == null) return null;\n return {\n reason: crud.reason,\n suspendedStepKey: crud.suspended_step_key,\n foundStepKey: crud.found_step_key,\n consumedStepKeys: crud.consumed_step_keys,\n unconsumedStepKeys: crud.unconsumed_step_keys,\n details: crud.details,\n };\n}\n\nexport function adminWorkflowRunFromCrud(crud: WorkflowRunJson): AdminWorkflowRun {\n return {\n id: crud.id,\n workflowId: crud.workflow_id,\n runKey: crud.run_key,\n state: crud.state,\n version: crud.version,\n triggerType: crud.trigger_type,\n triggerSummary: crud.trigger_summary,\n currentStepId: crud.current_step_id,\n stepsRecorded: crud.steps_recorded,\n errorSummary: crud.error_summary,\n failureKind: crud.failure_kind,\n lastUpgradeDivergence: adminDivergenceFromCrud(crud.last_upgrade_divergence),\n createdAtMillis: crud.created_at_millis,\n completedAtMillis: crud.completed_at_millis,\n nextWakeAtMillis: crud.next_wake_at_millis,\n };\n}\n\nexport function isWorkflowRunDetailsJson(crud: WorkflowRunJson): crud is WorkflowRunDetailsJson {\n return \"trigger_payload\" in crud\n && \"steps\" in crud\n && Array.isArray(crud.steps)\n && \"step_attempts\" in crud\n && Array.isArray(crud.step_attempts);\n}\n\nexport function adminWorkflowRunDetailsFromCrud(crud: WorkflowRunDetailsJson): AdminWorkflowRunDetails {\n return {\n ...adminWorkflowRunFromCrud(crud),\n triggerPayload: crud.trigger_payload,\n steps: crud.steps.map((step) => ({\n stepKey: step.step_key,\n stepId: step.step_id,\n kind: step.kind,\n result: step.result,\n resultSizeBytes: step.result_size_bytes,\n attempts: step.attempts,\n executedAtVersion: step.executed_at_version,\n elapsedMs: step.elapsed_ms,\n createdAtMillis: step.created_at_millis,\n })),\n stepAttempts: crud.step_attempts.map((attempt) => ({\n stepKey: attempt.step_key,\n stepId: attempt.step_id,\n retryEpoch: attempt.retry_epoch,\n attempt: attempt.attempt,\n outcome: attempt.outcome,\n error: attempt.error,\n failureKind: attempt.failure_kind,\n logs: attempt.logs,\n startedAtMillis: attempt.started_at_millis,\n finishedAtMillis: attempt.finished_at_millis,\n })),\n };\n}\n\nexport function adminWorkflowVersionFromCrud(crud: WorkflowVersionJson): AdminWorkflowVersion {\n return {\n workflowId: crud.workflow_id,\n version: crud.version,\n sourceHash: crud.source_hash,\n source: crud.source,\n runtimeEnvVersion: crud.runtime_env_version,\n isLatest: crud.is_latest,\n inFlightRuns: crud.in_flight_runs,\n createdAtMillis: crud.created_at_millis,\n };\n}\n\nexport function adminWorkflowSyncResultFromCrud(crud: WorkflowSyncResultJson): AdminWorkflowSyncResult {\n return {\n workflowId: crud.workflow_id,\n version: crud.version,\n created: crud.created,\n inFlightRunsOnOlderVersions: crud.in_flight_runs_on_older_versions,\n };\n}\n"],"mappings":";;AAuIA,SAAgB,sBAAsB,MAA0C;CAC9E,OAAO;EACL,IAAI,KAAK;EACT,aAAa,KAAK;EAClB,eAAe,KAAK;EACpB,UAAU,KAAK,SAAS,KAAK,YAAY,QAAQ,SAAS,UACtD;GAAE,MAAM;GAAS,WAAW,QAAQ;EAAW,IAC/C;GAAE,MAAM;GAAY,MAAM,QAAQ;GAAM,UAAU,QAAQ;EAAS,CAAC;EACxE,OAAO;GACL,YAAY,KAAK,MAAM;GACvB,cAAc,KAAK,MAAM;GACzB,UAAU,KAAK,MAAM;GACrB,cAAc,KAAK,MAAM;EAC3B;EACA,iBAAiB,KAAK;EACtB,sBAAsB,KAAK;CAC7B;AACF;AAEA,SAAS,wBAAwB,MAAyF;CACxH,IAAI,QAAQ,MAAM,OAAO;CACzB,OAAO;EACL,QAAQ,KAAK;EACb,kBAAkB,KAAK;EACvB,cAAc,KAAK;EACnB,kBAAkB,KAAK;EACvB,oBAAoB,KAAK;EACzB,SAAS,KAAK;CAChB;AACF;AAEA,SAAgB,yBAAyB,MAAyC;CAChF,OAAO;EACL,IAAI,KAAK;EACT,YAAY,KAAK;EACjB,QAAQ,KAAK;EACb,OAAO,KAAK;EACZ,SAAS,KAAK;EACd,aAAa,KAAK;EAClB,gBAAgB,KAAK;EACrB,eAAe,KAAK;EACpB,eAAe,KAAK;EACpB,cAAc,KAAK;EACnB,aAAa,KAAK;EAClB,uBAAuB,wBAAwB,KAAK,uBAAuB;EAC3E,iBAAiB,KAAK;EACtB,mBAAmB,KAAK;EACxB,kBAAkB,KAAK;CACzB;AACF;AAEA,SAAgB,yBAAyB,MAAuD;CAC9F,OAAO,qBAAqB,QACvB,WAAW,QACX,MAAM,QAAQ,KAAK,KAAK,KACxB,mBAAmB,QACnB,MAAM,QAAQ,KAAK,aAAa;AACvC;AAEA,SAAgB,gCAAgC,MAAuD;CACrG,OAAO;EACL,GAAG,yBAAyB,IAAI;EAChC,gBAAgB,KAAK;EACrB,OAAO,KAAK,MAAM,KAAK,UAAU;GAC/B,SAAS,KAAK;GACd,QAAQ,KAAK;GACb,MAAM,KAAK;GACX,QAAQ,KAAK;GACb,iBAAiB,KAAK;GACtB,UAAU,KAAK;GACf,mBAAmB,KAAK;GACxB,WAAW,KAAK;GAChB,iBAAiB,KAAK;EACxB,EAAE;EACF,cAAc,KAAK,cAAc,KAAK,aAAa;GACjD,SAAS,QAAQ;GACjB,QAAQ,QAAQ;GAChB,YAAY,QAAQ;GACpB,SAAS,QAAQ;GACjB,SAAS,QAAQ;GACjB,OAAO,QAAQ;GACf,aAAa,QAAQ;GACrB,MAAM,QAAQ;GACd,iBAAiB,QAAQ;GACzB,kBAAkB,QAAQ;EAC5B,EAAE;CACJ;AACF;AAEA,SAAgB,6BAA6B,MAAiD;CAC5F,OAAO;EACL,YAAY,KAAK;EACjB,SAAS,KAAK;EACd,YAAY,KAAK;EACjB,QAAQ,KAAK;EACb,mBAAmB,KAAK;EACxB,UAAU,KAAK;EACf,cAAc,KAAK;EACnB,iBAAiB,KAAK;CACxB;AACF;AAEA,SAAgB,gCAAgC,MAAuD;CACrG,OAAO;EACL,YAAY,KAAK;EACjB,SAAS,KAAK;EACd,SAAS,KAAK;EACd,6BAA6B,KAAK;CACpC;AACF"}
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,24 @@
1
+ let vitest = require("vitest");
2
+ let __workflows_js = require("./workflows.js");
3
+ //#region src/lib/hexclave-app/workflows.test.ts
4
+ (0, vitest.describe)("adminWorkflowVersionFromCrud", () => {
5
+ (0, vitest.it)("preserves the deployment source hash", () => {
6
+ (0, vitest.expect)((0, __workflows_js.adminWorkflowVersionFromCrud)({
7
+ workflow_id: "daily-report",
8
+ version: 3,
9
+ source: "export default 1",
10
+ source_hash: "0123456789abcdef",
11
+ runtime_env_version: "v1",
12
+ is_latest: true,
13
+ in_flight_runs: 2,
14
+ created_at_millis: 1234
15
+ })).toMatchObject({
16
+ workflowId: "daily-report",
17
+ version: 3,
18
+ sourceHash: "0123456789abcdef"
19
+ });
20
+ });
21
+ });
22
+ //#endregion
23
+
24
+ //# sourceMappingURL=workflows.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows.test.js","names":[],"sources":["../../../src/lib/hexclave-app/workflows.test.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport type { WorkflowVersionJson } from \"@hexclave/shared/dist/interface/workflows\";\nimport { describe, expect, it } from \"vitest\";\nimport { adminWorkflowVersionFromCrud } from \"./workflows\";\n\ndescribe(\"adminWorkflowVersionFromCrud\", () => {\n it(\"preserves the deployment source hash\", () => {\n const version: WorkflowVersionJson = {\n workflow_id: \"daily-report\",\n version: 3,\n source: \"export default 1\",\n source_hash: \"0123456789abcdef\",\n runtime_env_version: \"v1\",\n is_latest: true,\n in_flight_runs: 2,\n created_at_millis: 1234,\n };\n\n expect(adminWorkflowVersionFromCrud(version)).toMatchObject({\n workflowId: \"daily-report\",\n version: 3,\n sourceHash: \"0123456789abcdef\",\n });\n });\n});\n"],"mappings":";;;qBAQS,sCAAsC;CAC7C,CAAA,GAAA,OAAA,GAAA,CAAG,8CAA8C;EAY/C,CAAA,GAAA,OAAA,OAAA,EAAA,GAAA,eAAA,6BAAA,CAAoC;GAVlC,aAAa;GACb,SAAS;GACT,QAAQ;GACR,aAAa;GACb,qBAAqB;GACrB,WAAW;GACX,gBAAgB;GAChB,mBAAmB;EAGqB,CAAC,CAAC,CAAC,CAAC,cAAc;GAC1D,YAAY;GACZ,SAAS;GACT,YAAY;EACd,CAAC;CACH,CAAC;AACH,CAAC"}
@@ -1,4 +1,4 @@
1
- import { a as StackClientApp } from "../client-app-DBcv6rRn.js";
1
+ import { a as StackClientApp } from "../client-app-C42iaDoZ.js";
2
2
  //#region src/pushed-config-error-overlay/index.d.ts
3
3
  declare function mountPushedConfigErrorOverlay(app: StackClientApp<true>): () => void;
4
4
  //#endregion
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let _hexclave_shared_dist_utils_promises = require("@hexclave/shared/dist/utils/promises");
3
+ let _hexclave_shared_dist_utils_urls = require("@hexclave/shared/dist/utils/urls");
3
4
  let ___in_page_ui_dom_js = require("../in-page-ui/dom.js");
4
5
  let ___in_page_ui_base_styles_js = require("../in-page-ui/base-styles.js");
5
6
  let _hexclave_shared_dist_utils_errors = require("@hexclave/shared/dist/utils/errors");
6
- let _hexclave_shared_dist_utils_urls = require("@hexclave/shared/dist/utils/urls");
7
7
  let ___generated_env_js = require("../generated/env.js");
8
8
  //#region src/pushed-config-error-overlay/index.ts
9
9
  const GLOBAL_INSTANCE_KEY = "__hexclave-pushed-config-error-overlay";
@@ -0,0 +1,125 @@
1
+ import { WorkflowDivergenceDiagnosticJson, WorkflowRunDetailsJson, WorkflowRunJson, WorkflowSummaryJson, WorkflowSyncResultJson, WorkflowVersionJson } from "@hexclave/shared/dist/interface/workflows";
2
+
3
+ //#region src/lib/hexclave-app/workflows.d.ts
4
+ type AdminWorkflowTrigger = {
5
+ type: "event";
6
+ eventType: string;
7
+ } | {
8
+ type: "schedule";
9
+ cron: string;
10
+ timezone: string;
11
+ };
12
+ type AdminWorkflow = {
13
+ id: string;
14
+ displayName: string;
15
+ latestVersion: number;
16
+ triggers: AdminWorkflowTrigger[];
17
+ stats: {
18
+ activeRuns: number;
19
+ sleepingRuns: number;
20
+ failed7d: number;
21
+ runVolume14d: number[];
22
+ };
23
+ createdAtMillis: number;
24
+ lastDeployedAtMillis: number;
25
+ };
26
+ type AdminWorkflowRunState = "queued" | "running" | "sleeping" | "completed" | "failed" | "canceled";
27
+ type AdminWorkflowDivergenceDiagnostic = {
28
+ reason: WorkflowDivergenceDiagnosticJson["reason"];
29
+ suspendedStepKey: string | null;
30
+ foundStepKey: string | null;
31
+ consumedStepKeys: string[];
32
+ unconsumedStepKeys: string[];
33
+ details: string;
34
+ };
35
+ type AdminWorkflowRun = {
36
+ id: string;
37
+ workflowId: string;
38
+ runKey: string | null;
39
+ state: AdminWorkflowRunState;
40
+ version: number;
41
+ triggerType: string;
42
+ triggerSummary: string;
43
+ currentStepId: string | null;
44
+ stepsRecorded: number;
45
+ errorSummary: string | null;
46
+ failureKind: "user" | "platform" | null;
47
+ lastUpgradeDivergence: AdminWorkflowDivergenceDiagnostic | null;
48
+ createdAtMillis: number;
49
+ completedAtMillis: number | null;
50
+ nextWakeAtMillis: number | null;
51
+ };
52
+ type AdminWorkflowStep = {
53
+ stepKey: string;
54
+ stepId: string;
55
+ kind: "run" | "sleep";
56
+ result: unknown;
57
+ resultSizeBytes: number;
58
+ attempts: number;
59
+ executedAtVersion: number;
60
+ elapsedMs: number | null;
61
+ createdAtMillis: number;
62
+ };
63
+ type AdminWorkflowStepAttempt = {
64
+ stepKey: string;
65
+ stepId: string; /** 0 for the original execution; incremented by each manual retry of the run. */
66
+ retryEpoch: number;
67
+ attempt: number;
68
+ outcome: "succeeded" | "failed";
69
+ error: {
70
+ name: string;
71
+ message: string;
72
+ stack?: string;
73
+ } | null;
74
+ failureKind: "user" | "platform" | null;
75
+ logs: string | null;
76
+ startedAtMillis: number;
77
+ finishedAtMillis: number;
78
+ };
79
+ type AdminWorkflowRunDetails = AdminWorkflowRun & {
80
+ triggerPayload: unknown;
81
+ steps: AdminWorkflowStep[];
82
+ stepAttempts: AdminWorkflowStepAttempt[];
83
+ };
84
+ type AdminWorkflowVersion = {
85
+ workflowId: string;
86
+ version: number;
87
+ sourceHash: string;
88
+ source: string;
89
+ runtimeEnvVersion: string;
90
+ isLatest: boolean;
91
+ inFlightRuns: number;
92
+ createdAtMillis: number;
93
+ };
94
+ type AdminWorkflowSyncResult = {
95
+ workflowId: string;
96
+ version: number;
97
+ created: boolean;
98
+ inFlightRunsOnOlderVersions: number;
99
+ };
100
+ type AdminWorkflowUpgradeResult = {
101
+ upgradedCount: number;
102
+ skipped: {
103
+ runId: string;
104
+ runKey: string | null;
105
+ fromVersion: number;
106
+ diagnostic: AdminWorkflowDivergenceDiagnostic;
107
+ }[];
108
+ };
109
+ type AdminWorkflowRunsFilter = {
110
+ state?: AdminWorkflowRunState;
111
+ version?: number;
112
+ runKey?: string;
113
+ cursor?: string;
114
+ limit?: number; /** Include each run's memoized steps and attempt history. */
115
+ includeState?: boolean;
116
+ };
117
+ declare function adminWorkflowFromCrud(crud: WorkflowSummaryJson): AdminWorkflow;
118
+ declare function adminWorkflowRunFromCrud(crud: WorkflowRunJson): AdminWorkflowRun;
119
+ declare function isWorkflowRunDetailsJson(crud: WorkflowRunJson): crud is WorkflowRunDetailsJson;
120
+ declare function adminWorkflowRunDetailsFromCrud(crud: WorkflowRunDetailsJson): AdminWorkflowRunDetails;
121
+ declare function adminWorkflowVersionFromCrud(crud: WorkflowVersionJson): AdminWorkflowVersion;
122
+ declare function adminWorkflowSyncResultFromCrud(crud: WorkflowSyncResultJson): AdminWorkflowSyncResult;
123
+ //#endregion
124
+ export { adminWorkflowVersionFromCrud as _, AdminWorkflowRunState as a, AdminWorkflowStepAttempt as c, AdminWorkflowUpgradeResult as d, AdminWorkflowVersion as f, adminWorkflowSyncResultFromCrud as g, adminWorkflowRunFromCrud as h, AdminWorkflowRunDetails as i, AdminWorkflowSyncResult as l, adminWorkflowRunDetailsFromCrud as m, AdminWorkflowDivergenceDiagnostic as n, AdminWorkflowRunsFilter as o, adminWorkflowFromCrud as p, AdminWorkflowRun as r, AdminWorkflowStep as s, AdminWorkflow as t, AdminWorkflowTrigger as u, isWorkflowRunDetailsJson as v };
125
+ //# sourceMappingURL=workflows-DEb7pIuQ.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows-DEb7pIuQ.d.ts","names":[],"sources":["../src/lib/hexclave-app/workflows.ts"],"mappings":";;;KAiBY,oBAAA;EACN,IAAA;EAAe,SAAA;AAAA;EACf,IAAA;EAAkB,IAAA;EAAc,QAAA;AAAA;AAAA,KAE1B,aAAA;EACV,EAAA;EACA,WAAA;EACA,aAAA;EACA,QAAA,EAAU,oBAAoB;EAC9B,KAAA;IACE,UAAA;IACA,YAAA;IACA,QAAA;IACA,YAAA;EAAA;EAEF,eAAA;EACA,oBAAA;AAAA;AAAA,KAGU,qBAAA;AAAA,KAEA,iCAAA;EACV,MAAA,EAAQ,gCAAgC;EACxC,gBAAA;EACA,YAAA;EACA,gBAAA;EACA,kBAAA;EACA,OAAA;AAAA;AAAA,KAGU,gBAAA;EACV,EAAA;EACA,UAAA;EACA,MAAA;EACA,KAAA,EAAO,qBAAA;EACP,OAAA;EACA,WAAA;EACA,cAAA;EACA,aAAA;EACA,aAAA;EACA,YAAA;EACA,WAAA;EACA,qBAAA,EAAuB,iCAAiC;EACxD,eAAA;EACA,iBAAA;EACA,gBAAA;AAAA;AAAA,KAGU,iBAAA;EACV,OAAA;EACA,MAAA;EACA,IAAA;EACA,MAAA;EACA,eAAA;EACA,QAAA;EACA,iBAAA;EACA,SAAA;EACA,eAAA;AAAA;AAAA,KAGU,wBAAA;EACV,OAAA;EACA,MAAA,UAvBA;EAyBA,UAAA;EACA,OAAA;EACA,OAAA;EACA,KAAA;IAAS,IAAA;IAAc,OAAA;IAAiB,KAAA;EAAA;EACxC,WAAA;EACA,IAAA;EACA,eAAA;EACA,gBAAA;AAAA;AAAA,KAGU,uBAAA,GAA0B,gBAAA;EACpC,cAAA;EACA,KAAA,EAAO,iBAAA;EACP,YAAA,EAAc,wBAAA;AAAA;AAAA,KAGJ,oBAAA;EACV,UAAA;EACA,OAAA;EACA,UAAA;EACA,MAAA;EACA,iBAAA;EACA,QAAA;EACA,YAAA;EACA,eAAA;AAAA;AAAA,KAGU,uBAAA;EACV,UAAA;EACA,OAAA;EACA,OAAA;EACA,2BAAA;AAAA;AAAA,KAGU,0BAAA;EACV,aAAA;EACA,OAAA;IACE,KAAA;IACA,MAAA;IACA,WAAA;IACA,UAAA,EAAY,iCAAiC;EAAA;AAAA;AAAA,KAIrC,uBAAA;EACV,KAAA,GAAQ,qBAAqB;EAC7B,OAAA;EACA,MAAA;EACA,MAAA;EACA,KAAA,WApCsC;EAsCtC,YAAA;AAAA;AAAA,iBAGc,qBAAA,CAAsB,IAAA,EAAM,mBAAA,GAAsB,aAAa;AAAA,iBA+B/D,wBAAA,CAAyB,IAAA,EAAM,eAAA,GAAkB,gBAAgB;AAAA,iBAoBjE,wBAAA,CAAyB,IAAA,EAAM,eAAA,GAAkB,IAAA,IAAQ,sBAAsB;AAAA,iBAQ/E,+BAAA,CAAgC,IAAA,EAAM,sBAAA,GAAyB,uBAAuB;AAAA,iBA8BtF,4BAAA,CAA6B,IAAA,EAAM,mBAAA,GAAsB,oBAAoB;AAAA,iBAa7E,+BAAA,CAAgC,IAAA,EAAM,sBAAA,GAAyB,uBAAuB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "//": "THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template (FOR package.json FILES, PLEASE EDIT package-template.json)",
3
3
  "name": "@hexclave/js",
4
- "version": "1.0.70",
4
+ "version": "1.0.71",
5
5
  "repository": "https://github.com/hexclave/hexclave",
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -65,7 +65,7 @@
65
65
  "qrcode": "^1.5.4",
66
66
  "rrweb": "^1.1.3",
67
67
  "yup": "^1.7.1",
68
- "@hexclave/shared": "1.0.70"
68
+ "@hexclave/shared": "1.0.71"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@quetzallabs/i18n": "^0.1.19",
@@ -25,6 +25,7 @@ import { AdminProjectPermission, AdminProjectPermissionDefinition, AdminProjectP
25
25
  import type { PlanUsage } from "../../plan-usage";
26
26
  import { AdminOwnedProject, AdminProject, AdminProjectUpdateOptions, PushConfigOptions, adminProjectUpdateOptionsToCrud } from "../../projects";
27
27
  import type { AdminSessionReplay, AdminSessionReplayChunk, ListSessionReplayChunksOptions, ListSessionReplayChunksResult, ListSessionReplaysOptions, ListSessionReplaysResult, SessionReplayAllEventsResult } from "../../session-replays";
28
+ import { AdminWorkflow, AdminWorkflowRun, AdminWorkflowRunDetails, AdminWorkflowRunsFilter, AdminWorkflowSyncResult, AdminWorkflowUpgradeResult, AdminWorkflowVersion, adminWorkflowFromCrud, adminWorkflowRunDetailsFromCrud, adminWorkflowRunFromCrud, adminWorkflowSyncResultFromCrud, adminWorkflowVersionFromCrud, isWorkflowRunDetailsJson } from "../../workflows";
28
29
  import { ManagedEmailProviderListItem, ManagedEmailProviderSetupResult, ManagedEmailProviderStatus, EmailOutboxUpdateOptions, StackAdminApp, StackAdminAppConstructorOptions } from "../interfaces/admin-app";
29
30
  import { clientVersion, createCache, getDefaultExtraRequestHeaders, getDefaultProjectId, getDefaultPublishableClientKey, getDefaultSecretServerKey, getDefaultSuperSecretAdminKey, resolveApiUrls, resolveConstructorOptions } from "./common";
30
31
  import { _HexclaveServerAppImplIncomplete } from "./server-app-impl";
@@ -97,6 +98,9 @@ export class _HexclaveAdminAppImplIncomplete<HasTokenStore extends boolean, Proj
97
98
  private readonly _adminEmailDraftsCache = createCache(async () => {
98
99
  return await this._interface.listInternalEmailDrafts();
99
100
  });
101
+ private readonly _adminWorkflowsCache = createCache(async () => {
102
+ return await this._interface.listWorkflows();
103
+ });
100
104
  private readonly _adminTeamPermissionDefinitionsCache = createCache(async () => {
101
105
  return await this._interface.listTeamPermissionDefinitions();
102
106
  });
@@ -477,6 +481,121 @@ export class _HexclaveAdminAppImplIncomplete<HasTokenStore extends boolean, Proj
477
481
  }));
478
482
  }
479
483
 
484
+ // ─── Workflows (internal-project gated; see the Workflows v1 spec) ───────
485
+
486
+ async listWorkflows(): Promise<AdminWorkflow[]> {
487
+ const crud = Result.orThrow(await this._adminWorkflowsCache.getOrWait([], "write-only"));
488
+ return crud.map(adminWorkflowFromCrud);
489
+ }
490
+
491
+ async createWorkflow(options: { id: string, displayName?: string, source: string }): Promise<AdminWorkflowSyncResult> {
492
+ const result = await this._interface.createWorkflow({
493
+ id: options.id,
494
+ display_name: options.displayName,
495
+ source: options.source,
496
+ });
497
+ await this._adminWorkflowsCache.refresh([]);
498
+ return adminWorkflowSyncResultFromCrud(result);
499
+ }
500
+
501
+ async updateWorkflowSource(workflowId: string, source: string): Promise<AdminWorkflowSyncResult> {
502
+ const result = await this._interface.updateWorkflowSource(workflowId, source);
503
+ await this._adminWorkflowsCache.refresh([]);
504
+ return adminWorkflowSyncResultFromCrud(result);
505
+ }
506
+
507
+ async deleteWorkflow(workflowId: string): Promise<void> {
508
+ await this._interface.deleteWorkflow(workflowId);
509
+ await this._adminWorkflowsCache.refresh([]);
510
+ }
511
+
512
+ async listWorkflowVersions(workflowId: string): Promise<AdminWorkflowVersion[]> {
513
+ return (await this._interface.listWorkflowVersions(workflowId)).map(adminWorkflowVersionFromCrud);
514
+ }
515
+
516
+ async listWorkflowRuns(workflowId: string, filter: AdminWorkflowRunsFilter & { includeState: true }): Promise<{ runs: AdminWorkflowRunDetails[], nextCursor: string | null }>;
517
+ async listWorkflowRuns(workflowId: string, filter?: AdminWorkflowRunsFilter): Promise<{ runs: AdminWorkflowRun[], nextCursor: string | null }>;
518
+ async listWorkflowRuns(workflowId: string, filter: AdminWorkflowRunsFilter = {}): Promise<{ runs: AdminWorkflowRun[], nextCursor: string | null }> {
519
+ if (filter.includeState === true) {
520
+ const result = await this._interface.listWorkflowRuns(workflowId, {
521
+ state: filter.state,
522
+ version: filter.version,
523
+ run_key: filter.runKey,
524
+ cursor: filter.cursor,
525
+ limit: filter.limit,
526
+ include_state: true,
527
+ });
528
+ return {
529
+ runs: result.runs.map((run) => adminWorkflowRunDetailsFromCrud(
530
+ isWorkflowRunDetailsJson(run)
531
+ ? run
532
+ : throwErr("Workflow runs response omitted state after include_state=true"),
533
+ )),
534
+ nextCursor: result.next_cursor,
535
+ };
536
+ }
537
+ const result = await this._interface.listWorkflowRuns(workflowId, {
538
+ state: filter.state,
539
+ version: filter.version,
540
+ run_key: filter.runKey,
541
+ cursor: filter.cursor,
542
+ limit: filter.limit,
543
+ });
544
+ return {
545
+ runs: result.runs.map(adminWorkflowRunFromCrud),
546
+ nextCursor: result.next_cursor,
547
+ };
548
+ }
549
+
550
+ async getWorkflowRun(runId: string): Promise<AdminWorkflowRunDetails> {
551
+ return adminWorkflowRunDetailsFromCrud(await this._interface.getWorkflowRun(runId));
552
+ }
553
+
554
+ async cancelWorkflowRuns(workflowId: string, filter: { runKey?: string, runId?: string, state?: "queued" | "running" | "sleeping", version?: number } = {}): Promise<{ canceledCount: number }> {
555
+ const result = await this._interface.cancelWorkflowRuns(workflowId, {
556
+ run_key: filter.runKey,
557
+ run_id: filter.runId,
558
+ state: filter.state,
559
+ version: filter.version,
560
+ });
561
+ await this._adminWorkflowsCache.refresh([]);
562
+ return { canceledCount: result.canceled_count };
563
+ }
564
+
565
+ async upgradeWorkflowRuns(workflowId: string, options: { toVersion: number, runKey?: string, fromVersion?: number }): Promise<AdminWorkflowUpgradeResult> {
566
+ const result = await this._interface.upgradeWorkflowRuns(workflowId, {
567
+ to_version: options.toVersion,
568
+ run_key: options.runKey,
569
+ from_version: options.fromVersion,
570
+ });
571
+ return {
572
+ upgradedCount: result.upgraded_count,
573
+ skipped: result.skipped.map((skip) => ({
574
+ runId: skip.run_id,
575
+ runKey: skip.run_key,
576
+ fromVersion: skip.from_version,
577
+ diagnostic: {
578
+ reason: skip.diagnostic.reason,
579
+ suspendedStepKey: skip.diagnostic.suspended_step_key,
580
+ foundStepKey: skip.diagnostic.found_step_key,
581
+ consumedStepKeys: skip.diagnostic.consumed_step_keys,
582
+ unconsumedStepKeys: skip.diagnostic.unconsumed_step_keys,
583
+ details: skip.diagnostic.details,
584
+ },
585
+ })),
586
+ };
587
+ }
588
+
589
+ async retryWorkflowRun(runId: string): Promise<void> {
590
+ await this._interface.retryWorkflowRun(runId);
591
+ await this._adminWorkflowsCache.refresh([]);
592
+ }
593
+
594
+ async sendWorkflowEvent(name: string, data?: unknown): Promise<{ eventId: string }> {
595
+ const result = await this._interface.sendWorkflowEvent(name, data ?? null);
596
+ return { eventId: result.event_id };
597
+ }
598
+
480
599
  async listEmailDrafts(): Promise<{ id: string, displayName: string, themeId: string | undefined | false, tsxSource: string, sentAt: Date | null }[]> {
481
600
  const crud = Result.orThrow(await this._adminEmailDraftsCache.getOrWait([], "write-only"));
482
601
  return crud.map((draft) => ({
@@ -14,6 +14,7 @@ import { InternalApiKey, InternalApiKeyCreateOptions, InternalApiKeyFirstView }
14
14
  import { AdminProjectPermission, AdminProjectPermissionDefinition, AdminProjectPermissionDefinitionCreateOptions, AdminProjectPermissionDefinitionUpdateOptions, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions } from "../../permissions";
15
15
  import type { PlanUsage } from "../../plan-usage";
16
16
  import { AdminProject } from "../../projects";
17
+ import type { AdminWorkflow, AdminWorkflowRun, AdminWorkflowRunDetails, AdminWorkflowRunsFilter, AdminWorkflowSyncResult, AdminWorkflowUpgradeResult, AdminWorkflowVersion } from "../../workflows";
17
18
  import { _HexclaveAdminAppImpl } from "../implementations";
18
19
  import { StackServerApp, StackServerAppConstructorOptions } from "./server-app";
19
20
 
@@ -60,6 +61,7 @@ export type ManagedEmailProviderListItem = {
60
61
 
61
62
  import type { AdminSessionReplay, ListSessionReplayChunksOptions, ListSessionReplayChunksResult, ListSessionReplaysOptions, ListSessionReplaysResult, SessionReplayAllEventsResult } from "../../session-replays";
62
63
  export type { AdminSessionReplay, AdminSessionReplayChunk, ListSessionReplaysOptions, ListSessionReplaysResult, ListSessionReplayChunksOptions, ListSessionReplayChunksResult, SessionReplayAllEventsResult } from "../../session-replays";
64
+ export type { AdminWorkflow, AdminWorkflowDivergenceDiagnostic, AdminWorkflowRun, AdminWorkflowRunDetails, AdminWorkflowRunsFilter, AdminWorkflowRunState, AdminWorkflowStep, AdminWorkflowStepAttempt, AdminWorkflowSyncResult, AdminWorkflowTrigger, AdminWorkflowUpgradeResult, AdminWorkflowVersion } from "../../workflows";
63
65
 
64
66
 
65
67
  /** @deprecated Use `HexclaveAdminAppConstructorOptions` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */
@@ -83,6 +85,7 @@ export type StackAdminApp<HasTokenStore extends boolean = boolean, ProjectId ext
83
85
  & AsyncStoreProperty<"emailPreview", [{ themeId?: string | null | false, themeTsxSource?: string, templateId?: string, templateTsxSource?: string }], string, false>
84
86
  & AsyncStoreProperty<"emailTemplates", [], { id: string, displayName: string, themeId?: string, tsxSource: string }[], true>
85
87
  & AsyncStoreProperty<"emailDrafts", [], { id: string, displayName: string, themeId: string | undefined | false, tsxSource: string, sentAt: Date | null }[], true>
88
+ & AsyncStoreProperty<"workflows", [], AdminWorkflow[], true>
86
89
  & AsyncStoreProperty<"stripeAccountInfo", [], { account_id: string, charges_enabled: boolean, details_submitted: boolean, payouts_enabled: boolean } | null, false>
87
90
  & AsyncStoreProperty<
88
91
  "transactions",
@@ -138,6 +141,22 @@ export type StackAdminApp<HasTokenStore extends boolean = boolean, ProjectId ext
138
141
  createEmailTemplate(displayName: string): Promise<{ id: string }>,
139
142
  deleteEmailTemplate(id: string): Promise<void>,
140
143
 
144
+ // Workflows (internal-project gated; see the Workflows v1 spec). The
145
+ // management verbs live on the admin app only in v1.
146
+ createWorkflow(options: { id: string, displayName?: string, source: string }): Promise<AdminWorkflowSyncResult>,
147
+ updateWorkflowSource(workflowId: string, source: string): Promise<AdminWorkflowSyncResult>,
148
+ deleteWorkflow(workflowId: string): Promise<void>,
149
+ listWorkflowVersions(workflowId: string): Promise<AdminWorkflowVersion[]>,
150
+ listWorkflowRuns: {
151
+ (workflowId: string, filter: AdminWorkflowRunsFilter & { includeState: true }): Promise<{ runs: AdminWorkflowRunDetails[], nextCursor: string | null }>,
152
+ (workflowId: string, filter?: AdminWorkflowRunsFilter): Promise<{ runs: AdminWorkflowRun[], nextCursor: string | null }>,
153
+ },
154
+ getWorkflowRun(runId: string): Promise<AdminWorkflowRunDetails>,
155
+ cancelWorkflowRuns(workflowId: string, filter?: { runKey?: string, runId?: string, state?: "queued" | "running" | "sleeping", version?: number }): Promise<{ canceledCount: number }>,
156
+ upgradeWorkflowRuns(workflowId: string, options: { toVersion: number, runKey?: string, fromVersion?: number }): Promise<AdminWorkflowUpgradeResult>,
157
+ retryWorkflowRun(runId: string): Promise<void>,
158
+ sendWorkflowEvent(name: string, data?: unknown): Promise<{ eventId: string }>,
159
+
141
160
  setupPayments(): Promise<{ url: string }>,
142
161
  createStripeWidgetAccountSession(): Promise<{ client_secret: string }>,
143
162
  getPaymentMethodConfigs(): Promise<{ configId: string, methods: Array<{ id: string, name: string, enabled: boolean, available: boolean, overridable: boolean }> } | null>,
@@ -45,6 +45,21 @@ export type {
45
45
  EmailOutboxUpdateOptions
46
46
  } from "./apps/interfaces/admin-app";
47
47
 
48
+ export type {
49
+ AdminWorkflow,
50
+ AdminWorkflowDivergenceDiagnostic,
51
+ AdminWorkflowRun,
52
+ AdminWorkflowRunDetails,
53
+ AdminWorkflowRunsFilter,
54
+ AdminWorkflowRunState,
55
+ AdminWorkflowStep,
56
+ AdminWorkflowStepAttempt,
57
+ AdminWorkflowSyncResult,
58
+ AdminWorkflowTrigger,
59
+ AdminWorkflowUpgradeResult,
60
+ AdminWorkflowVersion
61
+ } from "./workflows";
62
+
48
63
  export type {
49
64
  ProjectConfig
50
65
  } from "./project-configs";
@@ -0,0 +1,28 @@
1
+
2
+ //===========================================
3
+ // THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template
4
+ //===========================================
5
+ import type { WorkflowVersionJson } from "@hexclave/shared/dist/interface/workflows";
6
+ import { describe, expect, it } from "vitest";
7
+ import { adminWorkflowVersionFromCrud } from "./workflows";
8
+
9
+ describe("adminWorkflowVersionFromCrud", () => {
10
+ it("preserves the deployment source hash", () => {
11
+ const version: WorkflowVersionJson = {
12
+ workflow_id: "daily-report",
13
+ version: 3,
14
+ source: "export default 1",
15
+ source_hash: "0123456789abcdef",
16
+ runtime_env_version: "v1",
17
+ is_latest: true,
18
+ in_flight_runs: 2,
19
+ created_at_millis: 1234,
20
+ };
21
+
22
+ expect(adminWorkflowVersionFromCrud(version)).toMatchObject({
23
+ workflowId: "daily-report",
24
+ version: 3,
25
+ sourceHash: "0123456789abcdef",
26
+ });
27
+ });
28
+ });