/** * Copyright 2022 Gravwell, Inc. All rights reserved. * * Contact: [legal@gravwell.io](mailto:legal@gravwell.io) * * This software may be modified and distributed under the terms of the MIT * license. See the LICENSE file for details. */ import { CreatableTemplate } from '~/models/template/creatable-template'; import { RawTemplate } from '~/models/template/raw-template'; import { Template } from '~/models/template/template'; import { toRawCreatableTemplate } from '~/models/template/to-raw-creatable-template'; import { toTemplate } from '~/models/template/to-template'; import { APIContext } from '../utils/api-context'; import { buildHTTPRequestWithAuthFromContext } from '../utils/build-http-request'; import { buildURL } from '../utils/build-url'; import { HTTPRequestOptions } from '../utils/http-request-options'; import { parseJSONResponse } from '../utils/parse-json-response'; export const makeCreateOneTemplate = (context: APIContext): ((data: CreatableTemplate) => Promise