import {del, get, post, put} from '../http'

const prefix = "dawn/api/v1/"

const ocpi = {
  initRoamingOperators(data) {
    return post(prefix + "init-roaming-operators", data)
  },
  assignPartyShareLocations(data) {
    return post(prefix + "assign-party-share-locations", data)
  },
  assignSharePartyLocations(data) {
    return post(prefix + "assign-share-party-locations", data)
  },
  unassignPartyShareLocations(data) {
    return post(prefix + "unassign-party-share-locations", data)
  },
  unassignSharePartyLocations(credentialId) {
    return post(prefix + "unassign-share-party-locations", data)
  },
  pagesPartyShareLocations(data) {
    return post(prefix + "party-share-location-pages", data)
  },
  pagesSharePartyLocations(data) {
    return post(prefix + "share-party-location-pages", data)
  },
  pagesRoamingOperator(data) {
    return post(prefix + "roaming-operator-pages", data)
  },
  getRoamingOperatorInfo(credentialId) {
    return get(prefix + "roaming-operators/" + credentialId)
  },
  deleteRoamingOperatorInfo(credentialId) {
    return del(prefix + "roaming-operators/" + credentialId)
  },
  pagesSendConfig(data) {
    return post(prefix + "send-config-pages", data)
  },
  getSendConfigTokens() {
    return get(prefix + "send-config-tokens")
  },
  getSendConfigUrls() {
    return get(prefix + "send-config-urls")
  },
  saveSendConfig(data) {
    return post(prefix + "send-configs", data)
  },
  updateSendConfig(data) {
    return put(prefix + "send-configs", data)
  },
  deleteSendConfig(credentialTokenId) {
    return del(prefix + "send-configs/" + credentialTokenId)
  }
}

export default ocpi;