<commit_before>import {created} from "httpstatuses"
import {omit} from "ramda"
import {session} from "@lacqueristas/resources"

export default function pushSession (client: HSDKClientType): Function {
  return function pushSessionClient (attributes: FreshSessionAttributesType): Promise<SessionResourceType> {
    return client
      .sessions
      .v1
      .create({
        payload: {
          data: {
            type: "sessions",
            attributes,
          },
        },
      })
      .then(({data, status}: {data: JSONAPIResponse, status: number}): SessionResourceType => {
        switch (status) {
          case created: {
            return omit(["__abstraction__"], session(data.data))
          }
          default: {
            return Promise.reject(new Error("We received an unexpected status code from the server"))
          }
        }
      })
  }
}<commit_msg>Only push out the email+password<commit_after>import {created} from "httpstatuses"
import {omit} from "ramda"
import {session} from "@lacqueristas/resources"

export default function pushSession (client: HSDKClientType): Function {
  return function pushSessionClient (attributes: FreshSessionAttributesType): Promise<SessionResourceType> {
    const {email} = attributes
    const {password} = attributes

    return client
      .sessions
      .v1
      .create({
        payload: {
          data: {
            type: "sessions",
            attributes: {
              email,
              password
            },
          },
        },
      })
      .then(({data, status}: {data: JSONAPIResponse, status: number}): SessionResourceType => {
        switch (status) {
          case created: {
            return omit(["__abstraction__"], session(data.data))
          }
          default: {
            return Promise.reject(new Error("We received an unexpected status code from the server"))
          }
        }
      })
  }
}
{'fraction_non_alphanumeric': 0.10643821391484942, 'fraction_numerical': 0.0010384215991692627, 'mean_word_length': 2.17986798679868, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '11150', 'n_tokens_mistral': 503, 'n_tokens_neox': 492, 'n_words': 134}