
// Typings. (Can be re-generated.)
<%- insertFragment('imports') %>
<%- insertFragment('init') %>

declare module '*.json'<%- sc %>

// Application.
<%# -%>
<%# --- if-1 starts below. -%>
<% if (specs.app.providers.indexOf('primus') !== -1) { -%>
declare module 'primus'<%- sc %>
<% } -%>
<%# --- if-1 ends above. -%>
<%# -%>
<%# -%>
<%# === Authentication ========================================================================= -%>
<%# --- if-2 starts below. -%>
<% if (specs.authentication && specs.authentication.strategies.length &&
  (specs.authentication.strategies.indexOf('auth0') !== -1 || specs.authentication.strategies.indexOf('google') !== -1)) {
-%>

// Authentication.
<% } -%>
<%# --- if-2 ends above. -%>
<%# -%>
<%# --- if-3 starts below. -%>
<% if (specs.authentication && specs.authentication.strategies.indexOf('auth0') !== -1) { -%>
declare module 'passport-auth0'<%- sc %>
<% } -%>
<%# --- if-3 ends above. -%>
<%# --- if-4 starts below. -%>
<% if (specs.authentication && specs.authentication.strategies.indexOf('google') !== -1) { -%>
declare module 'passport-google-oauth20'<%- sc %>
<% } -%>
<%# --- if-4 ends above. -%>
<%# -%>
<%# === Adapters =============================================================================== -%>
<%
  const __adapters1 = Object.keys(specs.services).map(name => specs.services[name].adapter);
  const __adapters = generators = [...new Set(__adapters1)].sort(); // Get unique adapters.
-%>
<%# -%>
<%# --- if-5 starts below. -%>
<% if (__adapters.length) { -%>

// Services.
<% } -%>
<%# --- if-5 ends above. -%>
<%# -%>
<%# --- forEach-6 starts below. -%>
<% __adapters.forEach(name => { -%>
declare module 'feathers-<%- name %>'<%- sc %>
<% }) -%>
<%# --- forEach-6 ends above. -%>
<%# -%>
<%# === GraphQL ================================================================================ -%>
<%# -%>
<%# --- if-5 starts below. -%>
<% if (specs.graphql) { -%>

// GraphQL.
declare module '@feathers-plus/graphql'<%- sc %>
declare module 'merge-graphql-schemas'<%- sc %>
<% } -%>
<%# --- if-5 ends above. -%>
<%# --- if-7 starts below. -%>
<% if (specs.app.seedData) { -%>

// Seed.
declare module '@feathers-plus/test-utils'<%- sc %>
<% } -%>
<%# --- if-7 ends above. -%>

<%- insertFragment('more') %>

<%- insertFragment('funcs') %>
<%- insertFragment('end') %>
