@adobe/reactor-sdk
Version:
JavaScript SDK for the Reactor API
88 lines (76 loc) • 3.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createNoteForRuleComponent = createNoteForRuleComponent;
exports.createRuleComponent = createRuleComponent;
exports.deleteRuleComponent = deleteRuleComponent;
exports.getExtensionForRuleComponent = getExtensionForRuleComponent;
exports.getOriginForRuleComponent = getOriginForRuleComponent;
exports.getRuleComponent = getRuleComponent;
exports.listRuleComponentsForRule = listRuleComponentsForRule;
exports.listRulesForRuleComponent = listRulesForRuleComponent;
exports.updateRuleComponent = updateRuleComponent;
/*
Copyright 2019 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
// RuleComponents
// https://developer.adobelaunch.com/api/rule_components
// Create a RuleComponent
// https://developer.adobelaunch.com/api/reference/1.0/rule_components/create/
function createRuleComponent(propertyId, ruleComponent) {
return this.post(`/properties/${propertyId}/rule_components`, {
data: ruleComponent
});
}
// Delete a RuleComponent
// https://developer.adobelaunch.com/api/rule_components/delete/
function deleteRuleComponent(ruleComponentId) {
return this.delete(`/rule_components/${ruleComponentId}`);
}
// Get a RuleComponent
// https://developer.adobelaunch.com/api/rule_components/fetch/
function getRuleComponent(ruleComponentId) {
return this.get(`/rule_components/${ruleComponentId}`);
}
// Get the Extension
// https://developer.adobelaunch.com/api/rule_components/extension/
function getExtensionForRuleComponent(ruleComponentId) {
return this.get(`/rule_components/${ruleComponentId}/extension`);
}
// List Rules for a RuleComponent
function listRulesForRuleComponent(ruleComponentId) {
return this.get(`/rule_components/${ruleComponentId}/rules`);
}
// Get the origin
// https://developer.adobelaunch.com/api/rule_components/origin/
function getOriginForRuleComponent(ruleComponentId) {
return this.get(`/rule_components/${ruleComponentId}/origin`);
}
// List RuleComponents for a Rule
// https://developer.adobelaunch.com/api/rule_components/list/
function listRuleComponentsForRule(ruleId, queryParams) {
return this.get(`/rules/${ruleId}/rule_components`, queryParams);
}
// Update a RuleComponent
// https://developer.adobelaunch.com/api/rule_components/update/
function updateRuleComponent(ruleComponentPatch) {
return this.patch(`/rule_components/${ruleComponentPatch.id}`, {
data: ruleComponentPatch
});
}
// Create a note for RuleComponent
// https://developer.adobelaunch.com/api/rule_components/:rule_component_id/notes
function createNoteForRuleComponent(ruleComponentId, note) {
return this.post(`/rule_components/${ruleComponentId}/notes`, {
data: note
});
}
//# sourceMappingURL=rule-components.cjs.map