/** * 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 { RawTemplate } from '~/models/template/raw-template'; import { Template } from '~/models/template/template'; import { toRawUpdatableTemplate } from '~/models/template/to-raw-updatable-template'; import { toTemplate } from '~/models/template/to-template'; import { UpdatableTemplate } from '~/models/template/updatable-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'; import { makeGetOneTemplate } from './get-one-template'; export const makeUpdateOneTemplate = (context: APIContext): ((data: UpdatableTemplate) => Promise