Socket
Socket
Sign inDemoInstall

@glvnzn/web-sdk

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glvnzn/web-sdk - npm Package Compare versions

Comparing version 1.0.27 to 1.0.28

2

dist/index.js

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

function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},e.apply(this,arguments)}function t(e,r){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,r)}var r=function e(t,r){void 0===r&&(r="");var o={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n],a=r?(r+"-"+n).replace(/[-_](.)/g,function(e,t){return t.toUpperCase()}):n;"object"==typeof i&&null!==i?Object.assign(o,e(i,a)):o[a]=i}return o},o=/*#__PURE__*/function(r){var o,n;function i(){return r.apply(this,arguments)||this}n=r,(o=i).prototype=Object.create(n.prototype),o.prototype.constructor=o,t(o,n);var a=i.prototype;return a.get=function(t){try{var r=this;return Promise.resolve(r.request("/games",{method:"GET"},e({},{pageSize:"10",nextPageCursor:"",filter:{provider:"",type:""}},t))).then(function(e){return console.log("🚀 ~ Games ~ get ~ response:",e),r.transformResponse(e)})}catch(e){return Promise.reject(e)}},a.transformResponse=function(e){var t=e.games;if(!t||!t.edges||!t.pageInfo)throw new Error("Invalid response format: missing required properties");var r=t.edges.map(function(e){if(!(e&&e.node&&e.node.id&&e.node.name&&e.node.provider&&e.node.type))throw new Error("Invalid game format: missing required properties");return{id:e.node.id,image:"",name:e.node.name,provider:e.node.provider,type:e.node.type}});if(!t.pageInfo.hasNextPage&&!1!==t.pageInfo.hasNextPage)throw new Error("Invalid pageInfo format: missing hasNextPage property");return{data:r,pageInfo:{nextPageCursor:e.games.pageInfo.hasNextPage?e.games.pageInfo.endCursor:void 0,totalCount:t.totalCount||0}}},i}(/*#__PURE__*/function(){function t(e){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=e.apiKey,this.siteId=e.siteId,this.baseUrl=e.baseUrl||"http://site-api.opexacms.io/v1"}return t.prototype.request=function(t,o,n){var i=""+this.baseUrl+t,a={"Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},s="";if(n){var p=r(n);s=new URLSearchParams(p).toString()}var u=e({},o,{headers:a});return fetch(i+(s?"?"+s:""),e({},u,{method:(null==o?void 0:o.method)||"GET"})).then(function(e){if(e.ok)return e.json();throw new Error(e.statusText)})},t}());exports.OpexaCMS=function(e){this.games=void 0,this.games=new o(e)};
function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.apply(this,arguments)}function t(e,r){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,r)}var r=function e(t,r){void 0===r&&(r="");var n={};for(var o in t)if(t.hasOwnProperty(o)){var i=t[o],s=r?(r+"-"+o).replace(/[-_](.)/g,function(e,t){return t.toUpperCase()}):o;"object"==typeof i&&null!==i?Object.assign(n,e(i,s)):n[s]=i}return n},n=/*#__PURE__*/function(r){var n,o;function i(){return r.apply(this,arguments)||this}o=r,(n=i).prototype=Object.create(o.prototype),n.prototype.constructor=n,t(n,o);var s=i.prototype;return s.get=function(t){try{var r=this;return Promise.resolve(r.request("/games",{method:"GET"},e({},{pageSize:"10",nextPageCursor:"",filter:{provider:"",type:""}},t))).then(function(e){return r.transformResponse(e)})}catch(e){return Promise.reject(e)}},s.transformResponse=function(e){var t=e.edges,r=e.pageInfo,n=e.totalCount;if(!t||!r)throw new Error("Invalid response format: missing required properties");return{data:t.map(function(e){if(!(e&&e.node&&e.node.id&&e.node.name&&e.node.provider&&e.node.type))throw new Error("Invalid game format: missing required properties");return{id:e.node.id,image:"",name:e.node.name,provider:e.node.provider,type:e.node.type}}),pageInfo:{nextPageCursor:r.hasNextPage?r.endCursor:void 0,totalCount:n||0}}},i}(/*#__PURE__*/function(){function t(e){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=e.apiKey,this.siteId=e.siteId,this.baseUrl=e.baseUrl||"http://site-api.opexacms.io/v1"}return t.prototype.request=function(t,n,o){var i=""+this.baseUrl+t,s={"Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},a="";if(o){var p=r(o);a=new URLSearchParams(p).toString()}var u=e({},n,{headers:s});return fetch(i+(a?"?"+a:""),e({},u,{method:(null==n?void 0:n.method)||"GET"})).then(function(e){if(e.ok)return e.json();throw new Error(e.statusText)})},t}());exports.OpexaCMS=function(e){this.games=void 0,this.games=new n(e)};

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

function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},e.apply(this,arguments)}function t(e,r){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,r)}var r=function e(t,r){void 0===r&&(r="");var o={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n],a=r?(r+"-"+n).replace(/[-_](.)/g,function(e,t){return t.toUpperCase()}):n;"object"==typeof i&&null!==i?Object.assign(o,e(i,a)):o[a]=i}return o},o=/*#__PURE__*/function(r){var o,n;function i(){return r.apply(this,arguments)||this}n=r,(o=i).prototype=Object.create(n.prototype),o.prototype.constructor=o,t(o,n);var a=i.prototype;return a.get=function(t){try{var r=this;return Promise.resolve(r.request("/games",{method:"GET"},e({},{pageSize:"10",nextPageCursor:"",filter:{provider:"",type:""}},t))).then(function(e){return console.log("🚀 ~ Games ~ get ~ response:",e),r.transformResponse(e)})}catch(e){return Promise.reject(e)}},a.transformResponse=function(e){var t=e.games;if(!t||!t.edges||!t.pageInfo)throw new Error("Invalid response format: missing required properties");var r=t.edges.map(function(e){if(!(e&&e.node&&e.node.id&&e.node.name&&e.node.provider&&e.node.type))throw new Error("Invalid game format: missing required properties");return{id:e.node.id,image:"",name:e.node.name,provider:e.node.provider,type:e.node.type}});if(!t.pageInfo.hasNextPage&&!1!==t.pageInfo.hasNextPage)throw new Error("Invalid pageInfo format: missing hasNextPage property");return{data:r,pageInfo:{nextPageCursor:e.games.pageInfo.hasNextPage?e.games.pageInfo.endCursor:void 0,totalCount:t.totalCount||0}}},i}(/*#__PURE__*/function(){function t(e){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=e.apiKey,this.siteId=e.siteId,this.baseUrl=e.baseUrl||"http://site-api.opexacms.io/v1"}return t.prototype.request=function(t,o,n){var i=""+this.baseUrl+t,a={"Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},s="";if(n){var p=r(n);s=new URLSearchParams(p).toString()}var u=e({},o,{headers:a});return fetch(i+(s?"?"+s:""),e({},u,{method:(null==o?void 0:o.method)||"GET"})).then(function(e){if(e.ok)return e.json();throw new Error(e.statusText)})},t}()),n=function(e){this.games=void 0,this.games=new o(e)};export{n as OpexaCMS};
function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.apply(this,arguments)}function t(e,r){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,r)}var r=function e(t,r){void 0===r&&(r="");var n={};for(var o in t)if(t.hasOwnProperty(o)){var i=t[o],s=r?(r+"-"+o).replace(/[-_](.)/g,function(e,t){return t.toUpperCase()}):o;"object"==typeof i&&null!==i?Object.assign(n,e(i,s)):n[s]=i}return n},n=/*#__PURE__*/function(r){var n,o;function i(){return r.apply(this,arguments)||this}o=r,(n=i).prototype=Object.create(o.prototype),n.prototype.constructor=n,t(n,o);var s=i.prototype;return s.get=function(t){try{var r=this;return Promise.resolve(r.request("/games",{method:"GET"},e({},{pageSize:"10",nextPageCursor:"",filter:{provider:"",type:""}},t))).then(function(e){return r.transformResponse(e)})}catch(e){return Promise.reject(e)}},s.transformResponse=function(e){var t=e.edges,r=e.pageInfo,n=e.totalCount;if(!t||!r)throw new Error("Invalid response format: missing required properties");return{data:t.map(function(e){if(!(e&&e.node&&e.node.id&&e.node.name&&e.node.provider&&e.node.type))throw new Error("Invalid game format: missing required properties");return{id:e.node.id,image:"",name:e.node.name,provider:e.node.provider,type:e.node.type}}),pageInfo:{nextPageCursor:r.hasNextPage?r.endCursor:void 0,totalCount:n||0}}},i}(/*#__PURE__*/function(){function t(e){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=e.apiKey,this.siteId=e.siteId,this.baseUrl=e.baseUrl||"http://site-api.opexacms.io/v1"}return t.prototype.request=function(t,n,o){var i=""+this.baseUrl+t,s={"Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},a="";if(o){var p=r(o);a=new URLSearchParams(p).toString()}var u=e({},n,{headers:s});return fetch(i+(a?"?"+a:""),e({},u,{method:(null==n?void 0:n.method)||"GET"})).then(function(e){if(e.ok)return e.json();throw new Error(e.statusText)})},t}()),o=function(e){this.games=void 0,this.games=new n(e)};export{o as OpexaCMS};

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e||self).webSdk={})}(this,function(e){function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},t.apply(this,arguments)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=function e(t,r){void 0===r&&(r="");var o={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n],a=r?(r+"-"+n).replace(/[-_](.)/g,function(e,t){return t.toUpperCase()}):n;"object"==typeof i&&null!==i?Object.assign(o,e(i,a)):o[a]=i}return o},n=/*#__PURE__*/function(e){var o,n;function i(){return e.apply(this,arguments)||this}n=e,(o=i).prototype=Object.create(n.prototype),o.prototype.constructor=o,r(o,n);var a=i.prototype;return a.get=function(e){try{var r=this;return Promise.resolve(r.request("/games",{method:"GET"},t({},{pageSize:"10",nextPageCursor:"",filter:{provider:"",type:""}},e))).then(function(e){return console.log("🚀 ~ Games ~ get ~ response:",e),r.transformResponse(e)})}catch(e){return Promise.reject(e)}},a.transformResponse=function(e){var t=e.games;if(!t||!t.edges||!t.pageInfo)throw new Error("Invalid response format: missing required properties");var r=t.edges.map(function(e){if(!(e&&e.node&&e.node.id&&e.node.name&&e.node.provider&&e.node.type))throw new Error("Invalid game format: missing required properties");return{id:e.node.id,image:"",name:e.node.name,provider:e.node.provider,type:e.node.type}});if(!t.pageInfo.hasNextPage&&!1!==t.pageInfo.hasNextPage)throw new Error("Invalid pageInfo format: missing hasNextPage property");return{data:r,pageInfo:{nextPageCursor:e.games.pageInfo.hasNextPage?e.games.pageInfo.endCursor:void 0,totalCount:t.totalCount||0}}},i}(/*#__PURE__*/function(){function e(e){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=e.apiKey,this.siteId=e.siteId,this.baseUrl=e.baseUrl||"http://site-api.opexacms.io/v1"}return e.prototype.request=function(e,r,n){var i=""+this.baseUrl+e,a={"Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},s="";if(n){var p=o(n);s=new URLSearchParams(p).toString()}var f=t({},r,{headers:a});return fetch(i+(s?"?"+s:""),t({},f,{method:(null==r?void 0:r.method)||"GET"})).then(function(e){if(e.ok)return e.json();throw new Error(e.statusText)})},e}());e.OpexaCMS=function(e){this.games=void 0,this.games=new n(e)}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e||self).webSdk={})}(this,function(e){function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(this,arguments)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var n=function e(t,r){void 0===r&&(r="");var n={};for(var o in t)if(t.hasOwnProperty(o)){var i=t[o],s=r?(r+"-"+o).replace(/[-_](.)/g,function(e,t){return t.toUpperCase()}):o;"object"==typeof i&&null!==i?Object.assign(n,e(i,s)):n[s]=i}return n},o=/*#__PURE__*/function(e){var n,o;function i(){return e.apply(this,arguments)||this}o=e,(n=i).prototype=Object.create(o.prototype),n.prototype.constructor=n,r(n,o);var s=i.prototype;return s.get=function(e){try{var r=this;return Promise.resolve(r.request("/games",{method:"GET"},t({},{pageSize:"10",nextPageCursor:"",filter:{provider:"",type:""}},e))).then(function(e){return r.transformResponse(e)})}catch(e){return Promise.reject(e)}},s.transformResponse=function(e){var t=e.edges,r=e.pageInfo,n=e.totalCount;if(!t||!r)throw new Error("Invalid response format: missing required properties");return{data:t.map(function(e){if(!(e&&e.node&&e.node.id&&e.node.name&&e.node.provider&&e.node.type))throw new Error("Invalid game format: missing required properties");return{id:e.node.id,image:"",name:e.node.name,provider:e.node.provider,type:e.node.type}}),pageInfo:{nextPageCursor:r.hasNextPage?r.endCursor:void 0,totalCount:n||0}}},i}(/*#__PURE__*/function(){function e(e){this.apiKey=void 0,this.baseUrl=void 0,this.siteId=void 0,this.apiKey=e.apiKey,this.siteId=e.siteId,this.baseUrl=e.baseUrl||"http://site-api.opexacms.io/v1"}return e.prototype.request=function(e,r,o){var i=""+this.baseUrl+e,s={"Content-Type":"application/json","api-key":this.apiKey,site_id:this.siteId},a="";if(o){var p=n(o);a=new URLSearchParams(p).toString()}var u=t({},r,{headers:s});return fetch(i+(a?"?"+a:""),t({},u,{method:(null==r?void 0:r.method)||"GET"})).then(function(e){if(e.ok)return e.json();throw new Error(e.statusText)})},e}());e.OpexaCMS=function(e){this.games=void 0,this.games=new o(e)}});

@@ -40,7 +40,5 @@ export declare type QueryParams = {

export interface ResponseData {
games: {
totalCount: number;
edges: Edge[];
pageInfo: PageInfo;
};
totalCount: number;
edges: Edge[];
pageInfo: PageInfo;
}

@@ -47,0 +45,0 @@ export interface Game {

{
"name": "@glvnzn/web-sdk",
"version": "1.0.27",
"version": "1.0.28",
"description": "",

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

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