UNPKG

@adobe/reactor-sdk

Version:
1 lines 4.5 kB
{"version":3,"file":"rule-components.cjs","names":["createRuleComponent","propertyId","ruleComponent","post","data","deleteRuleComponent","ruleComponentId","delete","getRuleComponent","get","getExtensionForRuleComponent","listRulesForRuleComponent","getOriginForRuleComponent","listRuleComponentsForRule","ruleId","queryParams","updateRuleComponent","ruleComponentPatch","patch","id","createNoteForRuleComponent","note"],"sources":["../../src/rule-components.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// RuleComponents\n// https://developer.adobelaunch.com/api/rule_components\n\n// Create a RuleComponent\n// https://developer.adobelaunch.com/api/reference/1.0/rule_components/create/\nexport function createRuleComponent(propertyId, ruleComponent) {\n return this.post(`/properties/${propertyId}/rule_components`, {\n data: ruleComponent\n });\n}\n\n// Delete a RuleComponent\n// https://developer.adobelaunch.com/api/rule_components/delete/\nexport function deleteRuleComponent(ruleComponentId) {\n return this.delete(`/rule_components/${ruleComponentId}`);\n}\n\n// Get a RuleComponent\n// https://developer.adobelaunch.com/api/rule_components/fetch/\nexport function getRuleComponent(ruleComponentId) {\n return this.get(`/rule_components/${ruleComponentId}`);\n}\n\n// Get the Extension\n// https://developer.adobelaunch.com/api/rule_components/extension/\nexport function getExtensionForRuleComponent(ruleComponentId) {\n return this.get(`/rule_components/${ruleComponentId}/extension`);\n}\n\n// List Rules for a RuleComponent\nexport function listRulesForRuleComponent(ruleComponentId) {\n return this.get(`/rule_components/${ruleComponentId}/rules`);\n}\n\n// Get the origin\n// https://developer.adobelaunch.com/api/rule_components/origin/\nexport function getOriginForRuleComponent(ruleComponentId) {\n return this.get(`/rule_components/${ruleComponentId}/origin`);\n}\n\n// List RuleComponents for a Rule\n// https://developer.adobelaunch.com/api/rule_components/list/\nexport function listRuleComponentsForRule(ruleId, queryParams) {\n return this.get(`/rules/${ruleId}/rule_components`, queryParams);\n}\n\n// Update a RuleComponent\n// https://developer.adobelaunch.com/api/rule_components/update/\nexport function updateRuleComponent(ruleComponentPatch) {\n return this.patch(`/rule_components/${ruleComponentPatch.id}`, {\n data: ruleComponentPatch\n });\n}\n\n// Create a note for RuleComponent\n// https://developer.adobelaunch.com/api/rule_components/:rule_component_id/notes\nexport function createNoteForRuleComponent(ruleComponentId, note) {\n return this.post(`/rule_components/${ruleComponentId}/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,mBAAmBA,CAACC,UAAU,EAAEC,aAAa,EAAE;EAC7D,OAAO,IAAI,CAACC,IAAI,CAAC,eAAeF,UAAU,kBAAkB,EAAE;IAC5DG,IAAI,EAAEF;EACR,CAAC,CAAC;AACJ;;AAEA;AACA;AACO,SAASG,mBAAmBA,CAACC,eAAe,EAAE;EACnD,OAAO,IAAI,CAACC,MAAM,CAAC,oBAAoBD,eAAe,EAAE,CAAC;AAC3D;;AAEA;AACA;AACO,SAASE,gBAAgBA,CAACF,eAAe,EAAE;EAChD,OAAO,IAAI,CAACG,GAAG,CAAC,oBAAoBH,eAAe,EAAE,CAAC;AACxD;;AAEA;AACA;AACO,SAASI,4BAA4BA,CAACJ,eAAe,EAAE;EAC5D,OAAO,IAAI,CAACG,GAAG,CAAC,oBAAoBH,eAAe,YAAY,CAAC;AAClE;;AAEA;AACO,SAASK,yBAAyBA,CAACL,eAAe,EAAE;EACzD,OAAO,IAAI,CAACG,GAAG,CAAC,oBAAoBH,eAAe,QAAQ,CAAC;AAC9D;;AAEA;AACA;AACO,SAASM,y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