patchbayNavigationGoCommandDescriptor top-level constant

PatchbayCommandDescriptor const patchbayNavigationGoCommandDescriptor

Implementation

const PatchbayCommandDescriptor patchbayNavigationGoCommandDescriptor =
    PatchbayCommandDescriptor(
      name: 'navigation.go',
      summary: 'go to a cataloged consumer destination.',
      plane: PatchbayPlane.flutterUi,
      mode: PatchbayCommandMode.immediate,
      sideEffect: PatchbaySideEffect.appState,
      factSources: <PatchbayFactSource>{PatchbayFactSource.uiObserved},
      parameters: <PatchbayParameterDescriptor>[
        PatchbayParameterDescriptor(
          name: 'destinationId',
          type: PatchbayParameterType.string,
          required: true,
        ),
        PatchbayParameterDescriptor(
          name: 'revision',
          type: PatchbayParameterType.integer,
          required: true,
        ),
        PatchbayParameterDescriptor(
          name: 'timeoutMs',
          type: PatchbayParameterType.integer,
          defaultValue: 5000,
        ),
      ],
      cliSyntax: <PatchbayCliSyntax>[
        PatchbayCliSyntax(
          id: 'navigationGo',
          path: <String>['navigation', 'go'],
          summary: 'Replace navigation state with a destination.',
          usageSuffix: '<destination-id> [--revision <revision>]',
          positionalParameters: <String>['destinationId'],
          optionParameters: <String, String>{
            'revision': 'revision',
            'timeoutMs': 'timeout-ms',
          },
          positiveParameters: <String>{'timeoutMs'},
          fencesNavigationRevision: true,
        ),
      ],
    );