{"version":3,"file":"data-elements.cjs","names":["createDataElement","propertyId","dataElement","post","data","deleteDataElement","dataElementId","delete","getDataElement","get","getExtensionForDataElement","getPropertyForDataElement","getOriginForDataElement","listDataElementsForProperty","queryParams","listLibrariesForDataElement","listRevisionsForDataElement","reviseDataElement","patch","createReviseBody","updateDataElement","dataElementPatch","id","createNoteForDataElement","note"],"sources":["../../src/data-elements.js"],"sourcesContent":["/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n// DataElements\n// https://developer.adobelaunch.com/api/data_elements\n\n// Create a DataElement\n// https://developer.adobelaunch.com/api/data_elements/create/\nexport function createDataElement(propertyId, dataElement) {\n  return this.post(`/properties/${propertyId}/data_elements`, {\n    data: dataElement\n  });\n}\n\n// Delete a DataElement\n// https://developer.adobelaunch.com/api/data_elements/delete/\nexport function deleteDataElement(dataElementId) {\n  return this.delete(`/data_elements/${dataElementId}`);\n}\n\n// Get a DataElement\n// https://developer.adobelaunch.com/api/data_elements/fetch/\nexport function getDataElement(dataElementId) {\n  return this.get(`/data_elements/${dataElementId}`);\n}\n\n// Get the Extension\n// https://developer.adobelaunch.com/api/data_elements/extension/\nexport function getExtensionForDataElement(dataElementId) {\n  return this.get(`/data_elements/${dataElementId}/extension`);\n}\n\n// Get the Property\n// https://developer.adobelaunch.com/api/data_elements/property/\nexport function getPropertyForDataElement(dataElementId) {\n  return this.get(`/data_elements/${dataElementId}/property`);\n}\n\n// Get the origin\n// https://developer.adobelaunch.com/api/data_elements/origin/\nexport function getOriginForDataElement(dataElementId) {\n  return this.get(`/data_elements/${dataElementId}/origin`);\n}\n\n// List DataElements for a Property\n// https://developer.adobelaunch.com/api/data_elements/list/\nexport function listDataElementsForProperty(propertyId, queryParams) {\n  return this.get(`/properties/${propertyId}/data_elements`, queryParams);\n}\n\n// List the Libraries for a DataElement\n// https://developer.adobelaunch.com/api/data_elements/libraries/\nexport function listLibrariesForDataElement(dataElementId, queryParams) {\n  return this.get(`/data_elements/${dataElementId}/libraries`, queryParams);\n}\n\n// List the revisions for a DataElement\n// https://developer.adobelaunch.com/api/data_elements/revisions/\nexport function listRevisionsForDataElement(dataElementId) {\n  return this.get(`/data_elements/${dataElementId}/revisions`);\n}\n\n// Revise\n// https://developer.adobelaunch.com/api/data_elements/revise/\nexport function reviseDataElement(dataElementId) {\n  return this.patch(\n    `/data_elements/${dataElementId}`,\n    this.createReviseBody('data_elements', dataElementId)\n  );\n}\n\n// Update a DataElement\n// https://developer.adobelaunch.com/api/data_elements/update/\nexport function updateDataElement(dataElementPatch) {\n  return this.patch(`/data_elements/${dataElementPatch.id}`, {\n    data: dataElementPatch\n  });\n}\n\n// Create a note for DataElement\n// https://developer.adobelaunch.com/api/data_elements/:data_element_id/notes\nexport function createNoteForDataElement(dataElementId, note) {\n  return this.post(`/data_elements/${dataElementId}/notes`, {\n    data: note\n  });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACO,SAASA,iBAAiBA,CAACC,UAAU,EAAEC,WAAW,EAAE;EACzD,OAAO,IAAI,CAACC,IAAI,CAAC,eAAeF,UAAU,gBAAgB,EAAE;IAC1DG,IAAI,EAAEF;EACR,CAAC,CAAC;AACJ;;AAEA;AACA;AACO,SAASG,iBAAiBA,CAACC,aAAa,EAAE;EAC/C,OAAO,IAAI,CAACC,MAAM,CAAC,kBAAkBD,aAAa,EAAE,CAAC;AACvD;;AAEA;AACA;AACO,SAASE,cAAcA,CAACF,aAAa,EAAE;EAC5C,OAAO,IAAI,CAAC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