UNPKG

@cgignite/ignite-sf-commerce

Version:

Salesforce Commerce connector for Ignite

63 lines (58 loc) 2.48 kB
<script type="text/javascript"> RED.nodes.registerType('configuration', { category: 'salesforce commerce', color: '#00a1e0', defaults: { name: { value: "" }, commerceCloud : { type: "commerceCloud-config" }, // tokenType: { value: "guestToken" }, // shortCode: { value: "" }, // version: { value: "v1" }, // organizationId: { value: "" }, // siteId: { value: "" }, // clientId: { value: "" }, // clientSecret: { value: "" }, // custUsername: { value: "" }, // custPassword: { value: "" }, }, inputs: 1, outputs: 1, icon: 'font-awesome/fa-cogs', label: function () { return this.name; }, oneditprepare: function () { $("#node-input-tokenType").on("change", function () { $(".custTokenItem").hide(); $(".authTokenItem").hide(); if ($("#node-input-tokenType").val() === "custToken") { $(".custTokenItem").show(); } else if($("#node-input-tokenType").val() === "authToken"){ $(".authTokenItem").show(); }else { $(".custTokenItem").hide(); $(".authTokenItem").hide(); } }); } }); </script> <script type="text/html" data-template-name="configuration"> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> <div class="form-row"> <label for="node-input-authconfig"><i class="fa fa-cogs"></i>Setting</label> <input type="text" id="node-input-commerceCloud" placeholder="Setting"> </div> </script> <script type="text/html" data-help-name="configuration"> <p>Configuration Node handles api authentication for salesforce commerce configuration api access. It gets you the access token to make subsequent api requests.</p> <br> <p>Provide all the required information to get an access token in configuration node.</p> <br> <p>This information will be preserved inside msg.commerceCloudConfig object for further use.</p> <br> <p>Token will be preserved inside msg.commerceCloudToken for further use and msg.payload as an output of this node.</p> </script>