feat(nexus-operations): DT-4005 standalone nexus operations API integrations#3444
Merged
rossedfort merged 4 commits intoMay 27, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| ...(query ? { query } : {}), | ||
| }, | ||
| request, | ||
| onError, |
Contributor
There was a problem hiding this comment.
⚠️ Type 'ErrorCallback' is not assignable to type '(error: unknown, toasts?: Toaster, errors?: Writable<NetworkError | null>, isBrowser?: boolean) => void'.
| } | ||
|
|
||
| if (formData.searchAttributes) { | ||
| searchAttributes = { |
Contributor
There was a problem hiding this comment.
⚠️ Type '{ indexedFields?: ({ [k: string]: temporal.api.common.v1.IPayload; } | null); }' is not assignable to type '{ [k: string]: IPayload; }'.
|
|
||
| if (formData.searchAttributes) { | ||
| searchAttributes = { | ||
| indexedFields: { |
Contributor
There was a problem hiding this comment.
⚠️ Argument of type 'Record<string, unknown>[]' is not assignable to parameter of type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; }[]'.
| export class StandaloneNexusOperationPoller { | ||
| private abortController: AbortController; | ||
| private namespace: string; | ||
| private operationId: string; |
Contributor
There was a problem hiding this comment.
⚠️ Property 'token' has no initializer and is not definitely assigned in the constructor.
| this.namespace, | ||
| this.operationId, | ||
| ); | ||
| } catch (error) { |
Contributor
There was a problem hiding this comment.
⚠️ Argument of type 'unknown' is not assignable to parameter of type 'Error'.
| } catch (error) { | ||
| this.onError(error); | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
⚠️ Argument of type 'NexusOperationExecution | undefined' is not assignable to parameter of type 'NexusOperationExecution'.
|
|
||
| this.onUpdate(nexusOperationExecution); | ||
|
|
||
| if ( |
Contributor
There was a problem hiding this comment.
⚠️ 'nexusOperationExecution' is possibly 'undefined'.
| if ( | ||
| nexusOperationExecution.info.status === | ||
| 'NEXUS_OPERATION_EXECUTION_STATUS_RUNNING' | ||
| ) { |
Contributor
There was a problem hiding this comment.
⚠️ 'nexusOperationExecution' is possibly 'undefined'.⚠️ Type 'string | undefined' is not assignable to type 'string'.
| if ( | ||
| polledNexusOperationExecution && | ||
| !isEmptyObject(polledNexusOperationExecution) | ||
| ) { |
Contributor
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| if (error instanceof Error && error.name === 'AbortError') { | ||
| return; | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
⚠️ Argument of type 'unknown' is not assignable to parameter of type 'Error'.
Contributor
|
… operations Adds NexusOperationExecution types, extends APIRouteParameters with operationId, and registers 6 new API routes (list, describe/start, poll, cancel, terminate, count). Adds route-for helpers mirroring the standalone activities pattern. DT-4005
Adds fetchPaginatedNexusOperations, startStandaloneNexusOperation, getNexusOperationExecution, pollNexusOperationExecution, cancel, and terminate. Adds count and count-by-status service functions. DT-4005
…e nexus operations Adds nexus operation writable stores (refresh, loading, updating, count, error, query). Adds StandaloneNexusOperationPoller with long-poll loop mirroring the activity poller. Adds nexusOperationFilters store to filters.ts. DT-4005
…lone nexus operations
a654b76 to
2d37d98
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description & motivation 💭
Adds the API integration layer for the Standalone Nexus Operations feature — namespace-scoped Nexus operation executions invoked directly (not from workflows). This is Phase 1 of the Standalone Nexus Operations epic (DT-4001), mirroring the existing Standalone Activities pattern.
New files:
src/lib/types/nexus-operation-execution.ts— domain types: status enum, reuse/conflict policies, execution info (full + list subset), start request/responsesrc/lib/services/standalone-nexus-operations.ts— service functions: list (paginated), start, describe, poll (long-poll), cancel, terminatesrc/lib/services/nexus-operation-counts.ts— count and count-by-status service functionssrc/lib/stores/nexus-operations.ts— writable stores: refresh, loading, updating, count, error, query, searchParamssrc/lib/utilities/standalone-nexus-operation-poller.svelte.ts—StandaloneNexusOperationPollerclass with initial fetch + continuous long-poll loop and AbortController teardownModified files:
src/lib/types/api.ts— addsoperationIdtoAPIRouteParameters; adds new nexus operation route path typessrc/lib/utilities/route-for-api.ts— registers 6 new API routes:standalone-nexus-operations,standalone-nexus-operation,standalone-nexus-operation.poll,standalone-nexus-operation.cancel,standalone-nexus-operation.terminate,standalone-nexus-operations.countsrc/lib/utilities/route-for.ts— adds 7 route helpers mirroringrouteForStandaloneActivity*src/lib/stores/filters.ts— addsnexusOperationFiltersstoreKey differences from Standalone Activities:
Payload(notPayloads)operationId(no compoundactivityId/runId)idReusePolicyandidConflictPolicyare Nexus-specific enumsnexusHeadermap for tracing propagationScreenshots (if applicable) 📸
N/A — this PR is data/service layer only, no UI changes.
Design Considerations 🎨
None at this layer.
Testing 🧪
How was this tested 👻
Unit and integration tests are scoped to Phase 7 (DT-4007) after all feature phases ship. This PR is types/services/stores only with no rendered UI.
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Type-check and lint pass with no regressions:
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
DT-4005
Docs
No docs updates needed for this layer. Docs will be relevant when the list/detail pages ship.