Socket
Socket
Sign inDemoInstall

@tayeh/web-client

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tayeh/web-client - npm Package Compare versions

Comparing version 1.0.2-alpha.2 to 1.0.3-alpha.2

2

dist/index.js

@@ -1,2 +0,2 @@

function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var n=t(require("axios")),e=t(require("querystringify"));function r(){return(r=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function s(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}var i,a=function(){function t(t){if(this.API_KEY=t.API_KEY,this.API_SECRET=t.API_SECRET,"string"!=typeof this.API_KEY||"string"!=typeof this.API_SECRET)throw new Error("You should define API_KEY & API_SECRET.");this.basePath=t.basePath||"https://api.tayeh.ir/",this.get_token()}var e=t.prototype;return e.get_token=function(){try{var t=this,n=t.basePath+"api/token";return Promise.resolve(function(e,r){try{var s=Promise.resolve(t.get(n,{auth:{username:t.API_KEY,password:t.API_SECRET}})).then(function(n){var e=n.token;return n.err?(t.API_ACCESS=null,!1):(t.API_ACCESS=e,!0)})}catch(t){return r(t)}return s&&s.then?s.then(void 0,r):s}(0,function(t){throw new Error(t)}))}catch(t){return Promise.reject(t)}},e.delete=function(t,e){var s=this.basePath+t,i=r({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},e);return n.delete(s,i)},e.get=function(t,e){var s=this.basePath+t,i=r({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},e);return n.get(s,i)},e.post=function(t,e,s){void 0===e&&(e={});var i=this.basePath+t,a=r({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},s);return n.post(i,e,a)},t}(),c=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var e=n.prototype;return e.getMedia=function(t){return this.get("media/get/"+t)},e.uploadMedia=function(t){return this.post("media/upload",t)},n}(a),o=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var r=n.prototype;return r.getInstance=function(t){return this.get("instance/"+t)},r.createInstance=function(t){return this.post("instance/instance",t)},r.updateInstance=function(t){return this.post("instance/instance/update",t)},r.getInstancePage=function(t,n){var r="instance/page/"+t;return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceProducts=function(t,n){var r="instance/"+t+"/products";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.createInstanceProduct=function(t,n){return this.post("instance/"+t+"/product",n)},r.deleteInstanceProduct=function(t,n){return this.delete("instance/"+t+"/product/"+n)},r.updateInstanceProduct=function(t,n){return this.post("instance/"+t+"/product/update",n)},r.getInstanceTransactions=function(t){return this.get("instance/"+t+"/transactions")},r.findInstanceTransactions=function(t,n){var r="instance/"+t+"/transactions/open";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getProductTransactions=function(t,n){return this.get("instance/"+t+"/transactions/product/"+n)},r.deleteInstanceTransaction=function(t,n){return this.delete("instance/"+t+"/transaction/"+n)},r.createInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction",n)},r.updateInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction/update",n)},r.getInstanceInvoices=function(t,n){var r="instance/"+t+"/invoices";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceInvoice=function(t,n){return this.get("instance/"+t+"/invoice/"+n)},r.deleteInstanceInvoice=function(t,n){return this.delete("instance/"+t+"/invoice/"+n)},r.createInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice",n)},r.updateInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice/update",n)},r.getInstanceSeries=function(t,n){var r="instance/"+t+"/series";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceTotal=function(t,n){var r="instance/"+t+"/total/monthly";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceRevenue=function(t,n){var r="instance/"+t+"/revenue";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceCustomers=function(t,n){var r="instance/"+t+"/customers";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceCustomer=function(t,n){return this.get("instance/"+t+"/customer/"+n)},r.deleteInstanceCustomer=function(t,n){return this.delete("instance/"+t+"/customer/"+n)},r.createInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer",n)},r.updateInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer/update",n)},r.getInstanceUsers=function(t,n){var r="instance/"+t+"/users";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceUser=function(t,n){return this.get("instance/"+t+"/user/"+n)},r.deleteInstanceUser=function(t,n){return this.delete("instance/"+t+"/user/"+n)},r.createInstanceUser=function(t,n){return this.post("instance/"+t+"/user",n)},r.updateInstanceUser=function(t,n){return this.post("instance/"+t+"/user/update",n)},r.getInstanceAddresses=function(t,n){var r="instance/"+t+"/addresses";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.deleteInstanceAddress=function(t,n){return this.delete("instance/"+t+"/address/"+n)},r.createInstanceAddress=function(t,n){return this.post("instance/"+t+"/address",n)},r.updateInstanceAddress=function(t,n){return this.post("instance/"+t+"/address/update",n)},n}(a),u=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var r=n.prototype;return r.getUserMe=function(){return this.get("user/me")},r.getInstancePrimary=function(){return this.get("user/instance/primary")},r.setInstancePrimary=function(t){var n="user/instance/primary";return n+=e.stringify(t,"?"),this.post(n)},r.getUserInstances=function(t){return t&&e.stringify(t,"?"),this.get("user/instances")},n}(a),p=function(t){function n(){return t.apply(this,arguments)||this}return s(n,t),n.prototype.getCustomerMe=function(t){return this.get("customer/"+t+"/me")},n}(a),h=function(t){function n(){return t.apply(this,arguments)||this}return s(n,t),n}(a);i=h,[o,u,c,p].forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(n){Object.defineProperty(i.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})}),module.exports=h;
function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var n=t(require("axios")),e=t(require("querystringify"));function r(){return(r=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function s(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}var i,a=function(){function t(t){if(this.API_KEY=t.API_KEY,this.API_SECRET=t.API_SECRET,"string"!=typeof this.API_KEY||"string"!=typeof this.API_SECRET)throw new Error("You should define API_KEY & API_SECRET.");this.basePath=t.basePath||"https://api.tayeh.ir/",this.get_token()}var e=t.prototype;return e.get_token=function(){try{var t=this;return Promise.resolve(function(n,e){try{var r=Promise.resolve(t.get("api/token",{auth:{username:t.API_KEY,password:t.API_SECRET}})).then(function(n){var e=n.token;return n.err?(t.API_ACCESS=null,!1):(t.API_ACCESS=e,!0)})}catch(t){return e(t)}return r&&r.then?r.then(void 0,e):r}(0,function(t){throw new Error(t)}))}catch(t){return Promise.reject(t)}},e.delete=function(t,e){var s=this.basePath+t,i=r({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},e);return n.delete(s,i)},e.get=function(t,e){var s=this.basePath+t,i=r({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},e);return n.get(s,i)},e.post=function(t,e,s){void 0===e&&(e={});var i=this.basePath+t,a=r({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},s);return n.post(i,e,a)},t}(),c=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var e=n.prototype;return e.getMedia=function(t){return this.get("media/get/"+t)},e.uploadMedia=function(t){return this.post("media/upload",t)},n}(a),o=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var r=n.prototype;return r.getInstance=function(t){return this.get("instance/"+t)},r.createInstance=function(t){return this.post("instance/instance",t)},r.updateInstance=function(t){return this.post("instance/instance/update",t)},r.getInstancePage=function(t,n){var r="instance/page/"+t;return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceProducts=function(t,n){var r="instance/"+t+"/products";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.createInstanceProduct=function(t,n){return this.post("instance/"+t+"/product",n)},r.deleteInstanceProduct=function(t,n){return this.delete("instance/"+t+"/product/"+n)},r.updateInstanceProduct=function(t,n){return this.post("instance/"+t+"/product/update",n)},r.getInstanceTransactions=function(t){return this.get("instance/"+t+"/transactions")},r.findInstanceTransactions=function(t,n){var r="instance/"+t+"/transactions/open";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getProductTransactions=function(t,n){return this.get("instance/"+t+"/transactions/product/"+n)},r.deleteInstanceTransaction=function(t,n){return this.delete("instance/"+t+"/transaction/"+n)},r.createInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction",n)},r.updateInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction/update",n)},r.getInstanceInvoices=function(t,n){var r="instance/"+t+"/invoices";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceInvoice=function(t,n){return this.get("instance/"+t+"/invoice/"+n)},r.deleteInstanceInvoice=function(t,n){return this.delete("instance/"+t+"/invoice/"+n)},r.createInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice",n)},r.updateInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice/update",n)},r.getInstanceSeries=function(t,n){var r="instance/"+t+"/series";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceTotal=function(t,n){var r="instance/"+t+"/total/monthly";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceRevenue=function(t,n){var r="instance/"+t+"/revenue";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceCustomers=function(t,n){var r="instance/"+t+"/customers";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceCustomer=function(t,n){return this.get("instance/"+t+"/customer/"+n)},r.deleteInstanceCustomer=function(t,n){return this.delete("instance/"+t+"/customer/"+n)},r.createInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer",n)},r.updateInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer/update",n)},r.getInstanceUsers=function(t,n){var r="instance/"+t+"/users";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.getInstanceUser=function(t,n){return this.get("instance/"+t+"/user/"+n)},r.deleteInstanceUser=function(t,n){return this.delete("instance/"+t+"/user/"+n)},r.createInstanceUser=function(t,n){return this.post("instance/"+t+"/user",n)},r.updateInstanceUser=function(t,n){return this.post("instance/"+t+"/user/update",n)},r.getInstanceAddresses=function(t,n){var r="instance/"+t+"/addresses";return n&&(r+=e.stringify(n,"?")),this.get(r)},r.deleteInstanceAddress=function(t,n){return this.delete("instance/"+t+"/address/"+n)},r.createInstanceAddress=function(t,n){return this.post("instance/"+t+"/address",n)},r.updateInstanceAddress=function(t,n){return this.post("instance/"+t+"/address/update",n)},n}(a),u=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var r=n.prototype;return r.getUserMe=function(){return this.get("user/me")},r.getInstancePrimary=function(){return this.get("user/instance/primary")},r.setInstancePrimary=function(t){var n="user/instance/primary";return n+=e.stringify(t,"?"),this.post(n)},r.getUserInstances=function(t){return t&&e.stringify(t,"?"),this.get("user/instances")},n}(a),p=function(t){function n(){return t.apply(this,arguments)||this}return s(n,t),n.prototype.getCustomerMe=function(t){return this.get("customer/"+t+"/me")},n}(a),f=function(t){function n(){return t.apply(this,arguments)||this}return s(n,t),n}(a);i=f,[o,u,c,p].forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(n){Object.defineProperty(i.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})}),module.exports=f;
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import t from"axios";import e from"querystringify";class n{constructor(t){if(this.API_KEY=t.API_KEY,this.API_SECRET=t.API_SECRET,"string"!=typeof this.API_KEY||"string"!=typeof this.API_SECRET)throw new Error("You should define API_KEY & API_SECRET.");this.basePath=t.basePath||"https://api.tayeh.ir/",this.get_token()}async get_token(){const t=this.basePath+"api/token";try{const{token:e,err:n}=await this.get(t,{auth:{username:this.API_KEY,password:this.API_SECRET}});return n?(this.API_ACCESS=null,!1):(this.API_ACCESS=e,!0)}catch(t){throw new Error(t)}}delete(e,n){const s={headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"},...n};return t.delete(this.basePath+e,s)}get(e,n){const s={headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"},...n};return t.get(this.basePath+e,s)}post(e,n={},s){const r={headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"},...s};return t.post(this.basePath+e,n,r)}}class s extends n{}var r;r=s,[class extends n{getInstance(t){return this.get("instance/"+t)}createInstance(t){return this.post("instance/instance",t)}updateInstance(t){return this.post("instance/instance/update",t)}getInstancePage(t,n){let s="instance/page/"+t;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceProducts(t,n){let s=`instance/${t}/products`;return n&&(s+=e.stringify(n,"?")),this.get(s)}createInstanceProduct(t,e){return this.post(`instance/${t}/product`,e)}deleteInstanceProduct(t,e){return this.delete(`instance/${t}/product/${e}`)}updateInstanceProduct(t,e){return this.post(`instance/${t}/product/update`,e)}getInstanceTransactions(t){return this.get(`instance/${t}/transactions`)}findInstanceTransactions(t,n){let s=`instance/${t}/transactions/open`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getProductTransactions(t,e){return this.get(`instance/${t}/transactions/product/${e}`)}deleteInstanceTransaction(t,e){return this.delete(`instance/${t}/transaction/${e}`)}createInstanceTransaction(t,e){return this.post(`instance/${t}/transaction`,e)}updateInstanceTransaction(t,e){return this.post(`instance/${t}/transaction/update`,e)}getInstanceInvoices(t,n){let s=`instance/${t}/invoices`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceInvoice(t,e){return this.get(`instance/${t}/invoice/${e}`)}deleteInstanceInvoice(t,e){return this.delete(`instance/${t}/invoice/${e}`)}createInstanceInvoice(t,e){return this.post(`instance/${t}/invoice`,e)}updateInstanceInvoice(t,e){return this.post(`instance/${t}/invoice/update`,e)}getInstanceSeries(t,n){let s=`instance/${t}/series`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceTotal(t,n){let s=`instance/${t}/total/monthly`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceRevenue(t,n){let s=`instance/${t}/revenue`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceCustomers(t,n){let s=`instance/${t}/customers`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceCustomer(t,e){return this.get(`instance/${t}/customer/${e}`)}deleteInstanceCustomer(t,e){return this.delete(`instance/${t}/customer/${e}`)}createInstanceCustomer(t,e){return this.post(`instance/${t}/customer`,e)}updateInstanceCustomer(t,e){return this.post(`instance/${t}/customer/update`,e)}getInstanceUsers(t,n){let s=`instance/${t}/users`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceUser(t,e){return this.get(`instance/${t}/user/${e}`)}deleteInstanceUser(t,e){return this.delete(`instance/${t}/user/${e}`)}createInstanceUser(t,e){return this.post(`instance/${t}/user`,e)}updateInstanceUser(t,e){return this.post(`instance/${t}/user/update`,e)}getInstanceAddresses(t,n){let s=`instance/${t}/addresses`;return n&&(s+=e.stringify(n,"?")),this.get(s)}deleteInstanceAddress(t,e){return this.delete(`instance/${t}/address/${e}`)}createInstanceAddress(t,e){return this.post(`instance/${t}/address`,e)}updateInstanceAddress(t,e){return this.post(`instance/${t}/address/update`,e)}},class extends n{getUserMe(){return this.get("user/me")}getInstancePrimary(){return this.get("user/instance/primary")}setInstancePrimary(t){let n="user/instance/primary";return n+=e.stringify(t,"?"),this.post(n)}getUserInstances(t){return t&&e.stringify(t,"?"),this.get("user/instances")}},class extends n{getMedia(t){return this.get("media/get/"+t)}uploadMedia(t){return this.post("media/upload",t)}},class extends n{getCustomerMe(t){return this.get(`customer/${t}/me`)}}].forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(e=>{Object.defineProperty(r.prototype,e,Object.getOwnPropertyDescriptor(t.prototype,e))})});export default s;
import t from"axios";import e from"querystringify";class n{constructor(t){if(this.API_KEY=t.API_KEY,this.API_SECRET=t.API_SECRET,"string"!=typeof this.API_KEY||"string"!=typeof this.API_SECRET)throw new Error("You should define API_KEY & API_SECRET.");this.basePath=t.basePath||"https://api.tayeh.ir/",this.get_token()}async get_token(){try{const{token:t,err:e}=await this.get("api/token",{auth:{username:this.API_KEY,password:this.API_SECRET}});return e?(this.API_ACCESS=null,!1):(this.API_ACCESS=t,!0)}catch(t){throw new Error(t)}}delete(e,n){const s={headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"},...n};return t.delete(this.basePath+e,s)}get(e,n){const s={headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"},...n};return t.get(this.basePath+e,s)}post(e,n={},s){const r={headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"},...s};return t.post(this.basePath+e,n,r)}}class s extends n{}var r;r=s,[class extends n{getInstance(t){return this.get("instance/"+t)}createInstance(t){return this.post("instance/instance",t)}updateInstance(t){return this.post("instance/instance/update",t)}getInstancePage(t,n){let s="instance/page/"+t;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceProducts(t,n){let s=`instance/${t}/products`;return n&&(s+=e.stringify(n,"?")),this.get(s)}createInstanceProduct(t,e){return this.post(`instance/${t}/product`,e)}deleteInstanceProduct(t,e){return this.delete(`instance/${t}/product/${e}`)}updateInstanceProduct(t,e){return this.post(`instance/${t}/product/update`,e)}getInstanceTransactions(t){return this.get(`instance/${t}/transactions`)}findInstanceTransactions(t,n){let s=`instance/${t}/transactions/open`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getProductTransactions(t,e){return this.get(`instance/${t}/transactions/product/${e}`)}deleteInstanceTransaction(t,e){return this.delete(`instance/${t}/transaction/${e}`)}createInstanceTransaction(t,e){return this.post(`instance/${t}/transaction`,e)}updateInstanceTransaction(t,e){return this.post(`instance/${t}/transaction/update`,e)}getInstanceInvoices(t,n){let s=`instance/${t}/invoices`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceInvoice(t,e){return this.get(`instance/${t}/invoice/${e}`)}deleteInstanceInvoice(t,e){return this.delete(`instance/${t}/invoice/${e}`)}createInstanceInvoice(t,e){return this.post(`instance/${t}/invoice`,e)}updateInstanceInvoice(t,e){return this.post(`instance/${t}/invoice/update`,e)}getInstanceSeries(t,n){let s=`instance/${t}/series`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceTotal(t,n){let s=`instance/${t}/total/monthly`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceRevenue(t,n){let s=`instance/${t}/revenue`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceCustomers(t,n){let s=`instance/${t}/customers`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceCustomer(t,e){return this.get(`instance/${t}/customer/${e}`)}deleteInstanceCustomer(t,e){return this.delete(`instance/${t}/customer/${e}`)}createInstanceCustomer(t,e){return this.post(`instance/${t}/customer`,e)}updateInstanceCustomer(t,e){return this.post(`instance/${t}/customer/update`,e)}getInstanceUsers(t,n){let s=`instance/${t}/users`;return n&&(s+=e.stringify(n,"?")),this.get(s)}getInstanceUser(t,e){return this.get(`instance/${t}/user/${e}`)}deleteInstanceUser(t,e){return this.delete(`instance/${t}/user/${e}`)}createInstanceUser(t,e){return this.post(`instance/${t}/user`,e)}updateInstanceUser(t,e){return this.post(`instance/${t}/user/update`,e)}getInstanceAddresses(t,n){let s=`instance/${t}/addresses`;return n&&(s+=e.stringify(n,"?")),this.get(s)}deleteInstanceAddress(t,e){return this.delete(`instance/${t}/address/${e}`)}createInstanceAddress(t,e){return this.post(`instance/${t}/address`,e)}updateInstanceAddress(t,e){return this.post(`instance/${t}/address/update`,e)}},class extends n{getUserMe(){return this.get("user/me")}getInstancePrimary(){return this.get("user/instance/primary")}setInstancePrimary(t){let n="user/instance/primary";return n+=e.stringify(t,"?"),this.post(n)}getUserInstances(t){return t&&e.stringify(t,"?"),this.get("user/instances")}},class extends n{getMedia(t){return this.get("media/get/"+t)}uploadMedia(t){return this.post("media/upload",t)}},class extends n{getCustomerMe(t){return this.get(`customer/${t}/me`)}}].forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(e=>{Object.defineProperty(r.prototype,e,Object.getOwnPropertyDescriptor(t.prototype,e))})});export default s;
//# sourceMappingURL=index.modern.js.map

@@ -1,2 +0,2 @@

import t from"axios";import n from"querystringify";function e(){return(e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function r(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}var s,i=function(){function n(t){if(this.API_KEY=t.API_KEY,this.API_SECRET=t.API_SECRET,"string"!=typeof this.API_KEY||"string"!=typeof this.API_SECRET)throw new Error("You should define API_KEY & API_SECRET.");this.basePath=t.basePath||"https://api.tayeh.ir/",this.get_token()}var r=n.prototype;return r.get_token=function(){try{var t=this,n=t.basePath+"api/token";return Promise.resolve(function(e,r){try{var s=Promise.resolve(t.get(n,{auth:{username:t.API_KEY,password:t.API_SECRET}})).then(function(n){var e=n.token;return n.err?(t.API_ACCESS=null,!1):(t.API_ACCESS=e,!0)})}catch(t){return r(t)}return s&&s.then?s.then(void 0,r):s}(0,function(t){throw new Error(t)}))}catch(t){return Promise.reject(t)}},r.delete=function(n,r){var s=this.basePath+n,i=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},r);return t.delete(s,i)},r.get=function(n,r){var s=this.basePath+n,i=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},r);return t.get(s,i)},r.post=function(n,r,s){void 0===r&&(r={});var i=this.basePath+n,a=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},s);return t.post(i,r,a)},n}(),a=function(t){function n(){return t.apply(this,arguments)||this}r(n,t);var e=n.prototype;return e.getMedia=function(t){return this.get("media/get/"+t)},e.uploadMedia=function(t){return this.post("media/upload",t)},n}(i),o=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var s=e.prototype;return s.getInstance=function(t){return this.get("instance/"+t)},s.createInstance=function(t){return this.post("instance/instance",t)},s.updateInstance=function(t){return this.post("instance/instance/update",t)},s.getInstancePage=function(t,e){var r="instance/page/"+t;return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceProducts=function(t,e){var r="instance/"+t+"/products";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.createInstanceProduct=function(t,n){return this.post("instance/"+t+"/product",n)},s.deleteInstanceProduct=function(t,n){return this.delete("instance/"+t+"/product/"+n)},s.updateInstanceProduct=function(t,n){return this.post("instance/"+t+"/product/update",n)},s.getInstanceTransactions=function(t){return this.get("instance/"+t+"/transactions")},s.findInstanceTransactions=function(t,e){var r="instance/"+t+"/transactions/open";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getProductTransactions=function(t,n){return this.get("instance/"+t+"/transactions/product/"+n)},s.deleteInstanceTransaction=function(t,n){return this.delete("instance/"+t+"/transaction/"+n)},s.createInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction",n)},s.updateInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction/update",n)},s.getInstanceInvoices=function(t,e){var r="instance/"+t+"/invoices";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceInvoice=function(t,n){return this.get("instance/"+t+"/invoice/"+n)},s.deleteInstanceInvoice=function(t,n){return this.delete("instance/"+t+"/invoice/"+n)},s.createInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice",n)},s.updateInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice/update",n)},s.getInstanceSeries=function(t,e){var r="instance/"+t+"/series";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceTotal=function(t,e){var r="instance/"+t+"/total/monthly";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceRevenue=function(t,e){var r="instance/"+t+"/revenue";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceCustomers=function(t,e){var r="instance/"+t+"/customers";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceCustomer=function(t,n){return this.get("instance/"+t+"/customer/"+n)},s.deleteInstanceCustomer=function(t,n){return this.delete("instance/"+t+"/customer/"+n)},s.createInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer",n)},s.updateInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer/update",n)},s.getInstanceUsers=function(t,e){var r="instance/"+t+"/users";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceUser=function(t,n){return this.get("instance/"+t+"/user/"+n)},s.deleteInstanceUser=function(t,n){return this.delete("instance/"+t+"/user/"+n)},s.createInstanceUser=function(t,n){return this.post("instance/"+t+"/user",n)},s.updateInstanceUser=function(t,n){return this.post("instance/"+t+"/user/update",n)},s.getInstanceAddresses=function(t,e){var r="instance/"+t+"/addresses";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.deleteInstanceAddress=function(t,n){return this.delete("instance/"+t+"/address/"+n)},s.createInstanceAddress=function(t,n){return this.post("instance/"+t+"/address",n)},s.updateInstanceAddress=function(t,n){return this.post("instance/"+t+"/address/update",n)},e}(i),c=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var s=e.prototype;return s.getUserMe=function(){return this.get("user/me")},s.getInstancePrimary=function(){return this.get("user/instance/primary")},s.setInstancePrimary=function(t){var e="user/instance/primary";return e+=n.stringify(t,"?"),this.post(e)},s.getUserInstances=function(t){return t&&n.stringify(t,"?"),this.get("user/instances")},e}(i),u=function(t){function n(){return t.apply(this,arguments)||this}return r(n,t),n.prototype.getCustomerMe=function(t){return this.get("customer/"+t+"/me")},n}(i),p=function(t){function n(){return t.apply(this,arguments)||this}return r(n,t),n}(i);s=p,[o,c,a,u].forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(n){Object.defineProperty(s.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})});export default p;
import t from"axios";import n from"querystringify";function e(){return(e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function r(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}var s,i=function(){function n(t){if(this.API_KEY=t.API_KEY,this.API_SECRET=t.API_SECRET,"string"!=typeof this.API_KEY||"string"!=typeof this.API_SECRET)throw new Error("You should define API_KEY & API_SECRET.");this.basePath=t.basePath||"https://api.tayeh.ir/",this.get_token()}var r=n.prototype;return r.get_token=function(){try{var t=this;return Promise.resolve(function(n,e){try{var r=Promise.resolve(t.get("api/token",{auth:{username:t.API_KEY,password:t.API_SECRET}})).then(function(n){var e=n.token;return n.err?(t.API_ACCESS=null,!1):(t.API_ACCESS=e,!0)})}catch(t){return e(t)}return r&&r.then?r.then(void 0,e):r}(0,function(t){throw new Error(t)}))}catch(t){return Promise.reject(t)}},r.delete=function(n,r){var s=this.basePath+n,i=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},r);return t.delete(s,i)},r.get=function(n,r){var s=this.basePath+n,i=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},r);return t.get(s,i)},r.post=function(n,r,s){void 0===r&&(r={});var i=this.basePath+n,o=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},s);return t.post(i,r,o)},n}(),o=function(t){function n(){return t.apply(this,arguments)||this}r(n,t);var e=n.prototype;return e.getMedia=function(t){return this.get("media/get/"+t)},e.uploadMedia=function(t){return this.post("media/upload",t)},n}(i),a=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var s=e.prototype;return s.getInstance=function(t){return this.get("instance/"+t)},s.createInstance=function(t){return this.post("instance/instance",t)},s.updateInstance=function(t){return this.post("instance/instance/update",t)},s.getInstancePage=function(t,e){var r="instance/page/"+t;return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceProducts=function(t,e){var r="instance/"+t+"/products";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.createInstanceProduct=function(t,n){return this.post("instance/"+t+"/product",n)},s.deleteInstanceProduct=function(t,n){return this.delete("instance/"+t+"/product/"+n)},s.updateInstanceProduct=function(t,n){return this.post("instance/"+t+"/product/update",n)},s.getInstanceTransactions=function(t){return this.get("instance/"+t+"/transactions")},s.findInstanceTransactions=function(t,e){var r="instance/"+t+"/transactions/open";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getProductTransactions=function(t,n){return this.get("instance/"+t+"/transactions/product/"+n)},s.deleteInstanceTransaction=function(t,n){return this.delete("instance/"+t+"/transaction/"+n)},s.createInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction",n)},s.updateInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction/update",n)},s.getInstanceInvoices=function(t,e){var r="instance/"+t+"/invoices";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceInvoice=function(t,n){return this.get("instance/"+t+"/invoice/"+n)},s.deleteInstanceInvoice=function(t,n){return this.delete("instance/"+t+"/invoice/"+n)},s.createInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice",n)},s.updateInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice/update",n)},s.getInstanceSeries=function(t,e){var r="instance/"+t+"/series";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceTotal=function(t,e){var r="instance/"+t+"/total/monthly";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceRevenue=function(t,e){var r="instance/"+t+"/revenue";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceCustomers=function(t,e){var r="instance/"+t+"/customers";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceCustomer=function(t,n){return this.get("instance/"+t+"/customer/"+n)},s.deleteInstanceCustomer=function(t,n){return this.delete("instance/"+t+"/customer/"+n)},s.createInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer",n)},s.updateInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer/update",n)},s.getInstanceUsers=function(t,e){var r="instance/"+t+"/users";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceUser=function(t,n){return this.get("instance/"+t+"/user/"+n)},s.deleteInstanceUser=function(t,n){return this.delete("instance/"+t+"/user/"+n)},s.createInstanceUser=function(t,n){return this.post("instance/"+t+"/user",n)},s.updateInstanceUser=function(t,n){return this.post("instance/"+t+"/user/update",n)},s.getInstanceAddresses=function(t,e){var r="instance/"+t+"/addresses";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.deleteInstanceAddress=function(t,n){return this.delete("instance/"+t+"/address/"+n)},s.createInstanceAddress=function(t,n){return this.post("instance/"+t+"/address",n)},s.updateInstanceAddress=function(t,n){return this.post("instance/"+t+"/address/update",n)},e}(i),c=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var s=e.prototype;return s.getUserMe=function(){return this.get("user/me")},s.getInstancePrimary=function(){return this.get("user/instance/primary")},s.setInstancePrimary=function(t){var e="user/instance/primary";return e+=n.stringify(t,"?"),this.post(e)},s.getUserInstances=function(t){return t&&n.stringify(t,"?"),this.get("user/instances")},e}(i),u=function(t){function n(){return t.apply(this,arguments)||this}return r(n,t),n.prototype.getCustomerMe=function(t){return this.get("customer/"+t+"/me")},n}(i),p=function(t){function n(){return t.apply(this,arguments)||this}return r(n,t),n}(i);s=p,[a,c,o,u].forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(n){Object.defineProperty(s.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})});export default p;
//# sourceMappingURL=index.module.js.map

