@adobe/reactor-sdk
Version:
JavaScript SDK for the Reactor API
1 lines • 2.86 kB
Source Map (JSON)
{"version":3,"file":"properties.cjs","names":["createProperty","companyId","property","post","data","getProperty","propertyId","get","getCompanyForProperty","listPropertiesForCompany","queryParams","updateProperty","propertyPatch","patch","id","deleteProperty","delete","createNoteForProperty","note"],"sources":["../../src/properties.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\nexport function createProperty(companyId, property) {\n return this.post(`/companies/${companyId}/properties`, { data: property });\n}\n\nexport function getProperty(propertyId) {\n return this.get(`/properties/${propertyId}`);\n}\n\nexport function getCompanyForProperty(propertyId) {\n return this.get(`/properties/${propertyId}/company`);\n}\n\nexport function listPropertiesForCompany(companyId, queryParams) {\n return this.get(`/companies/${companyId}/properties`, queryParams);\n}\n\nexport function updateProperty(propertyPatch) {\n return this.patch(`/properties/${propertyPatch.id}`, { data: propertyPatch });\n}\n\nexport function deleteProperty(propertyId) {\n return this.delete(`/properties/${propertyId}`);\n}\n\n// Create a note for Property\n// https://developer.adobelaunch.com/api/properties/:property_id/notes\nexport function createNoteForProperty(propertyId, note) {\n return this.post(`/properties/${propertyId}/notes`, {\n data: note\n });\n}\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,SAASA,cAAcA,CAACC,SAAS,EAAEC,QAAQ,EAAE;EAClD,OAAO,IAAI,CAACC,IAAI,CAAC,cAAcF,SAAS,aAAa,EAAE;IAAEG,IAAI,EAAEF;EAAS,CAAC,CAAC;AAC5E;AAEO,SAASG,WAAWA,CAACC,UAAU,EAAE;EACtC,OAAO,IAAI,CAACC,GAAG,CAAC,eAAeD,UAAU,EAAE,CAAC;AAC9C;AAEO,SAASE,qBAAqBA,CAACF,UAAU,EAAE;EAChD,OAAO,IAAI,CAACC,GAAG,CAAC,eAAeD,UAAU,UAAU,CAAC;AACtD;AAEO,SAASG,wBAAwBA,CAACR,SAAS,EAAES,WAAW,EAAE;EAC/D,OAAO,IAAI,CAACH,GAAG,CAAC,cAAcN,SAAS,aAAa,EAAES,WAAW,CAAC;AACpE;AAEO,SAASC,cAAcA,CAACC,aAAa,EAAE;EAC5C,OAAO,IAAI,CAACC,KAAK,CAAC,eAAeD,aAAa,CAACE,EAAE,EAAE,EAAE;IAAEV,IAAI,EAAEQ;EAAc,CAAC,CAAC;AAC/E;AAEO,SAASG,cAAcA,CAACT,UAAU,EAAE;EACzC,OAAO,IAAI,CAACU,MAAM,CAAC,eAAeV,UAAU,EAAE,CAAC;AACjD;;AAEA;AACA;AACO,SAASW,qBAAqBA,CAACX,UAAU,EAAEY,IAAI,EAAE;EACtD,OAAO,IAAI,CAACf,IAAI,CAAC,eAAeG,UAAU,QAAQ,EAAE;IAClDF,IAAI,EAAEc;EACR,CAAC,CAAC;AACJ","ignoreList":[]}