Nog CLI Developer Guide - v0.11.0
    Preparing search index...

    Utility class for building statements inside service methods. Designed to be injected via DI.

    Index

    Constructors

    Methods

    • Generates all statements for the Observable method body:

      • Query params extraction via this.rb.buildQuery(params?.query, [...] as const)
      • Headers setup: this.rb.buildHeaders when header params exist, plain spread otherwise
      • Accept / Content-Type assignments (after buildHeaders so they override)
      • HTTP return statement with generic type

      Parameters

      Returns Statement[]

    • Generates the wrapper call for Promise methods: return firstValueFrom(this.methodName$(arg1, arg2)).then((res) => res.data);

      Parameters

      • methodName: string
      • args: string[]
      • OptionalreturnType: TypeNode

      Returns ReturnStatement

    • Emits a relative path; axios prepends baseURL from HttpModule.register.

      Parameters

      • pathTemplate: string
      • pathParamNames: string[] = []

      Returns VariableStatement[]