lestoitsduval-alerting/node_modules/node-mailjet/mailjet.web.js

3 lines
622 KiB
JavaScript
Raw Normal View History

2024-09-09 18:01:24 +02:00
/*! For license information please see mailjet.web.js.LICENSE.txt */
define((function(){return function(){var e={76:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(6),a=i(n(874)),u=i(n(771)),c=i(n(147)),l=function(){function e(e){if(!(0,s.isPureObject)(e))throw new Error('Argument "params" must be object');this.init(this.cloneParams(e))}return e.prototype.getPackageVersion=function(){return this.version},e.prototype.getAPIKey=function(){return this.apiKey},e.prototype.getAPISecret=function(){return this.apiSecret},e.prototype.getAPIToken=function(){return this.apiToken},e.prototype.getConfig=function(){return o({},this.config)},e.prototype.getOptions=function(){return o({},this.options)},e.prototype.get=function(e,t){return new u.default(this,a.default.Get,e,t)},e.prototype.post=function(e,t){return new u.default(this,a.default.Post,e,t)},e.prototype.put=function(e,t){return new u.default(this,a.default.Put,e,t)},e.prototype.delete=function(e,t){return new u.default(this,a.default.Delete,e,t)},e.prototype.init=function(t){if(!(0,s.isPureObject)(t))throw new Error('Argument "params" must be object');var n=t.apiToken,r=t.apiKey,o=t.apiSecret,i=t.options,a=t.config;return this.version=e.packageJSON.version,this.setConfig(null!=a?a:null),this.setOptions(null!=i?i:null),"apiToken"in t?this.tokenConnectStrategy(n):this.basicConnectStrategy(r,o)},e.prototype.cloneParams=function(e){if(!(0,s.isPureObject)(e))throw new Error('Argument "params" must be object');var t=o({},e);return e.config&&(t.config=o({},e.config)),e.options&&(t.options=o({},e.options),t.options.proxy&&(t.options.proxy=o({},t.options.proxy)),t.options.headers&&(t.options.headers=o({},t.options.headers))),t},e.prototype.setConfig=function(t){if("object"!==r(t))throw new Error('Argument "customConfig" must be object or null');var n=o({},e.config);return null!==t&&((0,s.setValueIfNotNil)(n,"host",t.host),(0,s.setValueIfNotNil)(n,"output",t.output),(0,s.setValueIfNotNil)(n,"version",t.version)),this.config=n,this},e.prototype.setOptions=function(e){if("object"!==r(e))throw new Error('Argument "options" must be object or null');return this.options=null!=e?e:{},this},e.prototype.tokenConnectStrategy=function(e){if(!e)throw new Error("Mailjet API_TOKEN is required");return this.apiToken=e,this},e.prototype.basicConnectStrategy=function(e,t){if(!e)throw new Error("Mailjet API_KEY is required");if(!t)throw new Error("Mailjet API_SECRET is required");return this.apiKey=e,this.apiSecret=t,this},e.apiConnect=function(t,n,r){return new e(o({apiKey:t,apiSecret:n},r))},e.smsConnect=function(t,n){return new e(o({apiToken:t},n))},e.config=Object.freeze({host:"api.mailjet.com",version:"v3",output:"json"}),e.packageJSON=Object.freeze(o({},c.default)),e}();t.default=l},321:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=thi
//# sourceMappingURL=data:application/json;charset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