@@ -1,2 +0,2 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("axios"),require("querystringify")):"function"==typeof define&&define.amd?define(["axios","querystringify"],n):(t=t||self).webClient=n(t.axios,t.querystringify)}(this,function(t,n){function e(){return(e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function r(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var s,i=function(){function n(t){if(this.API_KEY=t.API_KEY,this.API_SECRET=t.API_SECRET,"string"!=typeof this.API_KEY||"string"!=typeof this.API_SECRET)throw new Error("You should define API_KEY & API_SECRET.");this.basePath=t.basePath||"https://api.tayeh.ir/",this.get_token()}var r=n.prototype;return r.get_token=function(){try{var t=this,n=t.basePath+"api/token";return Promise.resolve(function(e,r){try{var s=Promise.resolve(t.get(n,{auth:{username:t.API_KEY,password:t.API_SECRET}})).then(function(n){var e=n.token;return n.err?(t.API_ACCESS=null,!1):(t.API_ACCESS=e,!0)})}catch(t){return r(t)}return s&&s.then?s.then(void 0,r):s}(0,function(t){throw new Error(t)}))}catch(t){return Promise.reject(t)}},r.delete=function(n,r){var s=this.basePath+n,i=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},r);return t.delete(s,i)},r.get=function(n,r){var s=this.basePath+n,i=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},r);return t.get(s,i)},r.post=function(n,r,s){void 0===r&&(r={});var i=this.basePath+n,o=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},s);return t.post(i,r,o)},n}(),o=function(t){function n(){return t.apply(this,arguments)||this}r(n,t);var e=n.prototype;return e.getMedia=function(t){return this.get("media/get/"+t)},e.uploadMedia=function(t){return this.post("media/upload",t)},n}(i),a=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var s=e.prototype;return s.getInstance=function(t){return this.get("instance/"+t)},s.createInstance=function(t){return this.post("instance/instance",t)},s.updateInstance=function(t){return this.post("instance/instance/update",t)},s.getInstancePage=function(t,e){var r="instance/page/"+t;return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceProducts=function(t,e){var r="instance/"+t+"/products";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.createInstanceProduct=function(t,n){return this.post("instance/"+t+"/product",n)},s.deleteInstanceProduct=function(t,n){return this.delete("instance/"+t+"/product/"+n)},s.updateInstanceProduct=function(t,n){return this.post("instance/"+t+"/product/update",n)},s.getInstanceTransactions=function(t){return this.get("instance/"+t+"/transactions")},s.findInstanceTransactions=function(t,e){var r="instance/"+t+"/transactions/open";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getProductTransactions=function(t,n){return this.get("instance/"+t+"/transactions/product/"+n)},s.deleteInstanceTransaction=function(t,n){return this.delete("instance/"+t+"/transaction/"+n)},s.createInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction",n)},s.updateInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction/update",n)},s.getInstanceInvoices=function(t,e){var r="instance/"+t+"/invoices";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceInvoice=function(t,n){return this.get("instance/"+t+"/invoice/"+n)},s.deleteInstanceInvoice=function(t,n){return this.delete("instance/"+t+"/invoice/"+n)},s.createInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice",n)},s.updateInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice/update",n)},s.getInstanceSeries=function(t,e){var r="instance/"+t+"/series";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceTotal=function(t,e){var r="instance/"+t+"/total/monthly";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceRevenue=function(t,e){var r="instance/"+t+"/revenue";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceCustomers=function(t,e){var r="instance/"+t+"/customers";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceCustomer=function(t,n){return this.get("instance/"+t+"/customer/"+n)},s.deleteInstanceCustomer=function(t,n){return this.delete("instance/"+t+"/customer/"+n)},s.createInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer",n)},s.updateInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer/update",n)},s.getInstanceUsers=function(t,e){var r="instance/"+t+"/users";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceUser=function(t,n){return this.get("instance/"+t+"/user/"+n)},s.deleteInstanceUser=function(t,n){return this.delete("instance/"+t+"/user/"+n)},s.createInstanceUser=function(t,n){return this.post("instance/"+t+"/user",n)},s.updateInstanceUser=function(t,n){return this.post("instance/"+t+"/user/update",n)},s.getInstanceAddresses=function(t,e){var r="instance/"+t+"/addresses";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.deleteInstanceAddress=function(t,n){return this.delete("instance/"+t+"/address/"+n)},s.createInstanceAddress=function(t,n){return this.post("instance/"+t+"/address",n)},s.updateInstanceAddress=function(t,n){return this.post("instance/"+t+"/address/update",n)},e}(i),c=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var s=e.prototype;return s.getUserMe=function(){return this.get("user/me")},s.getInstancePrimary=function(){return this.get("user/instance/primary")},s.setInstancePrimary=function(t){var e="user/instance/primary";return e+=n.stringify(t,"?"),this.post(e)},s.getUserInstances=function(t){return t&&n.stringify(t,"?"),this.get("user/instances")},e}(i),u=function(t){function n(){return t.apply(this,arguments)||this}return r(n,t),n.prototype.getCustomerMe=function(t){return this.get("customer/"+t+"/me")},n}(i),p=function(t){function n(){return t.apply(this,arguments)||this}return r(n,t),n}(i);return s=p,[a,c,o,u].forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(n){Object.defineProperty(s.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})}),p});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("axios"),require("querystringify")):"function"==typeof define&&define.amd?define(["axios","querystringify"],n):(t=t||self).webClient=n(t.axios,t.querystringify)}(this,function(t,n){function e(){return(e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function r(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var s,i=function(){function n(t){if(this.API_KEY=t.API_KEY,this.API_SECRET=t.API_SECRET,"string"!=typeof this.API_KEY||"string"!=typeof this.API_SECRET)throw new Error("You should define API_KEY & API_SECRET.");this.basePath=t.basePath||"https://api.tayeh.ir/",this.get_token()}var r=n.prototype;return r.get_token=function(){try{var t=this;return Promise.resolve(function(n,e){try{var r=Promise.resolve(t.get("api/token",{auth:{username:t.API_KEY,password:t.API_SECRET}})).then(function(n){var e=n.token;return n.err?(t.API_ACCESS=null,!1):(t.API_ACCESS=e,!0)})}catch(t){return e(t)}return r&&r.then?r.then(void 0,e):r}(0,function(t){throw new Error(t)}))}catch(t){return Promise.reject(t)}},r.delete=function(n,r){var s=this.basePath+n,i=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},r);return t.delete(s,i)},r.get=function(n,r){var s=this.basePath+n,i=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},r);return t.get(s,i)},r.post=function(n,r,s){void 0===r&&(r={});var i=this.basePath+n,o=e({headers:{Authorization:this.API_ACCESS,"Content-type":"application/json"}},s);return t.post(i,r,o)},n}(),o=function(t){function n(){return t.apply(this,arguments)||this}r(n,t);var e=n.prototype;return e.getMedia=function(t){return this.get("media/get/"+t)},e.uploadMedia=function(t){return this.post("media/upload",t)},n}(i),a=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var s=e.prototype;return s.getInstance=function(t){return this.get("instance/"+t)},s.createInstance=function(t){return this.post("instance/instance",t)},s.updateInstance=function(t){return this.post("instance/instance/update",t)},s.getInstancePage=function(t,e){var r="instance/page/"+t;return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceProducts=function(t,e){var r="instance/"+t+"/products";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.createInstanceProduct=function(t,n){return this.post("instance/"+t+"/product",n)},s.deleteInstanceProduct=function(t,n){return this.delete("instance/"+t+"/product/"+n)},s.updateInstanceProduct=function(t,n){return this.post("instance/"+t+"/product/update",n)},s.getInstanceTransactions=function(t){return this.get("instance/"+t+"/transactions")},s.findInstanceTransactions=function(t,e){var r="instance/"+t+"/transactions/open";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getProductTransactions=function(t,n){return this.get("instance/"+t+"/transactions/product/"+n)},s.deleteInstanceTransaction=function(t,n){return this.delete("instance/"+t+"/transaction/"+n)},s.createInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction",n)},s.updateInstanceTransaction=function(t,n){return this.post("instance/"+t+"/transaction/update",n)},s.getInstanceInvoices=function(t,e){var r="instance/"+t+"/invoices";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceInvoice=function(t,n){return this.get("instance/"+t+"/invoice/"+n)},s.deleteInstanceInvoice=function(t,n){return this.delete("instance/"+t+"/invoice/"+n)},s.createInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice",n)},s.updateInstanceInvoice=function(t,n){return this.post("instance/"+t+"/invoice/update",n)},s.getInstanceSeries=function(t,e){var r="instance/"+t+"/series";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceTotal=function(t,e){var r="instance/"+t+"/total/monthly";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceRevenue=function(t,e){var r="instance/"+t+"/revenue";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceCustomers=function(t,e){var r="instance/"+t+"/customers";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceCustomer=function(t,n){return this.get("instance/"+t+"/customer/"+n)},s.deleteInstanceCustomer=function(t,n){return this.delete("instance/"+t+"/customer/"+n)},s.createInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer",n)},s.updateInstanceCustomer=function(t,n){return this.post("instance/"+t+"/customer/update",n)},s.getInstanceUsers=function(t,e){var r="instance/"+t+"/users";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.getInstanceUser=function(t,n){return this.get("instance/"+t+"/user/"+n)},s.deleteInstanceUser=function(t,n){return this.delete("instance/"+t+"/user/"+n)},s.createInstanceUser=function(t,n){return this.post("instance/"+t+"/user",n)},s.updateInstanceUser=function(t,n){return this.post("instance/"+t+"/user/update",n)},s.getInstanceAddresses=function(t,e){var r="instance/"+t+"/addresses";return e&&(r+=n.stringify(e,"?")),this.get(r)},s.deleteInstanceAddress=function(t,n){return this.delete("instance/"+t+"/address/"+n)},s.createInstanceAddress=function(t,n){return this.post("instance/"+t+"/address",n)},s.updateInstanceAddress=function(t,n){return this.post("instance/"+t+"/address/update",n)},e}(i),c=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var s=e.prototype;return s.getUserMe=function(){return this.get("user/me")},s.getInstancePrimary=function(){return this.get("user/instance/primary")},s.setInstancePrimary=function(t){var e="user/instance/primary";return e+=n.stringify(t,"?"),this.post(e)},s.getUserInstances=function(t){return t&&n.stringify(t,"?"),this.get("user/instances")},e}(i),u=function(t){function n(){return t.apply(this,arguments)||this}return r(n,t),n.prototype.getCustomerMe=function(t){return this.get("customer/"+t+"/me")},n}(i),p=function(t){function n(){return t.apply(this,arguments)||this}return r(n,t),n}(i);return s=p,[a,c,o,u].forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(n){Object.defineProperty(s.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})}),p});
//# sourceMappingURL=index.umd.js.map
{
"name": "@tayeh/web-client",
"version": "1.0.2-alpha.2",
"version": "1.0.3-alpha.2",
"description": "tayeh shop-api client",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -30,3 +30,3 @@ // import fetch from "isomorphic-unfetch";

protected async get_token(): Promise<boolean> {
const url = this.basePath + "api/token";
const url = "api/token";
try {

@@ -33,0 +33,0 @@ const { token, err } = await this.get<{ err: string; token: string }>(

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc