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.23 to 1.0.24

2

dist/index.js

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

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

@@ -7,0 +7,0 @@ export declare abstract class Base {

import { Base } from '../base';
import { GamesData } from './types';
import { Game } from './types';
import { QueryParams } from './types';
export declare class Games extends Base {
get(params?: QueryParams): Promise<GamesData>;
get(params?: QueryParams): Promise<{
data: Game[];
pageInfo: {
nextPageCursor?: string;
totalCount: number;
};
}>;
private serializeResponse;
}

@@ -9,3 +9,3 @@ export declare type QueryParams = {

};
export interface Provider {
interface Provider {
id: string;

@@ -16,3 +16,3 @@ name: string;

}
export interface GameNode {
interface Node {
provider: Provider;

@@ -32,7 +32,7 @@ type: string;

}
export interface Edge {
interface Edge {
cursor: string;
node: GameNode;
node: Node;
}
export interface PageInfo {
interface PageInfo {
hasNextPage: boolean;

@@ -42,6 +42,31 @@ startCursor: string;

}
export interface GamesData {
export interface ResponseData {
games: {
totalCount: number;
edges: Edge[];
pageInfo: PageInfo;
};
}
export interface Game {
id: string;
image: string;
name: string;
provider: Provider;
type: string;
}
export interface SerializedGame {
id: string;
image: string;
name: string;
provider: Provider;
type: string;
}
export interface SerializedPageInfo {
nextPageCursor?: string;
totalCount: number;
edges: Edge[];
pageInfo: PageInfo;
}
export interface SerializedResponse {
data: SerializedGame[];
pageInfo: SerializedPageInfo;
}
export {};
{
"name": "@glvnzn/web-sdk",
"version": "1.0.23",
"version": "1.0.24",
"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