Logos DX
    Preparing search index...

    Manages URL parameters for FetchEngine with event emission.

    Wraps PropertyStore with FetchEngine-specific event emission. Pulls initial params and validation from engine options.

    // Access via engine.params
    engine.params.set('apiKey', 'abc123');
    engine.params.set({ page: '1', limit: '10' });

    // Method-specific params
    engine.params.set('format', 'json', 'GET');

    // Remove params
    engine.params.remove('apiKey');
    engine.params.remove(['page', 'limit']);

    // Check if param exists
    if (engine.params.has('apiKey')) { ... }

    // Get resolved params for a request
    const params = engine.params.resolve('GET', { extra: 'value' });

    Type Parameters

    • P = unknown

      Params type

    Index

    Constructors

    Accessors

    • get $store(): PropertyStore<DictAndT<P>>
      Internal

      Get the underlying PropertyStore for internal use.

      Exposed for FetchEngineCore compliance. Internal components (executor, policies) access the store directly for resolution.

      Returns PropertyStore<DictAndT<P>>

    • get all(): { default: DictAndT<P> } & Record<string, Partial<DictAndT<P>>>

      Get all params including method overrides.

      Returns { default: DictAndT<P> } & Record<string, Partial<DictAndT<P>>>

      const all = engine.params.all;
      // { default: { apiKey: '...' }, get: { format: '...' } }
    • get defaults(): DictAndT<P>

      Get the default params (without method overrides).

      Returns DictAndT<P>

    Methods

    • Get method-specific params only (not merged with defaults).

      Parameters

      • method: string

      Returns Partial<DictAndT<P>>

    • Check if a param exists globally or for a specific method.

      Parameters

      • key: string
      • Optionalmethod: string

      Returns boolean

      if (engine.params.has('apiKey')) {
      console.log('API key is set');
      }
    • Remove a param globally or for a specific method.

      Parameters

      • key: string
      • Optionalmethod: string

      Returns void

      engine.params.remove('apiKey');
      engine.params.remove('format', 'GET');
    • Remove multiple params globally or for a specific method.

      Parameters

      • keys: string[]
      • Optionalmethod: string

      Returns void

      engine.params.remove(['page', 'limit']);
      engine.params.remove(['format'], 'GET');
    • Resolve the final params for a specific method.

      Merges in order: defaults → method overrides → request overrides.

      Parameters

      Returns DictAndT<P>

      const params = engine.params.resolve('GET', { extra: 'value' });
      
    • Set a param value globally or for a specific method.

      Parameters

      • key: string
      • value: string
      • Optionalmethod: string

      Returns void

      engine.params.set('apiKey', 'abc123');
      engine.params.set('format', 'json', 'GET');
    • Set multiple param values globally or for a specific method.

      Parameters

      Returns void

      engine.params.set({ page: '1', limit: '10' });
      engine.params.set({ format: 'json' }, 'GET');