<commit_before>import { freezeSys, toPlainObject } from 'contentful-sdk-core'
import copy from 'fast-copy'
import { DefaultElements, MakeRequest, MetaSysProps } from '../common-types'
import { wrapCollection } from '../common-utils'
import enhanceWithMethods from '../enhance-with-methods'

export type PreviewApiKeyProps = {
  sys: MetaSysProps
  name: string
  description: string
}

export interface PreviewApiKey extends PreviewApiKeyProps, DefaultElements<PreviewApiKeyProps> {}

/**
 * @private
 */
function createPreviewApiKeyApi() {
  return {}
}

/**
 * @private
 * @param makeRequest - function to make requests via an adapter
 * @param data - Raw api key data
 * @return Wrapped preview api key data
 */
export function wrapPreviewApiKey(
  _makeRequest: MakeRequest,
  data: PreviewApiKeyProps<commit_msg>fix: add missing accessToken property on preview API key response (#1037)<commit_after>import { freezeSys, toPlainObject } from 'contentful-sdk-core'
import copy from 'fast-copy'
import { DefaultElements, MakeRequest, MetaSysProps } from '../common-types'
import { wrapCollection } from '../common-utils'
import enhanceWithMethods from '../enhance-with-methods'

export type PreviewApiKeyProps = {
  sys: MetaSysProps
  name: string
  description: string
  accessToken: string
}

export interface PreviewApiKey extends PreviewApiKeyProps, DefaultElements<PreviewApiKeyProps> {}

/**
 * @private
 */
function createPreviewApiKeyApi() {
  return {}
}

/**
 * @private
 * @param makeRequest - function to make requests via an adapter
 * @param data - Raw api key data
 * @return Wrapped preview api key data
 */
export function wrapPreviewApiKey(
  _makeRequest: MakeRequest,
  data: PreviewApiKeyProps
{'fraction_non_alphanumeric': 0.09731934731934731, 'fraction_numerical': 0.002331002331002331, 'mean_word_length': 4.860068259385666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5693656', 'n_tokens_mistral': 481, 'n_tokens_neox': 476, 'n_words': 153}