@hexclave/next 1.0.70 → 1.0.72
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/{admin-app-impl-DFjllAVr.d.ts → admin-app-impl-DLqm4Zqy.d.ts} +42 -2
- package/dist/admin-app-impl-DLqm4Zqy.d.ts.map +1 -0
- package/dist/clickmap/clickmap-core.d.ts +1 -1
- package/dist/clickmap/index.d.ts +1 -1
- package/dist/{client-app-CE8FTKgO.d.ts → client-app-DlKeB4SB.d.ts} +41 -2
- package/dist/client-app-DlKeB4SB.d.ts.map +1 -0
- package/dist/components/selected-team-switcher.d.ts +1 -1
- package/dist/components/team-icon.d.ts +1 -1
- package/dist/components/team-switcher.d.ts +1 -1
- package/dist/components-page/account-settings/payments/payments-page.d.ts +1 -1
- package/dist/components-page/account-settings/teams/leave-team-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-api-keys-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-display-name-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-member-invitation-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-member-list-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-page.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-profile-image-section.d.ts +1 -1
- package/dist/components-page/account-settings/teams/team-profile-user-section.d.ts +1 -1
- package/dist/components-page/hexclave-handler-client.d.ts +1 -1
- package/dist/components-page/hexclave-handler.d.ts +1 -1
- package/dist/dev-tool/dev-tool-core.d.ts +1 -1
- package/dist/dev-tool/index.d.ts +1 -1
- package/dist/esm/generated/quetzal-translations.d.ts +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +40 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js +102 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js +3 -3
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +3 -4
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/common.js +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js +2 -2
- package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts +41 -2
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
- package/dist/esm/lib/hexclave-app/index.d.ts +2 -1
- package/dist/esm/lib/hexclave-app/passkey-rp-id.d.ts +12 -0
- package/dist/esm/lib/hexclave-app/passkey-rp-id.d.ts.map +1 -0
- package/dist/esm/lib/hexclave-app/passkey-rp-id.js +15 -0
- package/dist/esm/lib/hexclave-app/passkey-rp-id.js.map +1 -0
- package/dist/esm/lib/hexclave-app/passkey-rp-id.test.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/passkey-rp-id.test.js +26 -0
- package/dist/esm/lib/hexclave-app/passkey-rp-id.test.js.map +1 -0
- package/dist/esm/lib/hexclave-app/workflows.d.ts +125 -0
- package/dist/esm/lib/hexclave-app/workflows.d.ts.map +1 -0
- package/dist/esm/lib/hexclave-app/workflows.js +110 -0
- package/dist/esm/lib/hexclave-app/workflows.js.map +1 -0
- package/dist/esm/lib/hexclave-app/workflows.test.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/workflows.test.js +25 -0
- package/dist/esm/lib/hexclave-app/workflows.test.js.map +1 -0
- package/dist/generated/quetzal-translations.d.ts +1 -1
- package/dist/{hexclave-provider-CVCzN4xG.d.ts → hexclave-provider-B_KtSfuf.d.ts} +3 -3
- package/dist/{hexclave-provider-CVCzN4xG.d.ts.map → hexclave-provider-B_KtSfuf.d.ts.map} +1 -1
- package/dist/{hooks-BNF4UvGF.d.ts → hooks-nHRIrxA9.d.ts} +2 -2
- package/dist/{hooks-BNF4UvGF.d.ts.map → hooks-nHRIrxA9.d.ts.map} +1 -1
- package/dist/{index-g1JoVgIu.d.ts → index-CsExJ_pK.d.ts} +2 -2
- package/dist/{index-g1JoVgIu.d.ts.map → index-CsExJ_pK.d.ts.map} +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js +102 -0
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js +3 -3
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +3 -4
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/common.js +2 -2
- package/dist/lib/hexclave-app/apps/implementations/index.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js +2 -2
- package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/index.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts +3 -2
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/server-app.d.ts +1 -1
- package/dist/lib/hexclave-app/index.d.ts +3 -2
- package/dist/lib/hexclave-app/passkey-rp-id.d.ts +12 -0
- package/dist/lib/hexclave-app/passkey-rp-id.d.ts.map +1 -0
- package/dist/lib/hexclave-app/passkey-rp-id.js +17 -0
- package/dist/lib/hexclave-app/passkey-rp-id.js.map +1 -0
- package/dist/lib/hexclave-app/passkey-rp-id.test.d.ts +1 -0
- package/dist/lib/hexclave-app/passkey-rp-id.test.js +25 -0
- package/dist/lib/hexclave-app/passkey-rp-id.test.js.map +1 -0
- package/dist/lib/hexclave-app/projects/index.d.ts +1 -1
- package/dist/lib/hexclave-app/teams/index.d.ts +1 -1
- package/dist/lib/hexclave-app/users/index.d.ts +1 -1
- package/dist/lib/hexclave-app/workflows.d.ts +2 -0
- package/dist/lib/hexclave-app/workflows.js +116 -0
- package/dist/lib/hexclave-app/workflows.js.map +1 -0
- package/dist/lib/hexclave-app/workflows.test.d.ts +1 -0
- package/dist/lib/hexclave-app/workflows.test.js +24 -0
- package/dist/lib/hexclave-app/workflows.test.js.map +1 -0
- package/dist/lib/hooks.d.ts +1 -1
- package/dist/providers/hexclave-context.d.ts +1 -1
- package/dist/providers/hexclave-provider-client.d.ts +1 -1
- package/dist/providers/hexclave-provider.d.ts +1 -1
- package/dist/providers/translation-provider.d.ts +1 -1
- package/dist/pushed-config-error-overlay/index.d.ts +1 -1
- package/dist/{quetzal-translations-DVNj-zsr.d.ts → quetzal-translations-XeH3zQ9l.d.ts} +3 -3
- package/dist/{quetzal-translations-DVNj-zsr.d.ts.map → quetzal-translations-XeH3zQ9l.d.ts.map} +1 -1
- package/dist/{translation-provider-DPFkLbrw.d.ts → translation-provider-WOaZXqAz.d.ts} +2 -2
- package/dist/{translation-provider-DPFkLbrw.d.ts.map → translation-provider-WOaZXqAz.d.ts.map} +1 -1
- package/dist/workflows-DEb7pIuQ.d.ts +125 -0
- package/dist/workflows-DEb7pIuQ.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +123 -0
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.ts +3 -3
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +10 -11
- package/src/lib/hexclave-app/apps/implementations/server-app-impl.ts +2 -7
- package/src/lib/hexclave-app/apps/interfaces/admin-app.ts +19 -0
- package/src/lib/hexclave-app/index.ts +15 -0
- package/src/lib/hexclave-app/passkey-rp-id.test.ts +43 -0
- package/src/lib/hexclave-app/passkey-rp-id.ts +27 -0
- package/src/lib/hexclave-app/workflows.test.ts +28 -0
- package/src/lib/hexclave-app/workflows.ts +245 -0
- package/dist/admin-app-impl-DFjllAVr.d.ts.map +0 -1
- package/dist/client-app-CE8FTKgO.d.ts.map +0 -1
|
@@ -4,6 +4,7 @@ import { AsyncStoreProperty, EmailConfig } from "../../common.js";
|
|
|
4
4
|
import { InternalApiKey, InternalApiKeyCreateOptions, InternalApiKeyFirstView } from "../../internal-api-keys/index.js";
|
|
5
5
|
import { AdminProjectPermission, AdminProjectPermissionDefinition, AdminProjectPermissionDefinitionCreateOptions, AdminProjectPermissionDefinitionUpdateOptions, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions } from "../../permissions/index.js";
|
|
6
6
|
import { AdminProject } from "../../projects/index.js";
|
|
7
|
+
import { AdminWorkflow, AdminWorkflow as AdminWorkflow$1, AdminWorkflowDivergenceDiagnostic, AdminWorkflowRun, AdminWorkflowRun as AdminWorkflowRun$1, AdminWorkflowRunDetails, AdminWorkflowRunDetails as AdminWorkflowRunDetails$1, AdminWorkflowRunState, AdminWorkflowRunsFilter, AdminWorkflowRunsFilter as AdminWorkflowRunsFilter$1, AdminWorkflowStep, AdminWorkflowStepAttempt, AdminWorkflowSyncResult, AdminWorkflowSyncResult as AdminWorkflowSyncResult$1, AdminWorkflowTrigger, AdminWorkflowUpgradeResult, AdminWorkflowUpgradeResult as AdminWorkflowUpgradeResult$1, AdminWorkflowVersion, AdminWorkflowVersion as AdminWorkflowVersion$1 } from "../../workflows.js";
|
|
7
8
|
import { InternalSession } from "@hexclave/shared/dist/sessions";
|
|
8
9
|
import { AdminGetSessionReplayChunkEventsResponse } from "@hexclave/shared/dist/interface/crud/session-replays";
|
|
9
10
|
import { Transaction, TransactionType } from "@hexclave/shared/dist/interface/crud/transactions";
|
|
@@ -83,7 +84,7 @@ type StackAdminApp<HasTokenStore extends boolean = boolean, ProjectId extends st
|
|
|
83
84
|
themeId: string | undefined | false;
|
|
84
85
|
tsxSource: string;
|
|
85
86
|
sentAt: Date | null;
|
|
86
|
-
}[], true> & AsyncStoreProperty<"stripeAccountInfo", [], {
|
|
87
|
+
}[], true> & AsyncStoreProperty<"workflows", [], AdminWorkflow$1[], true> & AsyncStoreProperty<"stripeAccountInfo", [], {
|
|
87
88
|
account_id: string;
|
|
88
89
|
charges_enabled: boolean;
|
|
89
90
|
details_submitted: boolean;
|
|
@@ -176,6 +177,44 @@ type StackAdminApp<HasTokenStore extends boolean = boolean, ProjectId extends st
|
|
|
176
177
|
id: string;
|
|
177
178
|
}>;
|
|
178
179
|
deleteEmailTemplate(id: string): Promise<void>;
|
|
180
|
+
createWorkflow(options: {
|
|
181
|
+
id: string;
|
|
182
|
+
displayName?: string;
|
|
183
|
+
source: string;
|
|
184
|
+
}): Promise<AdminWorkflowSyncResult$1>;
|
|
185
|
+
updateWorkflowSource(workflowId: string, source: string): Promise<AdminWorkflowSyncResult$1>;
|
|
186
|
+
deleteWorkflow(workflowId: string): Promise<void>;
|
|
187
|
+
listWorkflowVersions(workflowId: string): Promise<AdminWorkflowVersion$1[]>;
|
|
188
|
+
listWorkflowRuns: {
|
|
189
|
+
(workflowId: string, filter: AdminWorkflowRunsFilter$1 & {
|
|
190
|
+
includeState: true;
|
|
191
|
+
}): Promise<{
|
|
192
|
+
runs: AdminWorkflowRunDetails$1[];
|
|
193
|
+
nextCursor: string | null;
|
|
194
|
+
}>;
|
|
195
|
+
(workflowId: string, filter?: AdminWorkflowRunsFilter$1): Promise<{
|
|
196
|
+
runs: AdminWorkflowRun$1[];
|
|
197
|
+
nextCursor: string | null;
|
|
198
|
+
}>;
|
|
199
|
+
};
|
|
200
|
+
getWorkflowRun(runId: string): Promise<AdminWorkflowRunDetails$1>;
|
|
201
|
+
cancelWorkflowRuns(workflowId: string, filter?: {
|
|
202
|
+
runKey?: string;
|
|
203
|
+
runId?: string;
|
|
204
|
+
state?: "queued" | "running" | "sleeping";
|
|
205
|
+
version?: number;
|
|
206
|
+
}): Promise<{
|
|
207
|
+
canceledCount: number;
|
|
208
|
+
}>;
|
|
209
|
+
upgradeWorkflowRuns(workflowId: string, options: {
|
|
210
|
+
toVersion: number;
|
|
211
|
+
runKey?: string;
|
|
212
|
+
fromVersion?: number;
|
|
213
|
+
}): Promise<AdminWorkflowUpgradeResult$1>;
|
|
214
|
+
retryWorkflowRun(runId: string): Promise<void>;
|
|
215
|
+
sendWorkflowEvent(name: string, data?: unknown): Promise<{
|
|
216
|
+
eventId: string;
|
|
217
|
+
}>;
|
|
179
218
|
setupPayments(): Promise<{
|
|
180
219
|
url: string;
|
|
181
220
|
}>;
|
|
@@ -266,5 +305,5 @@ declare const HexclaveAdminApp: HexclaveAdminAppConstructor;
|
|
|
266
305
|
/** @deprecated Use `HexclaveAdminApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */
|
|
267
306
|
declare const StackAdminApp: StackAdminAppConstructor;
|
|
268
307
|
//#endregion
|
|
269
|
-
export { type AdminSessionReplay, type AdminSessionReplayChunk, EmailOutboxListOptions, EmailOutboxListResult, EmailOutboxUpdateOptions, HexclaveAdminApp, HexclaveAdminAppConstructor, HexclaveAdminAppConstructorOptions, type ListSessionReplayChunksOptions, type ListSessionReplayChunksResult, type ListSessionReplaysOptions, type ListSessionReplaysResult, ManagedEmailProviderListItem, ManagedEmailProviderSetupResult, ManagedEmailProviderStatus, type SessionReplayAllEventsResult, StackAdminApp, StackAdminAppConstructor, StackAdminAppConstructorOptions };
|
|
308
|
+
export { type AdminSessionReplay, type AdminSessionReplayChunk, type AdminWorkflow, type AdminWorkflowDivergenceDiagnostic, type AdminWorkflowRun, type AdminWorkflowRunDetails, type AdminWorkflowRunState, type AdminWorkflowRunsFilter, type AdminWorkflowStep, type AdminWorkflowStepAttempt, type AdminWorkflowSyncResult, type AdminWorkflowTrigger, type AdminWorkflowUpgradeResult, type AdminWorkflowVersion, EmailOutboxListOptions, EmailOutboxListResult, EmailOutboxUpdateOptions, HexclaveAdminApp, HexclaveAdminAppConstructor, HexclaveAdminAppConstructorOptions, type ListSessionReplayChunksOptions, type ListSessionReplayChunksResult, type ListSessionReplaysOptions, type ListSessionReplaysResult, ManagedEmailProviderListItem, ManagedEmailProviderSetupResult, ManagedEmailProviderStatus, type SessionReplayAllEventsResult, StackAdminApp, StackAdminAppConstructor, StackAdminAppConstructorOptions };
|
|
270
309
|
//# sourceMappingURL=admin-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-app.d.ts","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/admin-app.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-app.d.ts","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/admin-app.ts"],"mappings":";;;;;;;;;;;;;;;;;KAoBY,sBAAA;EACV,MAAA;EACA,YAAA;EACA,MAAA;EACA,KAAA;EACA,MAAA;AAAA;AAAA,KAGU,qBAAA;EACV,KAAA,EAAO,gBAAgB;EACvB,UAAA;AAAA;AAAA,KAGU,wBAAA;EACV,QAAA;EACA,iBAAA;EACA,MAAA;EACA,SAAA;EACA,OAAA;AAAA;AAAA,KAGU,+BAAA;EACV,QAAA;EACA,SAAA;EACA,eAAA;EACA,iBAAA;EACA,MAAA,EAAQ,0BAA0B;AAAA;AAAA,KAGxB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AAQ,0BAAA;EACjE,gBAAA,CAAiB,eAAA,WAA0B,OAAA,CAAQ,oBAAA;EACnD,uBAAA,CAAwB,eAAA,UAAyB,OAAA,GAAU,gCAAA,GAAiC,OAAA,CAAQ,+BAAA;EACpG,2BAAA,CAA4B,eAAA,UAAyB,OAAA,WAAkB,OAAA,CAAQ,wCAAA;EAC/E,sBAAA,CAAuB,eAAA,UAAyB,OAAA;IAAY,MAAA;IAAiB,KAAA;EAAA,IAAmB,OAAA,CAAQ,8BAAA;EAGxG,gBAAA,CAAiB,OAAA,GAAU,sBAAA,GAAyB,OAAA,CAAQ,qBAAA;EAC5D,cAAA,CAAe,EAAA,WAAa,OAAA,CAAQ,gBAAA;EACpC,iBAAA,CAAkB,EAAA,UAAY,OAAA,EAAS,wBAAA,GAA2B,OAAA,CAAQ,gBAAA;EAC1E,gBAAA,CAAiB,EAAA,WAAa,OAAA,CAAQ,gBAAA;EACtC,kBAAA,CAAmB,EAAA,WAAa,OAAA,CAAQ,gBAAA;EACxC,iBAAA,CAAkB,EAAA,WAAa,OAAA,CAAQ,gBAAA;AAAA,IAEvC,cAAA,CAAe,aAAA,EAAe,SAAA;;KAGtB,wBAAA;EAAA,8DAIR,OAAA,EAAS,+BAAA,CAAgC,aAAA,EAAe,SAAA,IAAa,aAAA,CAAc,aAAA,EAAe,SAAA;EAAA,KAChG,OAAA,EAAS,+BAAA,oBAAmD,aAAA;AAAA;AAAA,KAEtD,kCAAA,4DAA8F,+BAAA,CAAgC,aAAA,EAAe,SAAA;AAAA,KAC7I,gBAAA,+EAA+F,aAAA,CAAc,aAAA,EAAe,SAAA;AAAA,KAC5H,2BAAA,GAA8B,wBAAwB;AAAA,cACrD,gBAAA,EAAkB,2BAAmD;;cAErE,aAAA,EAAe,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-app.js","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/admin-app.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 { AnalyticsClickmapOptions, AnalyticsClickmapResponse, AnalyticsClickmapTokenResponse } from \"@hexclave/shared/dist/interface/admin-metrics\";\nimport type { AdminGetSessionReplayChunkEventsResponse, AdminGetSessionReplayAllEventsResponse } from \"@hexclave/shared/dist/interface/crud/session-replays\";\nimport type { Transaction, TransactionType } from \"@hexclave/shared/dist/interface/crud/transactions\";\nimport { InternalSession } from \"@hexclave/shared/dist/sessions\";\nimport type { MoneyAmount } from \"@hexclave/shared/dist/utils/currency-constants\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { AsyncStoreProperty, EmailConfig } from \"../../common\";\nimport { AdminEmailOutbox, AdminSentEmail } from \"../../email\";\nimport { InternalApiKey, InternalApiKeyCreateOptions, InternalApiKeyFirstView } from \"../../internal-api-keys\";\nimport { AdminProjectPermission, AdminProjectPermissionDefinition, AdminProjectPermissionDefinitionCreateOptions, AdminProjectPermissionDefinitionUpdateOptions, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions } from \"../../permissions\";\nimport type { PlanUsage } from \"../../plan-usage\";\nimport { AdminProject } from \"../../projects\";\nimport { _HexclaveAdminAppImpl } from \"../implementations\";\nimport { StackServerApp, StackServerAppConstructorOptions } from \"./server-app\";\n\nexport type EmailOutboxListOptions = {\n status?: string,\n simpleStatus?: string,\n userId?: string,\n limit?: number,\n cursor?: string,\n};\n\nexport type EmailOutboxListResult = {\n items: AdminEmailOutbox[],\n nextCursor: string | null,\n};\n\nexport type EmailOutboxUpdateOptions = {\n isPaused?: boolean,\n scheduledAtMillis?: number,\n cancel?: boolean,\n tsxSource?: string,\n themeId?: string | null,\n};\n\nexport type ManagedEmailProviderSetupResult = {\n domainId: string,\n subdomain: string,\n senderLocalPart: string,\n nameServerRecords: string[],\n status: ManagedEmailProviderStatus[\"status\"],\n};\n\nexport type ManagedEmailProviderStatus = {\n status: \"pending_dns\" | \"pending_verification\" | \"verified\" | \"applied\" | \"failed\",\n};\n\nexport type ManagedEmailProviderListItem = {\n domainId: string,\n subdomain: string,\n senderLocalPart: string,\n status: ManagedEmailProviderStatus[\"status\"],\n nameServerRecords: string[],\n};\n\nimport type { AdminSessionReplay, ListSessionReplayChunksOptions, ListSessionReplayChunksResult, ListSessionReplaysOptions, ListSessionReplaysResult, SessionReplayAllEventsResult } from \"../../session-replays\";\nexport type { AdminSessionReplay, AdminSessionReplayChunk, ListSessionReplaysOptions, ListSessionReplaysResult, ListSessionReplayChunksOptions, ListSessionReplayChunksResult, SessionReplayAllEventsResult } from \"../../session-replays\";\n\n\n/** @deprecated Use `HexclaveAdminAppConstructorOptions` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackAdminAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = (\n & StackServerAppConstructorOptions<HasTokenStore, ProjectId>\n & {\n superSecretAdminKey?: string,\n projectOwnerSession?: InternalSession | (() => Promise<string | null>),\n }\n);\n\n\n/** @deprecated Use `HexclaveAdminApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackAdminApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = (\n & AsyncStoreProperty<\"project\", [], AdminProject, false>\n & AsyncStoreProperty<\"planUsage\", [], PlanUsage, false>\n & AsyncStoreProperty<\"internalApiKeys\", [], InternalApiKey[], true>\n & AsyncStoreProperty<\"teamPermissionDefinitions\", [], AdminTeamPermissionDefinition[], true>\n & AsyncStoreProperty<\"projectPermissionDefinitions\", [], AdminProjectPermissionDefinition[], true>\n & AsyncStoreProperty<\"emailThemes\", [], { id: string, displayName: string }[], true>\n & AsyncStoreProperty<\"emailPreview\", [{ themeId?: string | null | false, themeTsxSource?: string, templateId?: string, templateTsxSource?: string }], string, false>\n & AsyncStoreProperty<\"emailPreviewWithEditableMarkers\", [{ themeId?: string | null | false, themeTsxSource?: string, templateId?: string, templateTsxSource?: string, editableSource?: 'template' | 'theme' | 'both' }], { html: string, editableRegions?: Record<string, unknown> }, false> // THIS_LINE_PLATFORM react-like\n & AsyncStoreProperty<\"emailTemplates\", [], { id: string, displayName: string, themeId?: string, tsxSource: string }[], true>\n & AsyncStoreProperty<\"emailDrafts\", [], { id: string, displayName: string, themeId: string | undefined | false, tsxSource: string, sentAt: Date | null }[], true>\n & AsyncStoreProperty<\"stripeAccountInfo\", [], { account_id: string, charges_enabled: boolean, details_submitted: boolean, payouts_enabled: boolean } | null, false>\n & AsyncStoreProperty<\n \"transactions\",\n [{\n cursor?: string,\n limit?: number,\n type?: TransactionType,\n customerType?: 'user' | 'team' | 'custom',\n customerId?: string,\n }],\n { transactions: Transaction[], nextCursor: string | null },\n true\n >\n & {\n createInternalApiKey(options: InternalApiKeyCreateOptions): Promise<InternalApiKeyFirstView>,\n\n createTeamPermissionDefinition(data: AdminTeamPermissionDefinitionCreateOptions): Promise<AdminTeamPermission>,\n updateTeamPermissionDefinition(permissionId: string, data: AdminTeamPermissionDefinitionUpdateOptions): Promise<void>,\n deleteTeamPermissionDefinition(permissionId: string): Promise<void>,\n /**\n * @param options.query Free-text search; matches against permission ID and description.\n */\n listTeamPermissionDefinitionsPaginated(options: { limit: number, cursor?: string, query?: string }): Promise<{ items: AdminTeamPermissionDefinition[], nextCursor: string | null }>,\n\n createProjectPermissionDefinition(data: AdminProjectPermissionDefinitionCreateOptions): Promise<AdminProjectPermission>,\n updateProjectPermissionDefinition(permissionId: string, data: AdminProjectPermissionDefinitionUpdateOptions): Promise<void>,\n deleteProjectPermissionDefinition(permissionId: string): Promise<void>,\n\n useSvixToken(): { token: string, url: string | undefined }, // THIS_LINE_PLATFORM react-like\n\n sendTestEmail(options: {\n recipientEmail: string,\n emailConfig: EmailConfig,\n }): Promise<Result<undefined, { errorMessage: string }>>,\n\n sendTestWebhook(options: { endpointId: string }): Promise<Result<undefined, { errorMessage: string }>>,\n\n sendSignInInvitationEmail(email: string, callbackUrl: string): Promise<void>,\n\n listSentEmails(): Promise<AdminSentEmail[]>,\n setupManagedEmailProvider(options: { subdomain: string, senderLocalPart: string }): Promise<ManagedEmailProviderSetupResult>,\n checkManagedEmailStatus(options: { domainId: string, subdomain: string, senderLocalPart: string }): Promise<ManagedEmailProviderStatus>,\n listManagedEmailDomains(): Promise<ManagedEmailProviderListItem[]>,\n applyManagedEmailProvider(options: { domainId: string }): Promise<{ status: \"applied\" }>,\n deleteManagedEmailDomain(options: { resendDomainId: string }): Promise<{ status: \"deleted\" }>,\n\n useEmailTheme(id: string): { displayName: string, tsxSource: string }, // THIS_LINE_PLATFORM react-like\n createEmailTheme(displayName: string): Promise<{ id: string }>,\n updateEmailTheme(id: string, tsxSource: string): Promise<void>,\n deleteEmailTheme(id: string): Promise<void>,\n saveChatMessage(threadId: string, message: any): Promise<void>,\n listChatMessages(threadId: string): Promise<{ messages: Array<any> }>,\n rewriteTemplateSourceWithAI(templateTsxSource: string): Promise<{ tsxSource: string }>,\n updateEmailTemplate(id: string, tsxSource: string, themeId: string | null | false): Promise<{ renderedHtml: string }>,\n createEmailTemplate(displayName: string): Promise<{ id: string }>,\n deleteEmailTemplate(id: string): Promise<void>,\n\n setupPayments(): Promise<{ url: string }>,\n createStripeWidgetAccountSession(): Promise<{ client_secret: string }>,\n getPaymentMethodConfigs(): Promise<{ configId: string, methods: Array<{ id: string, name: string, enabled: boolean, available: boolean, overridable: boolean }> } | null>,\n updatePaymentMethodConfigs(configId: string, updates: Record<string, 'on' | 'off'>): Promise<void>,\n createEmailDraft(options: { displayName: string, themeId?: string | undefined | false, tsxSource?: string }): Promise<{ id: string }>,\n updateEmailDraft(id: string, data: { displayName?: string, themeId?: string | undefined | false, tsxSource?: string }): Promise<void>,\n deleteEmailDraft(id: string): Promise<void>,\n refreshEmailDrafts(): Promise<void>,\n createItemQuantityChange(options: (\n { userId: string, itemId: string, quantity: number, expiresAt?: string, description?: string } |\n { teamId: string, itemId: string, quantity: number, expiresAt?: string, description?: string } |\n { customCustomerId: string, itemId: string, quantity: number, expiresAt?: string, description?: string }\n )): Promise<void>,\n refundTransaction(options: {\n type: \"subscription\" | \"one-time-purchase\",\n id: string,\n invoiceId?: string,\n amountUsd: MoneyAmount,\n endAction?: \"now\" | \"at-period-end\",\n }): Promise<{ refundTransactionId: string }>,\n getAnalyticsClickmap(options: AnalyticsClickmapOptions): Promise<AnalyticsClickmapResponse>,\n createAnalyticsClickmapToken(options: { origin: string }): Promise<AnalyticsClickmapTokenResponse>,\n\n listSessionReplays(options?: ListSessionReplaysOptions): Promise<ListSessionReplaysResult>,\n getSessionReplay(sessionReplayId: string): Promise<AdminSessionReplay>,\n listSessionReplayChunks(sessionReplayId: string, options?: ListSessionReplayChunksOptions): Promise<ListSessionReplayChunksResult>,\n getSessionReplayChunkEvents(sessionReplayId: string, chunkId: string): Promise<AdminGetSessionReplayChunkEventsResponse>,\n getSessionReplayEvents(sessionReplayId: string, options?: { offset?: number, limit?: number }): Promise<SessionReplayAllEventsResult>,\n\n // Email Outbox methods\n listOutboxEmails(options?: EmailOutboxListOptions): Promise<EmailOutboxListResult>,\n getOutboxEmail(id: string): Promise<AdminEmailOutbox>,\n updateOutboxEmail(id: string, options: EmailOutboxUpdateOptions): Promise<AdminEmailOutbox>,\n pauseOutboxEmail(id: string): Promise<AdminEmailOutbox>,\n unpauseOutboxEmail(id: string): Promise<AdminEmailOutbox>,\n cancelOutboxEmail(id: string): Promise<AdminEmailOutbox>,\n }\n & StackServerApp<HasTokenStore, ProjectId>\n);\n/** @deprecated Use `HexclaveAdminAppConstructor` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackAdminAppConstructor = {\n new <\n HasTokenStore extends boolean,\n ProjectId extends string\n >(options: StackAdminAppConstructorOptions<HasTokenStore, ProjectId>): StackAdminApp<HasTokenStore, ProjectId>,\n new(options: StackAdminAppConstructorOptions<boolean, string>): StackAdminApp<boolean, string>,\n};\nexport type HexclaveAdminAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = StackAdminAppConstructorOptions<HasTokenStore, ProjectId>;\nexport type HexclaveAdminApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = StackAdminApp<HasTokenStore, ProjectId>;\nexport type HexclaveAdminAppConstructor = StackAdminAppConstructor;\nexport const HexclaveAdminApp: HexclaveAdminAppConstructor = _HexclaveAdminAppImpl;\n/** @deprecated Use `HexclaveAdminApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport const StackAdminApp: StackAdminAppConstructor = HexclaveAdminApp;\n"],"mappings":";;AAiMA,MAAa,mBAAgD;;AAE7D,MAAa,gBAA0C"}
|
|
1
|
+
{"version":3,"file":"admin-app.js","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/admin-app.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 { AnalyticsClickmapOptions, AnalyticsClickmapResponse, AnalyticsClickmapTokenResponse } from \"@hexclave/shared/dist/interface/admin-metrics\";\nimport type { AdminGetSessionReplayChunkEventsResponse, AdminGetSessionReplayAllEventsResponse } from \"@hexclave/shared/dist/interface/crud/session-replays\";\nimport type { Transaction, TransactionType } from \"@hexclave/shared/dist/interface/crud/transactions\";\nimport { InternalSession } from \"@hexclave/shared/dist/sessions\";\nimport type { MoneyAmount } from \"@hexclave/shared/dist/utils/currency-constants\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { AsyncStoreProperty, EmailConfig } from \"../../common\";\nimport { AdminEmailOutbox, AdminSentEmail } from \"../../email\";\nimport { InternalApiKey, InternalApiKeyCreateOptions, InternalApiKeyFirstView } from \"../../internal-api-keys\";\nimport { AdminProjectPermission, AdminProjectPermissionDefinition, AdminProjectPermissionDefinitionCreateOptions, AdminProjectPermissionDefinitionUpdateOptions, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions } from \"../../permissions\";\nimport type { PlanUsage } from \"../../plan-usage\";\nimport { AdminProject } from \"../../projects\";\nimport type { AdminWorkflow, AdminWorkflowRun, AdminWorkflowRunDetails, AdminWorkflowRunsFilter, AdminWorkflowSyncResult, AdminWorkflowUpgradeResult, AdminWorkflowVersion } from \"../../workflows\";\nimport { _HexclaveAdminAppImpl } from \"../implementations\";\nimport { StackServerApp, StackServerAppConstructorOptions } from \"./server-app\";\n\nexport type EmailOutboxListOptions = {\n status?: string,\n simpleStatus?: string,\n userId?: string,\n limit?: number,\n cursor?: string,\n};\n\nexport type EmailOutboxListResult = {\n items: AdminEmailOutbox[],\n nextCursor: string | null,\n};\n\nexport type EmailOutboxUpdateOptions = {\n isPaused?: boolean,\n scheduledAtMillis?: number,\n cancel?: boolean,\n tsxSource?: string,\n themeId?: string | null,\n};\n\nexport type ManagedEmailProviderSetupResult = {\n domainId: string,\n subdomain: string,\n senderLocalPart: string,\n nameServerRecords: string[],\n status: ManagedEmailProviderStatus[\"status\"],\n};\n\nexport type ManagedEmailProviderStatus = {\n status: \"pending_dns\" | \"pending_verification\" | \"verified\" | \"applied\" | \"failed\",\n};\n\nexport type ManagedEmailProviderListItem = {\n domainId: string,\n subdomain: string,\n senderLocalPart: string,\n status: ManagedEmailProviderStatus[\"status\"],\n nameServerRecords: string[],\n};\n\nimport type { AdminSessionReplay, ListSessionReplayChunksOptions, ListSessionReplayChunksResult, ListSessionReplaysOptions, ListSessionReplaysResult, SessionReplayAllEventsResult } from \"../../session-replays\";\nexport type { AdminSessionReplay, AdminSessionReplayChunk, ListSessionReplaysOptions, ListSessionReplaysResult, ListSessionReplayChunksOptions, ListSessionReplayChunksResult, SessionReplayAllEventsResult } from \"../../session-replays\";\nexport type { AdminWorkflow, AdminWorkflowDivergenceDiagnostic, AdminWorkflowRun, AdminWorkflowRunDetails, AdminWorkflowRunsFilter, AdminWorkflowRunState, AdminWorkflowStep, AdminWorkflowStepAttempt, AdminWorkflowSyncResult, AdminWorkflowTrigger, AdminWorkflowUpgradeResult, AdminWorkflowVersion } from \"../../workflows\";\n\n\n/** @deprecated Use `HexclaveAdminAppConstructorOptions` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackAdminAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = (\n & StackServerAppConstructorOptions<HasTokenStore, ProjectId>\n & {\n superSecretAdminKey?: string,\n projectOwnerSession?: InternalSession | (() => Promise<string | null>),\n }\n);\n\n\n/** @deprecated Use `HexclaveAdminApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackAdminApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = (\n & AsyncStoreProperty<\"project\", [], AdminProject, false>\n & AsyncStoreProperty<\"planUsage\", [], PlanUsage, false>\n & AsyncStoreProperty<\"internalApiKeys\", [], InternalApiKey[], true>\n & AsyncStoreProperty<\"teamPermissionDefinitions\", [], AdminTeamPermissionDefinition[], true>\n & AsyncStoreProperty<\"projectPermissionDefinitions\", [], AdminProjectPermissionDefinition[], true>\n & AsyncStoreProperty<\"emailThemes\", [], { id: string, displayName: string }[], true>\n & AsyncStoreProperty<\"emailPreview\", [{ themeId?: string | null | false, themeTsxSource?: string, templateId?: string, templateTsxSource?: string }], string, false>\n & AsyncStoreProperty<\"emailPreviewWithEditableMarkers\", [{ themeId?: string | null | false, themeTsxSource?: string, templateId?: string, templateTsxSource?: string, editableSource?: 'template' | 'theme' | 'both' }], { html: string, editableRegions?: Record<string, unknown> }, false> // THIS_LINE_PLATFORM react-like\n & AsyncStoreProperty<\"emailTemplates\", [], { id: string, displayName: string, themeId?: string, tsxSource: string }[], true>\n & AsyncStoreProperty<\"emailDrafts\", [], { id: string, displayName: string, themeId: string | undefined | false, tsxSource: string, sentAt: Date | null }[], true>\n & AsyncStoreProperty<\"workflows\", [], AdminWorkflow[], true>\n & AsyncStoreProperty<\"stripeAccountInfo\", [], { account_id: string, charges_enabled: boolean, details_submitted: boolean, payouts_enabled: boolean } | null, false>\n & AsyncStoreProperty<\n \"transactions\",\n [{\n cursor?: string,\n limit?: number,\n type?: TransactionType,\n customerType?: 'user' | 'team' | 'custom',\n customerId?: string,\n }],\n { transactions: Transaction[], nextCursor: string | null },\n true\n >\n & {\n createInternalApiKey(options: InternalApiKeyCreateOptions): Promise<InternalApiKeyFirstView>,\n\n createTeamPermissionDefinition(data: AdminTeamPermissionDefinitionCreateOptions): Promise<AdminTeamPermission>,\n updateTeamPermissionDefinition(permissionId: string, data: AdminTeamPermissionDefinitionUpdateOptions): Promise<void>,\n deleteTeamPermissionDefinition(permissionId: string): Promise<void>,\n /**\n * @param options.query Free-text search; matches against permission ID and description.\n */\n listTeamPermissionDefinitionsPaginated(options: { limit: number, cursor?: string, query?: string }): Promise<{ items: AdminTeamPermissionDefinition[], nextCursor: string | null }>,\n\n createProjectPermissionDefinition(data: AdminProjectPermissionDefinitionCreateOptions): Promise<AdminProjectPermission>,\n updateProjectPermissionDefinition(permissionId: string, data: AdminProjectPermissionDefinitionUpdateOptions): Promise<void>,\n deleteProjectPermissionDefinition(permissionId: string): Promise<void>,\n\n useSvixToken(): { token: string, url: string | undefined }, // THIS_LINE_PLATFORM react-like\n\n sendTestEmail(options: {\n recipientEmail: string,\n emailConfig: EmailConfig,\n }): Promise<Result<undefined, { errorMessage: string }>>,\n\n sendTestWebhook(options: { endpointId: string }): Promise<Result<undefined, { errorMessage: string }>>,\n\n sendSignInInvitationEmail(email: string, callbackUrl: string): Promise<void>,\n\n listSentEmails(): Promise<AdminSentEmail[]>,\n setupManagedEmailProvider(options: { subdomain: string, senderLocalPart: string }): Promise<ManagedEmailProviderSetupResult>,\n checkManagedEmailStatus(options: { domainId: string, subdomain: string, senderLocalPart: string }): Promise<ManagedEmailProviderStatus>,\n listManagedEmailDomains(): Promise<ManagedEmailProviderListItem[]>,\n applyManagedEmailProvider(options: { domainId: string }): Promise<{ status: \"applied\" }>,\n deleteManagedEmailDomain(options: { resendDomainId: string }): Promise<{ status: \"deleted\" }>,\n\n useEmailTheme(id: string): { displayName: string, tsxSource: string }, // THIS_LINE_PLATFORM react-like\n createEmailTheme(displayName: string): Promise<{ id: string }>,\n updateEmailTheme(id: string, tsxSource: string): Promise<void>,\n deleteEmailTheme(id: string): Promise<void>,\n saveChatMessage(threadId: string, message: any): Promise<void>,\n listChatMessages(threadId: string): Promise<{ messages: Array<any> }>,\n rewriteTemplateSourceWithAI(templateTsxSource: string): Promise<{ tsxSource: string }>,\n updateEmailTemplate(id: string, tsxSource: string, themeId: string | null | false): Promise<{ renderedHtml: string }>,\n createEmailTemplate(displayName: string): Promise<{ id: string }>,\n deleteEmailTemplate(id: string): Promise<void>,\n\n // Workflows (internal-project gated; see the Workflows v1 spec). The\n // management verbs live on the admin app only in v1.\n createWorkflow(options: { id: string, displayName?: string, source: string }): Promise<AdminWorkflowSyncResult>,\n updateWorkflowSource(workflowId: string, source: string): Promise<AdminWorkflowSyncResult>,\n deleteWorkflow(workflowId: string): Promise<void>,\n listWorkflowVersions(workflowId: string): Promise<AdminWorkflowVersion[]>,\n listWorkflowRuns: {\n (workflowId: string, filter: AdminWorkflowRunsFilter & { includeState: true }): Promise<{ runs: AdminWorkflowRunDetails[], nextCursor: string | null }>,\n (workflowId: string, filter?: AdminWorkflowRunsFilter): Promise<{ runs: AdminWorkflowRun[], nextCursor: string | null }>,\n },\n getWorkflowRun(runId: string): Promise<AdminWorkflowRunDetails>,\n cancelWorkflowRuns(workflowId: string, filter?: { runKey?: string, runId?: string, state?: \"queued\" | \"running\" | \"sleeping\", version?: number }): Promise<{ canceledCount: number }>,\n upgradeWorkflowRuns(workflowId: string, options: { toVersion: number, runKey?: string, fromVersion?: number }): Promise<AdminWorkflowUpgradeResult>,\n retryWorkflowRun(runId: string): Promise<void>,\n sendWorkflowEvent(name: string, data?: unknown): Promise<{ eventId: string }>,\n\n setupPayments(): Promise<{ url: string }>,\n createStripeWidgetAccountSession(): Promise<{ client_secret: string }>,\n getPaymentMethodConfigs(): Promise<{ configId: string, methods: Array<{ id: string, name: string, enabled: boolean, available: boolean, overridable: boolean }> } | null>,\n updatePaymentMethodConfigs(configId: string, updates: Record<string, 'on' | 'off'>): Promise<void>,\n createEmailDraft(options: { displayName: string, themeId?: string | undefined | false, tsxSource?: string }): Promise<{ id: string }>,\n updateEmailDraft(id: string, data: { displayName?: string, themeId?: string | undefined | false, tsxSource?: string }): Promise<void>,\n deleteEmailDraft(id: string): Promise<void>,\n refreshEmailDrafts(): Promise<void>,\n createItemQuantityChange(options: (\n { userId: string, itemId: string, quantity: number, expiresAt?: string, description?: string } |\n { teamId: string, itemId: string, quantity: number, expiresAt?: string, description?: string } |\n { customCustomerId: string, itemId: string, quantity: number, expiresAt?: string, description?: string }\n )): Promise<void>,\n refundTransaction(options: {\n type: \"subscription\" | \"one-time-purchase\",\n id: string,\n invoiceId?: string,\n amountUsd: MoneyAmount,\n endAction?: \"now\" | \"at-period-end\",\n }): Promise<{ refundTransactionId: string }>,\n getAnalyticsClickmap(options: AnalyticsClickmapOptions): Promise<AnalyticsClickmapResponse>,\n createAnalyticsClickmapToken(options: { origin: string }): Promise<AnalyticsClickmapTokenResponse>,\n\n listSessionReplays(options?: ListSessionReplaysOptions): Promise<ListSessionReplaysResult>,\n getSessionReplay(sessionReplayId: string): Promise<AdminSessionReplay>,\n listSessionReplayChunks(sessionReplayId: string, options?: ListSessionReplayChunksOptions): Promise<ListSessionReplayChunksResult>,\n getSessionReplayChunkEvents(sessionReplayId: string, chunkId: string): Promise<AdminGetSessionReplayChunkEventsResponse>,\n getSessionReplayEvents(sessionReplayId: string, options?: { offset?: number, limit?: number }): Promise<SessionReplayAllEventsResult>,\n\n // Email Outbox methods\n listOutboxEmails(options?: EmailOutboxListOptions): Promise<EmailOutboxListResult>,\n getOutboxEmail(id: string): Promise<AdminEmailOutbox>,\n updateOutboxEmail(id: string, options: EmailOutboxUpdateOptions): Promise<AdminEmailOutbox>,\n pauseOutboxEmail(id: string): Promise<AdminEmailOutbox>,\n unpauseOutboxEmail(id: string): Promise<AdminEmailOutbox>,\n cancelOutboxEmail(id: string): Promise<AdminEmailOutbox>,\n }\n & StackServerApp<HasTokenStore, ProjectId>\n);\n/** @deprecated Use `HexclaveAdminAppConstructor` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackAdminAppConstructor = {\n new <\n HasTokenStore extends boolean,\n ProjectId extends string\n >(options: StackAdminAppConstructorOptions<HasTokenStore, ProjectId>): StackAdminApp<HasTokenStore, ProjectId>,\n new(options: StackAdminAppConstructorOptions<boolean, string>): StackAdminApp<boolean, string>,\n};\nexport type HexclaveAdminAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = StackAdminAppConstructorOptions<HasTokenStore, ProjectId>;\nexport type HexclaveAdminApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = StackAdminApp<HasTokenStore, ProjectId>;\nexport type HexclaveAdminAppConstructor = StackAdminAppConstructor;\nexport const HexclaveAdminApp: HexclaveAdminAppConstructor = _HexclaveAdminAppImpl;\n/** @deprecated Use `HexclaveAdminApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport const StackAdminApp: StackAdminAppConstructor = HexclaveAdminApp;\n"],"mappings":";;AAoNA,MAAa,mBAAgD;;AAE7D,MAAa,gBAA0C"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HexclaveAdminApp, HexclaveAdminAppConstructor, HexclaveAdminAppConstructorOptions, HexclaveClientApp, HexclaveClientAppConstructor, HexclaveClientAppConstructorOptions, HexclaveClientAppJson, HexclaveServerApp, HexclaveServerAppConstructor, HexclaveServerAppConstructorOptions, StackAdminApp, StackAdminAppConstructor, StackAdminAppConstructorOptions, StackClientApp, StackClientAppConstructor, StackClientAppConstructorOptions, StackClientAppJson, StackServerApp, StackServerAppConstructor, StackServerAppConstructorOptions } from "./apps/index.js";
|
|
2
2
|
import { GetCurrentUserOptions, GetCurrentUserOptions as GetUserOptions, HandlerUrlOptions, HandlerUrls, OAuthScopesOnSignIn, ResolvedHandlerUrls, hexclaveAppInternalsSymbol } from "./common.js";
|
|
3
3
|
import { getPagePrompt } from "./url-targets.js";
|
|
4
|
+
import { AdminWorkflow, AdminWorkflowDivergenceDiagnostic, AdminWorkflowRun, AdminWorkflowRunDetails, AdminWorkflowRunState, AdminWorkflowRunsFilter, AdminWorkflowStep, AdminWorkflowStepAttempt, AdminWorkflowSyncResult, AdminWorkflowTrigger, AdminWorkflowUpgradeResult, AdminWorkflowVersion } from "./workflows.js";
|
|
4
5
|
import { EmailOutboxListOptions, EmailOutboxListResult, EmailOutboxUpdateOptions } from "./apps/interfaces/admin-app.js";
|
|
5
6
|
import { AdminDomainConfig, AdminEmailConfig, AdminOAuthProviderConfig, AdminProjectConfig, AdminProjectConfigUpdateOptions, OAuthProviderConfig, ProjectConfig } from "./project-configs/index.js";
|
|
6
7
|
import { InternalApiKey, InternalApiKeyBase, InternalApiKeyBaseCrudRead, InternalApiKeyCreateOptions, InternalApiKeyFirstView } from "./internal-api-keys/index.js";
|
|
@@ -12,4 +13,4 @@ import { AdminDeploymentDomainJson, AdminDeploymentEnvVarJson, AdminDeploymentEn
|
|
|
12
13
|
import { PlanUsage, PlanUsageKind, PlanUsageNextPlanId, PlanUsagePlanId, PlanUsageRow } from "./plan-usage/index.js";
|
|
13
14
|
import { EditableTeamMemberProfile, ReceivedTeamInvitation, SentTeamInvitation, ServerListUsersOptions, ServerTeam, ServerTeamCreateOptions, ServerTeamMemberProfile, ServerTeamUpdateOptions, ServerTeamUser, Team, TeamCreateOptions, TeamInvitation, TeamMemberProfile, TeamUpdateOptions, TeamUser } from "./teams/index.js";
|
|
14
15
|
import { Auth, CurrentInternalServerUser, CurrentInternalUser, CurrentServerUser, CurrentUser, OAuthProvider, ServerOAuthProvider, ServerUser, User } from "./users/index.js";
|
|
15
|
-
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 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 };
|
|
16
|
+
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 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 };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/lib/hexclave-app/passkey-rp-id.d.ts
|
|
2
|
+
declare function scopePasskeyRegistrationToHostname(options: {
|
|
3
|
+
rp: {
|
|
4
|
+
id?: string;
|
|
5
|
+
};
|
|
6
|
+
}, hostname: string): void;
|
|
7
|
+
declare function scopePasskeyAuthenticationToHostname(options: {
|
|
8
|
+
rpId?: string;
|
|
9
|
+
}, hostname: string): void;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { scopePasskeyAuthenticationToHostname, scopePasskeyRegistrationToHostname };
|
|
12
|
+
//# sourceMappingURL=passkey-rp-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkey-rp-id.d.ts","names":[],"sources":["../../../../src/lib/hexclave-app/passkey-rp-id.ts"],"mappings":";iBAQgB,kCAAA,CACd,OAAA;EAAW,EAAA;IAAM,EAAA;EAAA;AAAA,GACjB,QAAA;AAAA,iBAQc,oCAAA,CACd,OAAA;EAAW,IAAA;AAAA,GACX,QAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
|
|
2
|
+
//#region src/lib/hexclave-app/passkey-rp-id.ts
|
|
3
|
+
const passkeyRpIdSentinel = "THIS_VALUE_WILL_BE_REPLACED.example.com";
|
|
4
|
+
function scopePasskeyRegistrationToHostname(options, hostname) {
|
|
5
|
+
if (options.rp.id !== passkeyRpIdSentinel) throw new HexclaveAssertionError(`Expected returned RP ID from server to equal sentinel, but found ${options.rp.id}`);
|
|
6
|
+
options.rp.id = hostname;
|
|
7
|
+
}
|
|
8
|
+
function scopePasskeyAuthenticationToHostname(options, hostname) {
|
|
9
|
+
if (options.rpId !== passkeyRpIdSentinel) throw new HexclaveAssertionError(`Expected returned RP ID from server to equal sentinel, but found ${options.rpId}`);
|
|
10
|
+
options.rpId = hostname;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { scopePasskeyAuthenticationToHostname, scopePasskeyRegistrationToHostname };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=passkey-rp-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkey-rp-id.js","names":[],"sources":["../../../../src/lib/hexclave-app/passkey-rp-id.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 { HexclaveAssertionError } from \"@hexclave/shared/dist/utils/errors\";\n\nconst passkeyRpIdSentinel = \"THIS_VALUE_WILL_BE_REPLACED.example.com\";\n\nexport function scopePasskeyRegistrationToHostname(\n options: { rp: { id?: string } },\n hostname: string,\n): void {\n if (options.rp.id !== passkeyRpIdSentinel) {\n throw new HexclaveAssertionError(`Expected returned RP ID from server to equal sentinel, but found ${options.rp.id}`);\n }\n options.rp.id = hostname;\n}\n\nexport function scopePasskeyAuthenticationToHostname(\n options: { rpId?: string },\n hostname: string,\n): void {\n if (options.rpId !== passkeyRpIdSentinel) {\n throw new HexclaveAssertionError(`Expected returned RP ID from server to equal sentinel, but found ${options.rpId}`);\n }\n options.rpId = hostname;\n}\n"],"mappings":";;AAMA,MAAM,sBAAsB;AAE5B,SAAgB,mCACd,SACA,UACM;CACN,IAAI,QAAQ,GAAG,OAAO,qBACpB,MAAM,IAAI,uBAAuB,oEAAoE,QAAQ,GAAG,IAAI;CAEtH,QAAQ,GAAG,KAAK;AAClB;AAEA,SAAgB,qCACd,SACA,UACM;CACN,IAAI,QAAQ,SAAS,qBACnB,MAAM,IAAI,uBAAuB,oEAAoE,QAAQ,MAAM;CAErH,QAAQ,OAAO;AACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { scopePasskeyAuthenticationToHostname, scopePasskeyRegistrationToHostname } from "./passkey-rp-id.js";
|
|
3
|
+
//#region src/lib/hexclave-app/passkey-rp-id.test.ts
|
|
4
|
+
const passkeyRpIdSentinel = "THIS_VALUE_WILL_BE_REPLACED.example.com";
|
|
5
|
+
describe.each(["project-id.built-with-hexclave.com", "project-id.built-with-stack-auth.com"])("passkeys on %s", (hostname) => {
|
|
6
|
+
it("scopes registration to the current hostname", () => {
|
|
7
|
+
const options = { rp: { id: passkeyRpIdSentinel } };
|
|
8
|
+
scopePasskeyRegistrationToHostname(options, hostname);
|
|
9
|
+
expect(options.rp.id).toBe(hostname);
|
|
10
|
+
});
|
|
11
|
+
it("scopes authentication to the current hostname", () => {
|
|
12
|
+
const options = { rpId: passkeyRpIdSentinel };
|
|
13
|
+
scopePasskeyAuthenticationToHostname(options, hostname);
|
|
14
|
+
expect(options.rpId).toBe(hostname);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
it("rejects registration options without the server sentinel", () => {
|
|
18
|
+
expect(() => scopePasskeyRegistrationToHostname({ rp: { id: "unexpected.example.com" } }, "project-id.built-with-hexclave.com")).toThrow("Expected returned RP ID from server to equal sentinel");
|
|
19
|
+
});
|
|
20
|
+
it("rejects authentication options without the server sentinel", () => {
|
|
21
|
+
expect(() => scopePasskeyAuthenticationToHostname({ rpId: "unexpected.example.com" }, "project-id.built-with-hexclave.com")).toThrow("Expected returned RP ID from server to equal sentinel");
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export {};
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=passkey-rp-id.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkey-rp-id.test.js","names":[],"sources":["../../../../src/lib/hexclave-app/passkey-rp-id.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 { describe, expect, it } from \"vitest\";\nimport { scopePasskeyAuthenticationToHostname, scopePasskeyRegistrationToHostname } from \"./passkey-rp-id\";\n\nconst passkeyRpIdSentinel = \"THIS_VALUE_WILL_BE_REPLACED.example.com\";\n\ndescribe.each([\n \"project-id.built-with-hexclave.com\",\n \"project-id.built-with-stack-auth.com\",\n])(\"passkeys on %s\", (hostname) => {\n it(\"scopes registration to the current hostname\", () => {\n const options = { rp: { id: passkeyRpIdSentinel } };\n\n scopePasskeyRegistrationToHostname(options, hostname);\n\n expect(options.rp.id).toBe(hostname);\n });\n\n it(\"scopes authentication to the current hostname\", () => {\n const options = { rpId: passkeyRpIdSentinel };\n\n scopePasskeyAuthenticationToHostname(options, hostname);\n\n expect(options.rpId).toBe(hostname);\n });\n});\n\nit(\"rejects registration options without the server sentinel\", () => {\n expect(() => scopePasskeyRegistrationToHostname(\n { rp: { id: \"unexpected.example.com\" } },\n \"project-id.built-with-hexclave.com\",\n )).toThrow(\"Expected returned RP ID from server to equal sentinel\");\n});\n\nit(\"rejects authentication options without the server sentinel\", () => {\n expect(() => scopePasskeyAuthenticationToHostname(\n { rpId: \"unexpected.example.com\" },\n \"project-id.built-with-hexclave.com\",\n )).toThrow(\"Expected returned RP ID from server to equal sentinel\");\n});\n"],"mappings":";;;AAOA,MAAM,sBAAsB;AAE5B,SAAS,KAAK,CACZ,sCACA,sCACF,CAAC,CAAC,CAAC,mBAAmB,aAAa;CACjC,GAAG,qDAAqD;EACtD,MAAM,UAAU,EAAE,IAAI,EAAE,IAAI,oBAAoB,EAAE;EAElD,mCAAmC,SAAS,QAAQ;EAEpD,OAAO,QAAQ,GAAG,EAAE,CAAC,CAAC,KAAK,QAAQ;CACrC,CAAC;CAED,GAAG,uDAAuD;EACxD,MAAM,UAAU,EAAE,MAAM,oBAAoB;EAE5C,qCAAqC,SAAS,QAAQ;EAEtD,OAAO,QAAQ,IAAI,CAAC,CAAC,KAAK,QAAQ;CACpC,CAAC;AACH,CAAC;AAED,GAAG,kEAAkE;CACnE,aAAa,mCACX,EAAE,IAAI,EAAE,IAAI,yBAAyB,EAAE,GACvC,oCACF,CAAC,CAAC,CAAC,QAAQ,uDAAuD;AACpE,CAAC;AAED,GAAG,oEAAoE;CACrE,aAAa,qCACX,EAAE,MAAM,yBAAyB,GACjC,oCACF,CAAC,CAAC,CAAC,QAAQ,uDAAuD;AACpE,CAAC"}
|
|
@@ -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 { AdminWorkflow, AdminWorkflowDivergenceDiagnostic, AdminWorkflowRun, AdminWorkflowRunDetails, AdminWorkflowRunState, AdminWorkflowRunsFilter, AdminWorkflowStep, AdminWorkflowStepAttempt, AdminWorkflowSyncResult, AdminWorkflowTrigger, AdminWorkflowUpgradeResult, AdminWorkflowVersion, adminWorkflowFromCrud, adminWorkflowRunDetailsFromCrud, adminWorkflowRunFromCrud, adminWorkflowSyncResultFromCrud, adminWorkflowVersionFromCrud, isWorkflowRunDetailsJson };
|
|
125
|
+
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.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"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
//#region src/lib/hexclave-app/workflows.ts
|
|
2
|
+
function adminWorkflowFromCrud(crud) {
|
|
3
|
+
return {
|
|
4
|
+
id: crud.id,
|
|
5
|
+
displayName: crud.display_name,
|
|
6
|
+
latestVersion: crud.latest_version,
|
|
7
|
+
triggers: crud.triggers.map((trigger) => trigger.type === "event" ? {
|
|
8
|
+
type: "event",
|
|
9
|
+
eventType: trigger.event_type
|
|
10
|
+
} : {
|
|
11
|
+
type: "schedule",
|
|
12
|
+
cron: trigger.cron,
|
|
13
|
+
timezone: trigger.timezone
|
|
14
|
+
}),
|
|
15
|
+
stats: {
|
|
16
|
+
activeRuns: crud.stats.active_runs,
|
|
17
|
+
sleepingRuns: crud.stats.sleeping_runs,
|
|
18
|
+
failed7d: crud.stats.failed_7d,
|
|
19
|
+
runVolume14d: crud.stats.run_volume_14d
|
|
20
|
+
},
|
|
21
|
+
createdAtMillis: crud.created_at_millis,
|
|
22
|
+
lastDeployedAtMillis: crud.last_deployed_at_millis
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function adminDivergenceFromCrud(crud) {
|
|
26
|
+
if (crud == null) return null;
|
|
27
|
+
return {
|
|
28
|
+
reason: crud.reason,
|
|
29
|
+
suspendedStepKey: crud.suspended_step_key,
|
|
30
|
+
foundStepKey: crud.found_step_key,
|
|
31
|
+
consumedStepKeys: crud.consumed_step_keys,
|
|
32
|
+
unconsumedStepKeys: crud.unconsumed_step_keys,
|
|
33
|
+
details: crud.details
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function adminWorkflowRunFromCrud(crud) {
|
|
37
|
+
return {
|
|
38
|
+
id: crud.id,
|
|
39
|
+
workflowId: crud.workflow_id,
|
|
40
|
+
runKey: crud.run_key,
|
|
41
|
+
state: crud.state,
|
|
42
|
+
version: crud.version,
|
|
43
|
+
triggerType: crud.trigger_type,
|
|
44
|
+
triggerSummary: crud.trigger_summary,
|
|
45
|
+
currentStepId: crud.current_step_id,
|
|
46
|
+
stepsRecorded: crud.steps_recorded,
|
|
47
|
+
errorSummary: crud.error_summary,
|
|
48
|
+
failureKind: crud.failure_kind,
|
|
49
|
+
lastUpgradeDivergence: adminDivergenceFromCrud(crud.last_upgrade_divergence),
|
|
50
|
+
createdAtMillis: crud.created_at_millis,
|
|
51
|
+
completedAtMillis: crud.completed_at_millis,
|
|
52
|
+
nextWakeAtMillis: crud.next_wake_at_millis
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function isWorkflowRunDetailsJson(crud) {
|
|
56
|
+
return "trigger_payload" in crud && "steps" in crud && Array.isArray(crud.steps) && "step_attempts" in crud && Array.isArray(crud.step_attempts);
|
|
57
|
+
}
|
|
58
|
+
function adminWorkflowRunDetailsFromCrud(crud) {
|
|
59
|
+
return {
|
|
60
|
+
...adminWorkflowRunFromCrud(crud),
|
|
61
|
+
triggerPayload: crud.trigger_payload,
|
|
62
|
+
steps: crud.steps.map((step) => ({
|
|
63
|
+
stepKey: step.step_key,
|
|
64
|
+
stepId: step.step_id,
|
|
65
|
+
kind: step.kind,
|
|
66
|
+
result: step.result,
|
|
67
|
+
resultSizeBytes: step.result_size_bytes,
|
|
68
|
+
attempts: step.attempts,
|
|
69
|
+
executedAtVersion: step.executed_at_version,
|
|
70
|
+
elapsedMs: step.elapsed_ms,
|
|
71
|
+
createdAtMillis: step.created_at_millis
|
|
72
|
+
})),
|
|
73
|
+
stepAttempts: crud.step_attempts.map((attempt) => ({
|
|
74
|
+
stepKey: attempt.step_key,
|
|
75
|
+
stepId: attempt.step_id,
|
|
76
|
+
retryEpoch: attempt.retry_epoch,
|
|
77
|
+
attempt: attempt.attempt,
|
|
78
|
+
outcome: attempt.outcome,
|
|
79
|
+
error: attempt.error,
|
|
80
|
+
failureKind: attempt.failure_kind,
|
|
81
|
+
logs: attempt.logs,
|
|
82
|
+
startedAtMillis: attempt.started_at_millis,
|
|
83
|
+
finishedAtMillis: attempt.finished_at_millis
|
|
84
|
+
}))
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function adminWorkflowVersionFromCrud(crud) {
|
|
88
|
+
return {
|
|
89
|
+
workflowId: crud.workflow_id,
|
|
90
|
+
version: crud.version,
|
|
91
|
+
sourceHash: crud.source_hash,
|
|
92
|
+
source: crud.source,
|
|
93
|
+
runtimeEnvVersion: crud.runtime_env_version,
|
|
94
|
+
isLatest: crud.is_latest,
|
|
95
|
+
inFlightRuns: crud.in_flight_runs,
|
|
96
|
+
createdAtMillis: crud.created_at_millis
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function adminWorkflowSyncResultFromCrud(crud) {
|
|
100
|
+
return {
|
|
101
|
+
workflowId: crud.workflow_id,
|
|
102
|
+
version: crud.version,
|
|
103
|
+
created: crud.created,
|
|
104
|
+
inFlightRunsOnOlderVersions: crud.in_flight_runs_on_older_versions
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { adminWorkflowFromCrud, adminWorkflowRunDetailsFromCrud, adminWorkflowRunFromCrud, adminWorkflowSyncResultFromCrud, adminWorkflowVersionFromCrud, isWorkflowRunDetailsJson };
|
|
109
|
+
|
|
110
|
+
//# 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,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B,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,25 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { adminWorkflowVersionFromCrud } from "./workflows.js";
|
|
3
|
+
//#region src/lib/hexclave-app/workflows.test.ts
|
|
4
|
+
describe("adminWorkflowVersionFromCrud", () => {
|
|
5
|
+
it("preserves the deployment source hash", () => {
|
|
6
|
+
expect(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
|
+
export {};
|
|
24
|
+
|
|
25
|
+
//# 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":";;;AAQA,SAAS,sCAAsC;CAC7C,GAAG,8CAA8C;EAY/C,OAAO,6BAA6B;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,2 +1,2 @@
|
|
|
1
|
-
import { n as quetzalLocales, t as quetzalKeys } from "../quetzal-translations-
|
|
1
|
+
import { n as quetzalLocales, t as quetzalKeys } from "../quetzal-translations-XeH3zQ9l.js";
|
|
2
2
|
export { quetzalKeys, quetzalLocales };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as StackAdminApp, a as StackClientApp, z as StackServerApp } from "./client-app-
|
|
2
|
-
import { t as TranslationProvider } from "./translation-provider-
|
|
1
|
+
import { N as StackAdminApp, a as StackClientApp, z as StackServerApp } from "./client-app-DlKeB4SB.js";
|
|
2
|
+
import { t as TranslationProvider } from "./translation-provider-WOaZXqAz.js";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/providers/hexclave-provider.d.ts
|
|
@@ -26,4 +26,4 @@ declare const HexclaveProvider: typeof NextStackProvider;
|
|
|
26
26
|
declare const StackProvider: typeof NextStackProvider;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { HexclaveProvider as n, StackProvider as r, ActiveProvider as t };
|
|
29
|
-
//# sourceMappingURL=hexclave-provider-
|
|
29
|
+
//# sourceMappingURL=hexclave-provider-B_KtSfuf.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hexclave-provider-
|
|
1
|
+
{"version":3,"file":"hexclave-provider-B_KtSfuf.d.ts","names":[],"sources":["../src/providers/hexclave-provider.tsx"],"mappings":";;;;;iBASS,iBAAA;EACP,QAAA;EACA,GAAA;EACA,IAAA;EACA;AAAA;EAEA,IAAA,GAAO,KAAA,CAAM,cAAA,QAAsB,mBAAA;;AARwB;;;;;EAe3D,oBAAA,GAAuB,MAAA;EACvB,QAAA,EAAU,KAAA,CAAM,SAAA;EAEhB,GAAA,EAAK,cAAA,SAAuB,cAAA,SAAuB,aAAA;AAAA,gCACpD,GAAA,CAAA,OAAA;AAAA,cAcK,cAAA,SAAc,iBAAoB;AAAA,cAI3B,gBAAA,SAAgB,iBAAiB;;cAEjC,aAAA,SAAa,iBAAiB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as GetCurrentUserOptions } from "./common-B2gkWlXX.js";
|
|
2
|
-
import { a as StackClientApp, ht as CurrentUser, pt as CurrentInternalUser } from "./client-app-
|
|
2
|
+
import { a as StackClientApp, ht as CurrentUser, pt as CurrentInternalUser } from "./client-app-DlKeB4SB.js";
|
|
3
3
|
//#region src/lib/hooks.d.ts
|
|
4
4
|
type GetUserOptions = GetCurrentUserOptions<true> & {
|
|
5
5
|
projectIdMustMatch?: string;
|
|
@@ -40,4 +40,4 @@ declare function useStackApp<ProjectId extends string>(options?: {
|
|
|
40
40
|
}): StackClientApp<true, ProjectId>;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { useStackApp as n, useUser as r, useHexclaveApp as t };
|
|
43
|
-
//# sourceMappingURL=hooks-
|
|
43
|
+
//# sourceMappingURL=hooks-nHRIrxA9.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-
|
|
1
|
+
{"version":3,"file":"hooks-nHRIrxA9.d.ts","names":[],"sources":["../src/lib/hooks.tsx"],"mappings":";;;KAQK,cAAA,GAAiB,qBAAiB;EACrC,kBAAkB;AAAA;;AAHwG;;;;iBAW5G,OAAA,CAAQ,OAAA,EAAS,cAAA;EAAmB,EAAA;EAA0B,kBAAA;AAAA,IAAmC,mBAAmB;AAAA,iBACpH,OAAA,CAAQ,OAAA,EAAS,cAAA;EAAmB,EAAA;AAAA,IAA6B,WAAW;AAAA,iBAC5E,OAAA,CAAQ,OAAA,EAAS,cAAA;EAAmB,kBAAA;AAAA,IAAmC,mBAAmB;AAAA,iBAC1F,OAAA,CAAQ,OAAA,GAAU,cAAA,GAAiB,WAAA,GAAc,mBAAA;AAHmE;AACpI;;;;AADoI,iBAqBpH,cAAA,2BAAyC,OAAA;EAAW,kBAAA,GAAqB,SAAA;AAAA,IAAmB,cAAA,OAAqB,SAAA;;;AApBrC;AAC5F;;;;iBAyCgB,WAAA,2BAAsC,OAAA;EAAW,kBAAA,GAAqB,SAAA;AAAA,IAAmB,cAAA,OAAqB,SAAA"}
|