All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.client.index.pebble Maven / Gradle / Ivy

There is a newer version: 3.3.2
Show newest version
/* eslint-disable no-use-before-define */
// generated {{ timestamp | date("yyyy-MM-dd HH:mm:ss", timeZone="Europe/Berlin") }}

import { AxiosInstance, AxiosRequestConfig } from "axios";

{% for c in controllers %}
import { {{ c.shortName -}}Api, create{{- c.shortName -}}Api  } from "./{{- c.fileName -}}";
{% endfor %}

{% for c in controllers %}
export * from "./{{- c.fileName -}}";
{% endfor %}


export interface {{ groupName }} {
{% for c in controllers %}
  {{ c.fieldName -}}: {{ c.shortName -}}Api;
{% endfor %}
}

export function create{{ groupName -}}(client?: AxiosInstance, cf?: AxiosRequestConfig): {{ groupName }} {
{% for c in controllers %}
  const {{ c.fieldName -}} = create{{- c.shortName -}}Api(client, cf);
{% endfor %}

  return {
{% for c in controllers %}
    {{ c.fieldName }}{% if not loop.last %}, {% endif %}

{% endfor %}
  };
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy