@janbox/contentful-marketplace-sdk 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -24
- package/dist/entries/banner-collection.d.ts +5 -10
- package/dist/entries/blog.d.ts +28 -33
- package/dist/entries/brand-collection.d.ts +11 -15
- package/dist/entries/documentation.d.ts +28 -38
- package/dist/entries/hyperlink-collection.d.ts +9 -13
- package/dist/entries/keyword-collection.d.ts +7 -11
- package/dist/index.cjs +40 -91
- package/dist/index.js +372 -405
- package/package.json +1 -1
- package/dist/entries/brand.d.ts +0 -3
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var $e=Function.prototype.toString,C=Object.create,Ce=Object.prototype.toString,Oe=(function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e})();function Se(){return new Oe}function je(){return new WeakMap}var Te=typeof WeakMap<"u"?je:Se;function N(e){if(!e)return C(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:C(e);if(t&&~$e.call(t).indexOf("[native code]"))try{return new t}catch{}return C(e)}function Ae(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function _e(e){return e.flags}var ke=/test/g.flags==="g"?_e:Ae;function ae(e){var t=Ce.call(e);return t.substring(8,t.length-1)}function qe(e){return e[Symbol.toStringTag]||ae(e)}var Pe=typeof Symbol<"u"?qe:ae,Re=Object.defineProperty,De=Object.getOwnPropertyDescriptor,se=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,ce=Object.prototype,ue=ce.hasOwnProperty,Ee=ce.propertyIsEnumerable,le=typeof V=="function";function xe(e){return se(e).concat(V(e))}var Ie=le?xe:se;function $(e,t,r){for(var a=Ie(e),s=0,i=a.length,n=void 0,o=void 0;s<i;++s)if(n=a[s],!(n==="callee"||n==="caller")){if(o=De(e,n),!o){t[n]=r.copier(e[n],r);continue}!o.get&&!o.set&&(o.value=r.copier(o.value,r));try{Re(t,n,o)}catch{t[n]=o.value}}return t}function Le(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var a=0,s=e.length;a<s;++a)r[a]=t.copier(e[a],t);return r}function Be(e,t){var r=new t.Constructor;return t.cache.set(e,r),$(e,r,t)}function fe(e,t){return e.slice(0)}function Ne(e,t){return e.slice(0,e.size,e.type)}function Ve(e,t){return new t.Constructor(fe(e.buffer))}function Qe(e,t){return new t.Constructor(e.getTime())}function ge(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(a,s){r.set(s,t.copier(a,t))}),r}function Me(e,t){return $(e,ge(e,t),t)}function Fe(e,t){var r=N(t.prototype);t.cache.set(e,r);for(var a in e)ue.call(e,a)&&(r[a]=t.copier(e[a],t));return r}function Ge(e,t){var r=N(t.prototype);t.cache.set(e,r);for(var a in e)ue.call(e,a)&&(r[a]=t.copier(e[a],t));for(var s=V(e),i=0,n=s.length,o=void 0;i<n;++i)o=s[i],Ee.call(e,o)&&(r[o]=t.copier(e[o],t));return r}var Ke=le?Ge:Fe;function Ue(e,t){var r=N(t.prototype);return t.cache.set(e,r),$(e,r,t)}function O(e,t){return new t.Constructor(e.valueOf())}function We(e,t){var r=new t.Constructor(e.source,ke(e));return r.lastIndex=e.lastIndex,r}function w(e,t){return e}function ye(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(a){r.add(t.copier(a,t))}),r}function ze(e,t){return $(e,ye(e,t),t)}var Je=Array.isArray,Q=Object.assign,He=Object.getPrototypeOf||(function(e){return e.__proto__}),pe={array:Le,arrayBuffer:fe,blob:Ne,dataView:Ve,date:Qe,error:w,map:ge,object:Ke,regExp:We,set:ye},Ye=Q({},pe,{array:Be,map:Me,object:Ue,set:ze});function Xe(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:O,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:O,Object:e.object,Promise:w,RegExp:e.regExp,Set:e.set,String:O,WeakMap:w,WeakSet:w,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function he(e){var t=Q({},pe,e),r=Xe(t),a=r.Array,s=r.Object;function i(n,o){if(o.prototype=o.Constructor=void 0,!n||typeof n!="object")return n;if(o.cache.has(n))return o.cache.get(n);if(o.prototype=He(n),o.Constructor=o.prototype&&o.prototype.constructor,!o.Constructor||o.Constructor===Object)return s(n,o);if(Je(n))return a(n,o);var c=r[Pe(n)];return c?c(n,o):typeof n.then=="function"?n:s(n,o)}return function(o){return i(o,{Constructor:void 0,cache:Te(),copier:i,prototype:void 0})}}function Ze(e){return he(Q({},Ye,e))}Ze({});he({});var b=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},S={exports:{}},G;function et(){if(G)return S.exports;G=1;var e=S.exports={},t,r;function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?t=setTimeout:t=a}catch{t=a}try{typeof clearTimeout=="function"?r=clearTimeout:r=s}catch{r=s}})();function i(f){if(t===setTimeout)return setTimeout(f,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(f,0);try{return t(f,0)}catch{try{return t.call(null,f,0)}catch{return t.call(this,f,0)}}}function n(f){if(r===clearTimeout)return clearTimeout(f);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(f);try{return r(f)}catch{try{return r.call(null,f)}catch{return r.call(this,f)}}}var o=[],c=!1,u,l=-1;function g(){!c||!u||(c=!1,u.length?o=u.concat(o):l=-1,o.length&&h())}function h(){if(!c){var f=i(g);c=!0;for(var p=o.length;p;){for(u=o,o=[];++l<p;)u&&u[l].run();l=-1,p=o.length}u=null,c=!1,n(f)}}e.nextTick=function(f){var p=new Array(arguments.length-1);if(arguments.length>1)for(var m=1;m<arguments.length;m++)p[m-1]=arguments[m];o.push(new F(f,p)),o.length===1&&!c&&i(h)};function F(f,p){this.fun=f,this.array=p}F.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function d(){}return e.on=d,e.addListener=d,e.once=d,e.off=d,e.removeListener=d,e.removeAllListeners=d,e.emit=d,e.prependListener=d,e.prependOnceListener=d,e.listeners=function(f){return[]},e.binding=function(f){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(f){throw new Error("process.chdir is not supported")},e.umask=function(){return 0},S.exports}et();var j,K;function tt(){if(K)return j;K=1;var e=typeof b=="object"&&b&&b.Object===Object&&b;return j=e,j}var T,U;function rt(){if(U)return T;U=1;var e=tt(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return T=r,T}var A,W;function de(){if(W)return A;W=1;var e=rt(),t=e.Symbol;return A=t,A}var _,z;function nt(){if(z)return _;z=1;var e=de(),t=Object.prototype,r=t.hasOwnProperty,a=t.toString,s=e?e.toStringTag:void 0;function i(n){var o=r.call(n,s),c=n[s];try{n[s]=void 0;var u=!0}catch{}var l=a.call(n);return u&&(o?n[s]=c:delete n[s]),l}return _=i,_}var k,J;function it(){if(J)return k;J=1;var e=Object.prototype,t=e.toString;function r(a){return t.call(a)}return k=r,k}var q,H;function me(){if(H)return q;H=1;var e=de(),t=nt(),r=it(),a="[object Null]",s="[object Undefined]",i=e?e.toStringTag:void 0;function n(o){return o==null?o===void 0?s:a:i&&i in Object(o)?t(o):r(o)}return q=n,q}var P,Y;function ot(){if(Y)return P;Y=1;var e=Array.isArray;return P=e,P}var R,X;function be(){if(X)return R;X=1;function e(t){return t!=null&&typeof t=="object"}return R=e,R}var D,Z;function at(){if(Z)return D;Z=1;var e=me(),t=ot(),r=be(),a="[object String]";function s(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==a}return D=s,D}at();var E,ee;function st(){if(ee)return E;ee=1;function e(t,r){return function(a){return t(r(a))}}return E=e,E}var x,te;function ct(){if(te)return x;te=1;var e=st(),t=e(Object.getPrototypeOf,Object);return x=t,x}var I,re;function ut(){if(re)return I;re=1;var e=me(),t=ct(),r=be(),a="[object Object]",s=Function.prototype,i=Object.prototype,n=s.toString,o=i.hasOwnProperty,c=n.call(Object);function u(l){if(!r(l)||e(l)!=a)return!1;var g=t(l);if(g===null)return!0;var h=o.call(g,"constructor")&&g.constructor;return typeof h=="function"&&h instanceof h&&n.call(h)==c}return I=u,I}ut();var ve={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},we={0:8203,1:8204,2:8205,3:65279};new Array(4).fill(String.fromCodePoint(we[0])).join("");Object.fromEntries(Object.entries(we).map(e=>e.reverse()));Object.fromEntries(Object.entries(ve).map(e=>e.reverse()));`${Object.values(ve).map(e=>`\\u{${e.toString(16)}}`).join("")}`;var L,ne;function lt(){if(ne)return L;ne=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString;return L=function(r,a,s){if(t.call(a)!=="[object Function]")throw new TypeError("iterator must be a function");var i=r.length;if(i===+i)for(var n=0;n<i;n++)a.call(s,r[n],n,r);else for(var o in r)e.call(r,o)&&a.call(s,r[o],o,r)},L}var B,ie;function ft(){if(ie)return B;ie=1;var e=lt();B=t;function t(r,a,s){if(arguments.length===3)return t.set(r,a,s);if(arguments.length===2)return t.get(r,a);var i=t.bind(t,r);for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n].bind(i,r));return i}return t.get=function(r,a){for(var s=Array.isArray(a)?a:t.parse(a),i=0;i<s.length;++i){var n=s[i];if(!(typeof r=="object"&&n in r))throw new Error("Invalid reference token: "+n);r=r[n]}return r},t.set=function(r,a,s){var i=Array.isArray(a)?a:t.parse(a),n=i[0];if(i.length===0)throw Error("Can not set the root object");for(var o=0;o<i.length-1;++o){var c=i[o];typeof c!="string"&&typeof c!="number"&&(c=String(c)),!(c==="__proto__"||c==="constructor"||c==="prototype")&&(c==="-"&&Array.isArray(r)&&(c=r.length),n=i[o+1],c in r||(n.match(/^(\d+|-)$/)?r[c]=[]:r[c]={}),r=r[c])}return n==="-"&&Array.isArray(r)&&(n=r.length),r[n]=s,this},t.remove=function(r,a){var s=Array.isArray(a)?a:t.parse(a),i=s[s.length-1];if(i===void 0)throw new Error('Invalid JSON pointer for remove: "'+a+'"');var n=t.get(r,s.slice(0,-1));if(Array.isArray(n)){var o=+i;if(i===""&&isNaN(o))throw new Error('Invalid array index: "'+i+'"');Array.prototype.splice.call(n,o,1)}else delete n[i]},t.dict=function(r,a){var s={};return t.walk(r,function(i,n){s[n]=i},a),s},t.walk=function(r,a,s){var i=[];s=s||function(n){var o=Object.prototype.toString.call(n);return o==="[object Object]"||o==="[object Array]"},(function n(o){e(o,function(c,u){i.push(String(u)),s(c)?n(c):a(c,t.compile(i)),i.pop()})})(r)},t.has=function(r,a){try{t.get(r,a)}catch{return!1}return!0},t.escape=function(r){return r.toString().replace(/~/g,"~0").replace(/\//g,"~1")},t.unescape=function(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")},t.parse=function(r){if(r==="")return[];if(r.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+r);return r.substring(1).split(/\//).map(t.unescape)},t.compile=function(r){return r.length===0?"":"/"+r.map(t.escape).join("/")},B}ft();var v={exports:{}},oe;function gt(){return oe||(oe=1,(function(e,t){t=e.exports=r,t.getSerialize=a;function r(s,i,n,o){return JSON.stringify(s,a(i,o),n)}function a(s,i){var n=[],o=[];return i==null&&(i=function(c,u){return n[0]===u?"[Circular ~]":"[Circular ~."+o.slice(0,n.indexOf(u)).join(".")+"]"}),function(c,u){if(n.length>0){var l=n.indexOf(this);~l?n.splice(l+1):n.push(this),~l?o.splice(l,1/0,c):o.push(c),~n.indexOf(u)&&(u=i.call(this,c,u))}else n.push(u);return s==null?u:s.call(this,c,u)}}})(v,v.exports)),v.exports}gt();class y{static _clientParams;static get clientParams(){if(!this._clientParams)throw new Error("Client is not configured");return this._clientParams}static configure(t){this._clientParams={...t,environment:t.environment??"master"}}static async graphqlQuery(t,r={}){const{space:a,accessToken:s,environment:i="master"}=this.clientParams,n=await fetch(`https://graphql.contentful.com/content/v1/spaces/${a}/environments/${i}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s}`},body:JSON.stringify({query:t,variables:r})});if(!n.ok){const c=await n.text();throw new Error(`GraphQL request failed: ${n.status} ${n.statusText}
|
|
2
|
-
${c}`)}const o=await n.json();if(o.errors)throw new Error(`GraphQL errors: ${JSON.stringify(o.errors,null,2)}`);return o.data}}const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var $e=Function.prototype.toString,C=Object.create,Ce=Object.prototype.toString,Oe=(function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e})();function Se(){return new Oe}function je(){return new WeakMap}var Ae=typeof WeakMap<"u"?je:Se;function N(e){if(!e)return C(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:C(e);if(t&&~$e.call(t).indexOf("[native code]"))try{return new t}catch{}return C(e)}function Te(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function _e(e){return e.flags}var ke=/test/g.flags==="g"?_e:Te;function ae(e){var t=Ce.call(e);return t.substring(8,t.length-1)}function qe(e){return e[Symbol.toStringTag]||ae(e)}var Pe=typeof Symbol<"u"?qe:ae,De=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,se=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,ce=Object.prototype,ue=ce.hasOwnProperty,xe=ce.propertyIsEnumerable,le=typeof V=="function";function Ie(e){return se(e).concat(V(e))}var Ee=le?Ie:se;function $(e,t,r){for(var s=Ee(e),a=0,i=s.length,n=void 0,o=void 0;a<i;++a)if(n=s[a],!(n==="callee"||n==="caller")){if(o=Re(e,n),!o){t[n]=r.copier(e[n],r);continue}!o.get&&!o.set&&(o.value=r.copier(o.value,r));try{De(t,n,o)}catch{t[n]=o.value}}return t}function Le(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var s=0,a=e.length;s<a;++s)r[s]=t.copier(e[s],t);return r}function Be(e,t){var r=new t.Constructor;return t.cache.set(e,r),$(e,r,t)}function fe(e,t){return e.slice(0)}function Ne(e,t){return e.slice(0,e.size,e.type)}function Ve(e,t){return new t.Constructor(fe(e.buffer))}function Qe(e,t){return new t.Constructor(e.getTime())}function ge(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(s,a){r.set(a,t.copier(s,t))}),r}function Me(e,t){return $(e,ge(e,t),t)}function Fe(e,t){var r=N(t.prototype);t.cache.set(e,r);for(var s in e)ue.call(e,s)&&(r[s]=t.copier(e[s],t));return r}function Ge(e,t){var r=N(t.prototype);t.cache.set(e,r);for(var s in e)ue.call(e,s)&&(r[s]=t.copier(e[s],t));for(var a=V(e),i=0,n=a.length,o=void 0;i<n;++i)o=a[i],xe.call(e,o)&&(r[o]=t.copier(e[o],t));return r}var Ue=le?Ge:Fe;function Ke(e,t){var r=N(t.prototype);return t.cache.set(e,r),$(e,r,t)}function O(e,t){return new t.Constructor(e.valueOf())}function We(e,t){var r=new t.Constructor(e.source,ke(e));return r.lastIndex=e.lastIndex,r}function w(e,t){return e}function pe(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(s){r.add(t.copier(s,t))}),r}function ze(e,t){return $(e,pe(e,t),t)}var Je=Array.isArray,Q=Object.assign,He=Object.getPrototypeOf||(function(e){return e.__proto__}),ye={array:Le,arrayBuffer:fe,blob:Ne,dataView:Ve,date:Qe,error:w,map:ge,object:Ue,regExp:We,set:pe},Ye=Q({},ye,{array:Be,map:Me,object:Ke,set:ze});function Xe(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:O,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:O,Object:e.object,Promise:w,RegExp:e.regExp,Set:e.set,String:O,WeakMap:w,WeakSet:w,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function he(e){var t=Q({},ye,e),r=Xe(t),s=r.Array,a=r.Object;function i(n,o){if(o.prototype=o.Constructor=void 0,!n||typeof n!="object")return n;if(o.cache.has(n))return o.cache.get(n);if(o.prototype=He(n),o.Constructor=o.prototype&&o.prototype.constructor,!o.Constructor||o.Constructor===Object)return a(n,o);if(Je(n))return s(n,o);var c=r[Pe(n)];return c?c(n,o):typeof n.then=="function"?n:a(n,o)}return function(o){return i(o,{Constructor:void 0,cache:Ae(),copier:i,prototype:void 0})}}function Ze(e){return he(Q({},Ye,e))}Ze({});he({});var b=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},S={exports:{}},G;function et(){if(G)return S.exports;G=1;var e=S.exports={},t,r;function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?t=setTimeout:t=s}catch{t=s}try{typeof clearTimeout=="function"?r=clearTimeout:r=a}catch{r=a}})();function i(g){if(t===setTimeout)return setTimeout(g,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(g,0);try{return t(g,0)}catch{try{return t.call(null,g,0)}catch{return t.call(this,g,0)}}}function n(g){if(r===clearTimeout)return clearTimeout(g);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(g);try{return r(g)}catch{try{return r.call(null,g)}catch{return r.call(this,g)}}}var o=[],c=!1,u,l=-1;function f(){!c||!u||(c=!1,u.length?o=u.concat(o):l=-1,o.length&&h())}function h(){if(!c){var g=i(f);c=!0;for(var y=o.length;y;){for(u=o,o=[];++l<y;)u&&u[l].run();l=-1,y=o.length}u=null,c=!1,n(g)}}e.nextTick=function(g){var y=new Array(arguments.length-1);if(arguments.length>1)for(var m=1;m<arguments.length;m++)y[m-1]=arguments[m];o.push(new F(g,y)),o.length===1&&!c&&i(h)};function F(g,y){this.fun=g,this.array=y}F.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function d(){}return e.on=d,e.addListener=d,e.once=d,e.off=d,e.removeListener=d,e.removeAllListeners=d,e.emit=d,e.prependListener=d,e.prependOnceListener=d,e.listeners=function(g){return[]},e.binding=function(g){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(g){throw new Error("process.chdir is not supported")},e.umask=function(){return 0},S.exports}et();var j,U;function tt(){if(U)return j;U=1;var e=typeof b=="object"&&b&&b.Object===Object&&b;return j=e,j}var A,K;function rt(){if(K)return A;K=1;var e=tt(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return A=r,A}var T,W;function de(){if(W)return T;W=1;var e=rt(),t=e.Symbol;return T=t,T}var _,z;function nt(){if(z)return _;z=1;var e=de(),t=Object.prototype,r=t.hasOwnProperty,s=t.toString,a=e?e.toStringTag:void 0;function i(n){var o=r.call(n,a),c=n[a];try{n[a]=void 0;var u=!0}catch{}var l=s.call(n);return u&&(o?n[a]=c:delete n[a]),l}return _=i,_}var k,J;function it(){if(J)return k;J=1;var e=Object.prototype,t=e.toString;function r(s){return t.call(s)}return k=r,k}var q,H;function me(){if(H)return q;H=1;var e=de(),t=nt(),r=it(),s="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function n(o){return o==null?o===void 0?a:s:i&&i in Object(o)?t(o):r(o)}return q=n,q}var P,Y;function ot(){if(Y)return P;Y=1;var e=Array.isArray;return P=e,P}var D,X;function be(){if(X)return D;X=1;function e(t){return t!=null&&typeof t=="object"}return D=e,D}var R,Z;function at(){if(Z)return R;Z=1;var e=me(),t=ot(),r=be(),s="[object String]";function a(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==s}return R=a,R}at();var x,ee;function st(){if(ee)return x;ee=1;function e(t,r){return function(s){return t(r(s))}}return x=e,x}var I,te;function ct(){if(te)return I;te=1;var e=st(),t=e(Object.getPrototypeOf,Object);return I=t,I}var E,re;function ut(){if(re)return E;re=1;var e=me(),t=ct(),r=be(),s="[object Object]",a=Function.prototype,i=Object.prototype,n=a.toString,o=i.hasOwnProperty,c=n.call(Object);function u(l){if(!r(l)||e(l)!=s)return!1;var f=t(l);if(f===null)return!0;var h=o.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&n.call(h)==c}return E=u,E}ut();var ve={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},we={0:8203,1:8204,2:8205,3:65279};new Array(4).fill(String.fromCodePoint(we[0])).join("");Object.fromEntries(Object.entries(we).map(e=>e.reverse()));Object.fromEntries(Object.entries(ve).map(e=>e.reverse()));`${Object.values(ve).map(e=>`\\u{${e.toString(16)}}`).join("")}`;var L,ne;function lt(){if(ne)return L;ne=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString;return L=function(r,s,a){if(t.call(s)!=="[object Function]")throw new TypeError("iterator must be a function");var i=r.length;if(i===+i)for(var n=0;n<i;n++)s.call(a,r[n],n,r);else for(var o in r)e.call(r,o)&&s.call(a,r[o],o,r)},L}var B,ie;function ft(){if(ie)return B;ie=1;var e=lt();B=t;function t(r,s,a){if(arguments.length===3)return t.set(r,s,a);if(arguments.length===2)return t.get(r,s);var i=t.bind(t,r);for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n].bind(i,r));return i}return t.get=function(r,s){for(var a=Array.isArray(s)?s:t.parse(s),i=0;i<a.length;++i){var n=a[i];if(!(typeof r=="object"&&n in r))throw new Error("Invalid reference token: "+n);r=r[n]}return r},t.set=function(r,s,a){var i=Array.isArray(s)?s:t.parse(s),n=i[0];if(i.length===0)throw Error("Can not set the root object");for(var o=0;o<i.length-1;++o){var c=i[o];typeof c!="string"&&typeof c!="number"&&(c=String(c)),!(c==="__proto__"||c==="constructor"||c==="prototype")&&(c==="-"&&Array.isArray(r)&&(c=r.length),n=i[o+1],c in r||(n.match(/^(\d+|-)$/)?r[c]=[]:r[c]={}),r=r[c])}return n==="-"&&Array.isArray(r)&&(n=r.length),r[n]=a,this},t.remove=function(r,s){var a=Array.isArray(s)?s:t.parse(s),i=a[a.length-1];if(i===void 0)throw new Error('Invalid JSON pointer for remove: "'+s+'"');var n=t.get(r,a.slice(0,-1));if(Array.isArray(n)){var o=+i;if(i===""&&isNaN(o))throw new Error('Invalid array index: "'+i+'"');Array.prototype.splice.call(n,o,1)}else delete n[i]},t.dict=function(r,s){var a={};return t.walk(r,function(i,n){a[n]=i},s),a},t.walk=function(r,s,a){var i=[];a=a||function(n){var o=Object.prototype.toString.call(n);return o==="[object Object]"||o==="[object Array]"},(function n(o){e(o,function(c,u){i.push(String(u)),a(c)?n(c):s(c,t.compile(i)),i.pop()})})(r)},t.has=function(r,s){try{t.get(r,s)}catch{return!1}return!0},t.escape=function(r){return r.toString().replace(/~/g,"~0").replace(/\//g,"~1")},t.unescape=function(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")},t.parse=function(r){if(r==="")return[];if(r.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+r);return r.substring(1).split(/\//).map(t.unescape)},t.compile=function(r){return r.length===0?"":"/"+r.map(t.escape).join("/")},B}ft();var v={exports:{}},oe;function gt(){return oe||(oe=1,(function(e,t){t=e.exports=r,t.getSerialize=s;function r(a,i,n,o){return JSON.stringify(a,s(i,o),n)}function s(a,i){var n=[],o=[];return i==null&&(i=function(c,u){return n[0]===u?"[Circular ~]":"[Circular ~."+o.slice(0,n.indexOf(u)).join(".")+"]"}),function(c,u){if(n.length>0){var l=n.indexOf(this);~l?n.splice(l+1):n.push(this),~l?o.splice(l,1/0,c):o.push(c),~n.indexOf(u)&&(u=i.call(this,c,u))}else n.push(u);return a==null?u:a.call(this,c,u)}}})(v,v.exports)),v.exports}gt();class p{static _clientParams;static get clientParams(){if(!this._clientParams)throw new Error("Client is not configured");return this._clientParams}static configure(t){this._clientParams={...t,environment:t.environment??"master"}}static async graphqlQuery(t,r={}){const{space:s,accessToken:a,environment:i="master"}=this.clientParams,n=await fetch(`https://graphql.contentful.com/content/v1/spaces/${s}/environments/${i}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({query:t,variables:r})});if(!n.ok){const c=await n.text();throw new Error(`GraphQL request failed: ${n.status} ${n.statusText}
|
|
2
|
+
${c}`)}const o=await n.json();if(o.errors)throw new Error(`GraphQL errors: ${JSON.stringify(o.errors,null,2)}`);return o.data}}const pt=async({slot:e,limit:t=20,platform:r,marketCode:s,language:a})=>{const i=["$slot: String!","$limit: Int!"],n={slot:e,limit:t},o=["{ slot: $slot }"];r&&(i.push("$platform: String!"),n.platform=r,o.push("{ platform_contains_some: [$platform] }")),s&&(i.push("$marketCode: String!"),n.marketCode=s,o.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),a&&(i.push("$language: String!"),n.language=a,o.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const c=`(${i.join(", ")})`,u=`(
|
|
3
3
|
limit: $limit
|
|
4
4
|
where: {
|
|
5
5
|
AND: [
|
|
@@ -43,12 +43,12 @@ query${c} {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
`,{bannerCollectionCollection:
|
|
46
|
+
`,{bannerCollectionCollection:f}=await p.graphqlQuery(l,{...n});return{data:f.items}};class M extends Response{constructor(...t){super(t[0]??"Not Found",{status:404,...t[1]})}}const yt=async({marketCode:e,language:t,limit:r,skip:s}={})=>{const a=[],i={},n=[],o=[];e&&(a.push("$marketCode: String!"),i.marketCode=e,o.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),t&&(a.push("$language: String!"),i.language=t,o.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }")),typeof r=="number"&&(a.push("$limit: Int!"),i.limit=r,n.push("limit: $limit")),typeof s=="number"&&(a.push("$skip: Int!"),i.skip=s,n.push("skip: $skip")),o.length&&n.push(`where: {
|
|
47
47
|
AND: [
|
|
48
48
|
${o.join(`
|
|
49
49
|
`)}
|
|
50
50
|
]
|
|
51
|
-
}`);const c=
|
|
51
|
+
}`);const c=a.length?`(${a.join(", ")})`:"",u=n.length?`(
|
|
52
52
|
${n.join(`
|
|
53
53
|
`)}
|
|
54
54
|
)`:"",l=`
|
|
@@ -57,14 +57,13 @@ query${c} {
|
|
|
57
57
|
items {
|
|
58
58
|
sys {
|
|
59
59
|
id
|
|
60
|
+
createdAt
|
|
61
|
+
updatedAt
|
|
60
62
|
}
|
|
61
63
|
title
|
|
62
64
|
shortDescription
|
|
63
65
|
slug
|
|
64
66
|
category {
|
|
65
|
-
sys {
|
|
66
|
-
id
|
|
67
|
-
}
|
|
68
67
|
title
|
|
69
68
|
slug
|
|
70
69
|
}
|
|
@@ -77,28 +76,27 @@ query${c} {
|
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
|
-
`,{blogPostCollection:
|
|
79
|
+
`,{blogPostCollection:f}=await p.graphqlQuery(l,{...i});return{data:f.items}},ht=async({id:e,slug:t,marketCode:r,language:s})=>{const a=[],i={},n=[];if(e)a.push("$id: String!"),i.id=e,n.push("{ sys: { id: $id } }");else if(t)a.push("$slug: String!"),i.slug=t,n.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");r&&(a.push("$marketCode: String!"),i.marketCode=r,n.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),s&&(a.push("$language: String!"),i.language=s,n.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const o=`(${a.join(", ")})`,c=`(
|
|
81
80
|
limit: 1
|
|
82
81
|
where: {
|
|
83
82
|
AND: [
|
|
84
|
-
${
|
|
83
|
+
${n.join(`
|
|
85
84
|
`)}
|
|
86
85
|
]
|
|
87
86
|
}
|
|
88
|
-
)`,
|
|
89
|
-
query${
|
|
90
|
-
blogPostCollection${
|
|
87
|
+
)`,u=`
|
|
88
|
+
query${o} {
|
|
89
|
+
blogPostCollection${c} {
|
|
91
90
|
items {
|
|
92
91
|
sys {
|
|
93
92
|
id
|
|
93
|
+
createdAt
|
|
94
|
+
updatedAt
|
|
94
95
|
}
|
|
95
96
|
title
|
|
96
97
|
shortDescription
|
|
97
98
|
slug
|
|
98
99
|
category {
|
|
99
|
-
sys {
|
|
100
|
-
id
|
|
101
|
-
}
|
|
102
100
|
title
|
|
103
101
|
slug
|
|
104
102
|
}
|
|
@@ -109,9 +107,6 @@ query${n} {
|
|
|
109
107
|
contentType
|
|
110
108
|
}
|
|
111
109
|
author {
|
|
112
|
-
sys {
|
|
113
|
-
id
|
|
114
|
-
}
|
|
115
110
|
name
|
|
116
111
|
avatar {
|
|
117
112
|
url
|
|
@@ -124,9 +119,6 @@ query${n} {
|
|
|
124
119
|
json
|
|
125
120
|
}
|
|
126
121
|
seo {
|
|
127
|
-
sys {
|
|
128
|
-
id
|
|
129
|
-
}
|
|
130
122
|
metaTitle
|
|
131
123
|
metaDescription
|
|
132
124
|
metaKeywords
|
|
@@ -135,7 +127,7 @@ query${n} {
|
|
|
135
127
|
}
|
|
136
128
|
}
|
|
137
129
|
}
|
|
138
|
-
`,{blogPostCollection:
|
|
130
|
+
`,{blogPostCollection:l}=await p.graphqlQuery(u,{...i}),f=l.items.at(0);if(!f)throw new M;return{data:f}},dt=async({limit:e=20,marketCode:t,language:r}={})=>{const s=["$limit: Int!"],a={limit:e},i=[];t&&(s.push("$marketCode: String!"),a.marketCode=t,i.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),r&&(s.push("$language: String!"),a.language=r,i.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const n=`(${s.join(", ")})`,o=i.length?`(
|
|
139
131
|
limit: $limit
|
|
140
132
|
where: {
|
|
141
133
|
AND: [
|
|
@@ -166,12 +158,12 @@ query${n} {
|
|
|
166
158
|
}
|
|
167
159
|
}
|
|
168
160
|
}
|
|
169
|
-
`,{brandCollectionCollection:u}=await
|
|
161
|
+
`,{brandCollectionCollection:u}=await p.graphqlQuery(c,{...a});return{data:u.items}},mt=async({marketCode:e,language:t,limit:r,skip:s}={})=>{const a=[],i={},n=[],o=[];e&&(a.push("$marketCode: String!"),i.marketCode=e,o.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),t&&(a.push("$language: String!"),i.language=t,o.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }")),typeof r=="number"&&(a.push("$limit: Int!"),i.limit=r,n.push("limit: $limit")),typeof s=="number"&&(a.push("$skip: Int!"),i.skip=s,n.push("skip: $skip")),o.length&&n.push(`where: {
|
|
170
162
|
AND: [
|
|
171
163
|
${o.join(`
|
|
172
164
|
`)}
|
|
173
165
|
]
|
|
174
|
-
}`);const c=
|
|
166
|
+
}`);const c=a.length?`(${a.join(", ")})`:"",u=n.length?`(
|
|
175
167
|
${n.join(`
|
|
176
168
|
`)}
|
|
177
169
|
)`:"",l=`
|
|
@@ -180,15 +172,14 @@ query${c} {
|
|
|
180
172
|
items {
|
|
181
173
|
sys {
|
|
182
174
|
id
|
|
175
|
+
createdAt
|
|
176
|
+
updatedAt
|
|
183
177
|
}
|
|
184
178
|
title
|
|
185
179
|
slug
|
|
186
180
|
description
|
|
187
181
|
order
|
|
188
182
|
seo {
|
|
189
|
-
sys {
|
|
190
|
-
id
|
|
191
|
-
}
|
|
192
183
|
metaTitle
|
|
193
184
|
metaDescription
|
|
194
185
|
metaKeywords
|
|
@@ -197,29 +188,28 @@ query${c} {
|
|
|
197
188
|
}
|
|
198
189
|
}
|
|
199
190
|
}
|
|
200
|
-
`,{documentationCategoryCollection:
|
|
191
|
+
`,{documentationCategoryCollection:f}=await p.graphqlQuery(l,{...i});return{data:f.items}},bt=async({id:e,slug:t,marketCode:r,language:s})=>{const a=[],i={},n=[];if(e)a.push("$id: String!"),i.id=e,n.push("{ sys: { id: $id } }");else if(t)a.push("$slug: String!"),i.slug=t,n.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");r&&(a.push("$marketCode: String!"),i.marketCode=r,n.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),s&&(a.push("$language: String!"),i.language=s,n.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const o=`(${a.join(", ")})`,c=`(
|
|
201
192
|
limit: 1
|
|
202
193
|
where: {
|
|
203
194
|
AND: [
|
|
204
|
-
${
|
|
195
|
+
${n.join(`
|
|
205
196
|
`)}
|
|
206
197
|
]
|
|
207
198
|
}
|
|
208
|
-
)`,
|
|
209
|
-
query${
|
|
210
|
-
documentationCategoryCollection${
|
|
199
|
+
)`,u=`
|
|
200
|
+
query${o} {
|
|
201
|
+
documentationCategoryCollection${c} {
|
|
211
202
|
items {
|
|
212
203
|
sys {
|
|
213
204
|
id
|
|
205
|
+
createdAt
|
|
206
|
+
updatedAt
|
|
214
207
|
}
|
|
215
208
|
title
|
|
216
209
|
slug
|
|
217
210
|
description
|
|
218
211
|
order
|
|
219
212
|
seo {
|
|
220
|
-
sys {
|
|
221
|
-
id
|
|
222
|
-
}
|
|
223
213
|
metaTitle
|
|
224
214
|
metaDescription
|
|
225
215
|
metaKeywords
|
|
@@ -228,7 +218,7 @@ query${n} {
|
|
|
228
218
|
}
|
|
229
219
|
}
|
|
230
220
|
}
|
|
231
|
-
`,{documentationCategoryCollection:
|
|
221
|
+
`,{documentationCategoryCollection:l}=await p.graphqlQuery(u,{...i}),f=l.items.at(0);if(!f)throw new M;return{data:f}},vt=async({marketCode:e,language:t,categorySlug:r,limit:s,skip:a}={})=>{const i=[],n={},o=[],c=[];e&&(i.push("$marketCode: String!"),n.marketCode=e,c.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),t&&(i.push("$language: String!"),n.language=t,c.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }")),r&&(i.push("$categorySlug: String!"),n.categorySlug=r,c.push("{ category: { slug: $categorySlug } }")),typeof s=="number"&&(i.push("$limit: Int!"),n.limit=s,o.push("limit: $limit")),typeof a=="number"&&(i.push("$skip: Int!"),n.skip=a,o.push("skip: $skip")),c.length&&o.push(`where: {
|
|
232
222
|
AND: [
|
|
233
223
|
${c.join(`
|
|
234
224
|
`)}
|
|
@@ -236,22 +226,18 @@ query${n} {
|
|
|
236
226
|
}`);const u=i.length?`(${i.join(", ")})`:"",l=o.length?`(
|
|
237
227
|
${o.join(`
|
|
238
228
|
`)}
|
|
239
|
-
)`:"",
|
|
229
|
+
)`:"",f=`
|
|
240
230
|
query${u} {
|
|
241
231
|
documentationArticleCollection${l} {
|
|
242
232
|
items {
|
|
243
233
|
sys {
|
|
244
234
|
id
|
|
235
|
+
createdAt
|
|
236
|
+
updatedAt
|
|
245
237
|
}
|
|
246
238
|
title
|
|
247
239
|
slug
|
|
248
|
-
content {
|
|
249
|
-
json
|
|
250
|
-
}
|
|
251
240
|
author {
|
|
252
|
-
sys {
|
|
253
|
-
id
|
|
254
|
-
}
|
|
255
241
|
name
|
|
256
242
|
avatar {
|
|
257
243
|
url
|
|
@@ -261,49 +247,30 @@ query${u} {
|
|
|
261
247
|
}
|
|
262
248
|
}
|
|
263
249
|
category {
|
|
264
|
-
sys {
|
|
265
|
-
id
|
|
266
|
-
}
|
|
267
250
|
title
|
|
268
251
|
slug
|
|
269
252
|
description
|
|
270
253
|
order
|
|
271
|
-
seo {
|
|
272
|
-
sys {
|
|
273
|
-
id
|
|
274
|
-
}
|
|
275
|
-
metaTitle
|
|
276
|
-
metaDescription
|
|
277
|
-
metaKeywords
|
|
278
|
-
metaRobots
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
seo {
|
|
282
|
-
sys {
|
|
283
|
-
id
|
|
284
|
-
}
|
|
285
|
-
metaTitle
|
|
286
|
-
metaDescription
|
|
287
|
-
metaKeywords
|
|
288
|
-
metaRobots
|
|
289
254
|
}
|
|
290
255
|
}
|
|
291
256
|
}
|
|
292
257
|
}
|
|
293
|
-
`,{documentationArticleCollection:h}=await
|
|
258
|
+
`,{documentationArticleCollection:h}=await p.graphqlQuery(f,{...n});return{data:h.items}},wt=async({id:e,slug:t,marketCode:r,language:s})=>{const a=[],i={},n=[];if(e)a.push("$id: String!"),i.id=e,n.push("{ sys: { id: $id } }");else if(t)a.push("$slug: String!"),i.slug=t,n.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");r&&(a.push("$marketCode: String!"),i.marketCode=r,n.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),s&&(a.push("$language: String!"),i.language=s,n.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const o=`(${a.join(", ")})`,c=`(
|
|
294
259
|
limit: 1
|
|
295
260
|
where: {
|
|
296
261
|
AND: [
|
|
297
|
-
${
|
|
262
|
+
${n.join(`
|
|
298
263
|
`)}
|
|
299
264
|
]
|
|
300
265
|
}
|
|
301
|
-
)`,
|
|
302
|
-
query${
|
|
303
|
-
documentationArticleCollection${
|
|
266
|
+
)`,u=`
|
|
267
|
+
query${o} {
|
|
268
|
+
documentationArticleCollection${c} {
|
|
304
269
|
items {
|
|
305
270
|
sys {
|
|
306
271
|
id
|
|
272
|
+
createdAt
|
|
273
|
+
updatedAt
|
|
307
274
|
}
|
|
308
275
|
title
|
|
309
276
|
slug
|
|
@@ -311,9 +278,6 @@ query${n} {
|
|
|
311
278
|
json
|
|
312
279
|
}
|
|
313
280
|
author {
|
|
314
|
-
sys {
|
|
315
|
-
id
|
|
316
|
-
}
|
|
317
281
|
name
|
|
318
282
|
avatar {
|
|
319
283
|
url
|
|
@@ -323,27 +287,12 @@ query${n} {
|
|
|
323
287
|
}
|
|
324
288
|
}
|
|
325
289
|
category {
|
|
326
|
-
sys {
|
|
327
|
-
id
|
|
328
|
-
}
|
|
329
290
|
title
|
|
330
291
|
slug
|
|
331
292
|
description
|
|
332
293
|
order
|
|
333
|
-
seo {
|
|
334
|
-
sys {
|
|
335
|
-
id
|
|
336
|
-
}
|
|
337
|
-
metaTitle
|
|
338
|
-
metaDescription
|
|
339
|
-
metaKeywords
|
|
340
|
-
metaRobots
|
|
341
|
-
}
|
|
342
294
|
}
|
|
343
295
|
seo {
|
|
344
|
-
sys {
|
|
345
|
-
id
|
|
346
|
-
}
|
|
347
296
|
metaTitle
|
|
348
297
|
metaDescription
|
|
349
298
|
metaKeywords
|
|
@@ -352,10 +301,10 @@ query${n} {
|
|
|
352
301
|
}
|
|
353
302
|
}
|
|
354
303
|
}
|
|
355
|
-
`,{documentationArticleCollection:
|
|
304
|
+
`,{documentationArticleCollection:l}=await p.graphqlQuery(u,{...i}),f=l.items.at(0);if(!f)throw new M;return{data:f}},$t=async({marketCode:e,language:t}={})=>{const r=[],s={},a=[];e&&(r.push("$marketCode: String!"),s.marketCode=e,a.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),t&&(r.push("$language: String!"),s.language=t,a.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const i=r.length?`(${r.join(", ")})`:"",n=a.length?`(
|
|
356
305
|
where: {
|
|
357
306
|
AND: [
|
|
358
|
-
${
|
|
307
|
+
${a.join(`
|
|
359
308
|
`)}
|
|
360
309
|
]
|
|
361
310
|
}
|
|
@@ -383,7 +332,7 @@ query${i} {
|
|
|
383
332
|
}
|
|
384
333
|
}
|
|
385
334
|
}
|
|
386
|
-
`,{hyperlinkCollectionCollection:c}=await
|
|
335
|
+
`,{hyperlinkCollectionCollection:c}=await p.graphqlQuery(o,{...s});return{data:c.items}},Ct=async({limit:e=20,marketCode:t,language:r}={})=>{const s=["$limit: Int!"],a={limit:e},i=[];t&&(s.push("$marketCode: String!"),a.marketCode=t,i.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),r&&(s.push("$language: String!"),a.language=r,i.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const n=`(${s.join(", ")})`,o=i.length?`(
|
|
387
336
|
limit: $limit
|
|
388
337
|
where: {
|
|
389
338
|
AND: [
|
|
@@ -406,4 +355,4 @@ query${n} {
|
|
|
406
355
|
}
|
|
407
356
|
}
|
|
408
357
|
}
|
|
409
|
-
`,{keywordCollectionCollection:u}=await
|
|
358
|
+
`,{keywordCollectionCollection:u}=await p.graphqlQuery(c,{...a});return{data:u.items}};exports.ContentfulSDK=p;exports.getBlogPostDetail=ht;exports.getDocArticleDetail=wt;exports.getDocCategoryDetail=bt;exports.listBannerCollections=pt;exports.listBlogPosts=yt;exports.listBrandCollections=dt;exports.listDocArticles=vt;exports.listDocCategories=mt;exports.listHyperlinkCollections=$t;exports.listKeywordCollections=Ct;
|