@janbox/contentful-marketplace-sdk 1.0.20 → 2.0.0

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.
@@ -1,7 +1,11 @@
1
- import { CreateClientParams } from 'contentful';
1
+ export interface ContentfulSDKConfig {
2
+ url: string;
3
+ method?: string;
4
+ headers?: Record<string, string>;
5
+ }
2
6
  export declare class ContentfulSDK {
3
- private static _clientParams;
4
- static get clientParams(): CreateClientParams;
5
- static configure(params: CreateClientParams): void;
7
+ private static _config;
8
+ static get config(): ContentfulSDKConfig;
9
+ static configure(params: ContentfulSDKConfig): void;
6
10
  static graphqlQuery<T extends object>(query: string, variables?: Record<string, any>): Promise<T>;
7
11
  }
@@ -1,13 +1,8 @@
1
1
  import { PaginatedResponse } from '../utils';
2
2
  import { GraphQLAsset, TypeBlogCategorySkeleton } from '../types';
3
+ import { GraphQLSeo } from './seo';
3
4
  import { Entry } from 'contentful';
4
5
  type BlogCategoryEntry = Entry<TypeBlogCategorySkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
5
- type GraphQLSeo = {
6
- metaTitle: string;
7
- metaDescription: string | null;
8
- metaKeywords: string[] | null;
9
- metaRobots: string[] | null;
10
- };
11
6
  export type BlogCategoryGraphQLItem = {
12
7
  sys: {
13
8
  id: string;
@@ -1,14 +1,9 @@
1
1
  import { GraphQLAsset, GraphQLAssetLink, TypeBlogPostSkeleton } from '../types';
2
2
  import { PaginatedResponse } from '../utils';
3
3
  import { Entry, EntrySys } from 'contentful';
4
+ import { GraphQLSeo } from './seo';
4
5
  type BlogPostEntry = Entry<TypeBlogPostSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
5
6
  type GraphQLEntrySys = Pick<EntrySys, "id" | "createdAt" | "updatedAt">;
6
- type GraphQLSeo = {
7
- metaTitle: string;
8
- metaDescription: string | null;
9
- metaKeywords: string[] | null;
10
- metaRobots: string[] | null;
11
- };
12
7
  type BlogPostCategoryGraphQLItem = {
13
8
  sys: Pick<GraphQLEntrySys, "id">;
14
9
  title: string;
@@ -1,15 +1,10 @@
1
1
  import { GraphQLAsset, GraphQLAssetLink, TypeDocumentationArticleSkeleton, TypeDocumentationCategorySkeleton } from '../types';
2
2
  import { PaginatedResponse } from '../utils';
3
3
  import { Entry, EntrySys } from 'contentful';
4
+ import { GraphQLSeo } from './seo';
4
5
  export type DocCategoryEntry = Entry<TypeDocumentationCategorySkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
5
6
  export type DocArticleEntry = Entry<TypeDocumentationArticleSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
6
7
  type GraphQLEntrySys = Pick<EntrySys, "id" | "createdAt" | "updatedAt">;
7
- type GraphQLSeo = {
8
- metaTitle: string;
9
- metaDescription: string | null;
10
- metaKeywords: string[] | null;
11
- metaRobots: string[] | null;
12
- };
13
8
  export type DocCategoryGraphQLItem = {
14
9
  sys: GraphQLEntrySys;
15
10
  seo: GraphQLSeo | null;
@@ -7,3 +7,4 @@ export * from './documentation';
7
7
  export * from './hyperlink-collection';
8
8
  export * from './hyperlink';
9
9
  export * from './keyword-collection';
10
+ export * from './seo';
@@ -0,0 +1,6 @@
1
+ export type GraphQLSeo = {
2
+ metaTitle: string;
3
+ metaDescription: string | null;
4
+ metaKeywords: string[] | null;
5
+ metaRobots: string[] | null;
6
+ };
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var At=Function.prototype.toString,O=Object.create,Ot=Object.prototype.toString,jt=(function(){function t(){this._keys=[],this._values=[]}return t.prototype.has=function(e){return!!~this._keys.indexOf(e)},t.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},t.prototype.set=function(e,r){this._keys.push(e),this._values.push(r)},t})();function Tt(){return new jt}function qt(){return new WeakMap}var _t=typeof WeakMap<"u"?qt:Tt;function Q(t){if(!t)return O(null);var e=t.constructor;if(e===Object)return t===Object.prototype?{}:O(t);if(e&&~At.call(e).indexOf("[native code]"))try{return new e}catch{}return O(t)}function Pt(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}function xt(t){return t.flags}var Dt=/test/g.flags==="g"?xt:Pt;function lt(t){var e=Ot.call(t);return e.substring(8,e.length-1)}function It(t){return t[Symbol.toStringTag]||lt(t)}var Rt=typeof Symbol<"u"?It:lt,Mt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,ct=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,ut=Object.prototype,gt=ut.hasOwnProperty,Bt=ut.propertyIsEnumerable,ft=typeof F=="function";function Et(t){return ct(t).concat(F(t))}var Lt=ft?Et:ct;function k(t,e,r){for(var a=Lt(t),s=0,n=a.length,o=void 0,i=void 0;s<n;++s)if(o=a[s],!(o==="callee"||o==="caller")){if(i=zt(t,o),!i){e[o]=r.copier(t[o],r);continue}!i.get&&!i.set&&(i.value=r.copier(i.value,r));try{Mt(e,o,i)}catch{e[o]=i.value}}return e}function Vt(t,e){var r=new e.Constructor;e.cache.set(t,r);for(var a=0,s=t.length;a<s;++a)r[a]=e.copier(t[a],e);return r}function Nt(t,e){var r=new e.Constructor;return e.cache.set(t,r),k(t,r,e)}function ht(t,e){return t.slice(0)}function Qt(t,e){return t.slice(0,t.size,t.type)}function Ft(t,e){return new e.Constructor(ht(t.buffer))}function Gt(t,e){return new e.Constructor(t.getTime())}function pt(t,e){var r=new e.Constructor;return e.cache.set(t,r),t.forEach(function(a,s){r.set(s,e.copier(a,e))}),r}function Ut(t,e){return k(t,pt(t,e),e)}function Kt(t,e){var r=Q(e.prototype);e.cache.set(t,r);for(var a in t)gt.call(t,a)&&(r[a]=e.copier(t[a],e));return r}function Wt(t,e){var r=Q(e.prototype);e.cache.set(t,r);for(var a in t)gt.call(t,a)&&(r[a]=e.copier(t[a],e));for(var s=F(t),n=0,o=s.length,i=void 0;n<o;++n)i=s[n],Bt.call(t,i)&&(r[i]=e.copier(t[i],e));return r}var Ht=ft?Wt:Kt;function Jt(t,e){var r=Q(e.prototype);return e.cache.set(t,r),k(t,r,e)}function j(t,e){return new e.Constructor(t.valueOf())}function Yt(t,e){var r=new e.Constructor(t.source,Dt(t));return r.lastIndex=t.lastIndex,r}function S(t,e){return t}function yt(t,e){var r=new e.Constructor;return e.cache.set(t,r),t.forEach(function(a){r.add(e.copier(a,e))}),r}function Xt(t,e){return k(t,yt(t,e),e)}var Zt=Array.isArray,G=Object.assign,te=Object.getPrototypeOf||(function(t){return t.__proto__}),mt={array:Vt,arrayBuffer:ht,blob:Qt,dataView:Ft,date:Gt,error:S,map:pt,object:Ht,regExp:Yt,set:yt},ee=G({},mt,{array:Nt,map:Ut,object:Jt,set:Xt});function re(t){return{Arguments:t.object,Array:t.array,ArrayBuffer:t.arrayBuffer,Blob:t.blob,Boolean:j,DataView:t.dataView,Date:t.date,Error:t.error,Float32Array:t.arrayBuffer,Float64Array:t.arrayBuffer,Int8Array:t.arrayBuffer,Int16Array:t.arrayBuffer,Int32Array:t.arrayBuffer,Map:t.map,Number:j,Object:t.object,Promise:S,RegExp:t.regExp,Set:t.set,String:j,WeakMap:S,WeakSet:S,Uint8Array:t.arrayBuffer,Uint8ClampedArray:t.arrayBuffer,Uint16Array:t.arrayBuffer,Uint32Array:t.arrayBuffer,Uint64Array:t.arrayBuffer}}function dt(t){var e=G({},mt,t),r=re(e),a=r.Array,s=r.Object;function n(o,i){if(i.prototype=i.Constructor=void 0,!o||typeof o!="object")return o;if(i.cache.has(o))return i.cache.get(o);if(i.prototype=te(o),i.Constructor=i.prototype&&i.prototype.constructor,!i.Constructor||i.Constructor===Object)return s(o,i);if(Zt(o))return a(o,i);var l=r[Rt(o)];return l?l(o,i):typeof o.then=="function"?o:s(o,i)}return function(i){return n(i,{Constructor:void 0,cache:_t(),copier:n,prototype:void 0})}}function oe(t){return dt(G({},ee,t))}oe({});dt({});var C=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},T={exports:{}},U;function ie(){if(U)return T.exports;U=1;var t=T.exports={},e,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"?e=setTimeout:e=a}catch{e=a}try{typeof clearTimeout=="function"?r=clearTimeout:r=s}catch{r=s}})();function n(p){if(e===setTimeout)return setTimeout(p,0);if((e===a||!e)&&setTimeout)return e=setTimeout,setTimeout(p,0);try{return e(p,0)}catch{try{return e.call(null,p,0)}catch{return e.call(this,p,0)}}}function o(p){if(r===clearTimeout)return clearTimeout(p);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(p);try{return r(p)}catch{try{return r.call(null,p)}catch{return r.call(this,p)}}}var i=[],l=!1,c,u=-1;function g(){!l||!c||(l=!1,c.length?i=c.concat(i):u=-1,i.length&&f())}function f(){if(!l){var p=n(g);l=!0;for(var d=i.length;d;){for(c=i,i=[];++u<d;)c&&c[u].run();u=-1,d=i.length}c=null,l=!1,o(p)}}t.nextTick=function(p){var d=new Array(arguments.length-1);if(arguments.length>1)for(var $=1;$<arguments.length;$++)d[$-1]=arguments[$];i.push(new y(p,d)),i.length===1&&!l&&n(f)};function y(p,d){this.fun=p,this.array=d}y.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function h(){}return t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(p){return[]},t.binding=function(p){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(p){throw new Error("process.chdir is not supported")},t.umask=function(){return 0},T.exports}ie();var q,K;function ne(){if(K)return q;K=1;var t=typeof C=="object"&&C&&C.Object===Object&&C;return q=t,q}var _,W;function se(){if(W)return _;W=1;var t=ne(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return _=r,_}var P,H;function bt(){if(H)return P;H=1;var t=se(),e=t.Symbol;return P=e,P}var x,J;function ae(){if(J)return x;J=1;var t=bt(),e=Object.prototype,r=e.hasOwnProperty,a=e.toString,s=t?t.toStringTag:void 0;function n(o){var i=r.call(o,s),l=o[s];try{o[s]=void 0;var c=!0}catch{}var u=a.call(o);return c&&(i?o[s]=l:delete o[s]),u}return x=n,x}var D,Y;function le(){if(Y)return D;Y=1;var t=Object.prototype,e=t.toString;function r(a){return e.call(a)}return D=r,D}var I,X;function $t(){if(X)return I;X=1;var t=bt(),e=ae(),r=le(),a="[object Null]",s="[object Undefined]",n=t?t.toStringTag:void 0;function o(i){return i==null?i===void 0?s:a:n&&n in Object(i)?e(i):r(i)}return I=o,I}var R,Z;function ce(){if(Z)return R;Z=1;var t=Array.isArray;return R=t,R}var M,tt;function wt(){if(tt)return M;tt=1;function t(e){return e!=null&&typeof e=="object"}return M=t,M}var z,et;function ue(){if(et)return z;et=1;var t=$t(),e=ce(),r=wt(),a="[object String]";function s(n){return typeof n=="string"||!e(n)&&r(n)&&t(n)==a}return z=s,z}ue();var B,rt;function ge(){if(rt)return B;rt=1;function t(e,r){return function(a){return e(r(a))}}return B=t,B}var E,ot;function fe(){if(ot)return E;ot=1;var t=ge(),e=t(Object.getPrototypeOf,Object);return E=e,E}var L,it;function he(){if(it)return L;it=1;var t=$t(),e=fe(),r=wt(),a="[object Object]",s=Function.prototype,n=Object.prototype,o=s.toString,i=n.hasOwnProperty,l=o.call(Object);function c(u){if(!r(u)||t(u)!=a)return!1;var g=e(u);if(g===null)return!0;var f=i.call(g,"constructor")&&g.constructor;return typeof f=="function"&&f instanceof f&&o.call(f)==l}return L=c,L}he();var Ct={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},vt={0:8203,1:8204,2:8205,3:65279};new Array(4).fill(String.fromCodePoint(vt[0])).join("");Object.fromEntries(Object.entries(vt).map(t=>t.reverse()));Object.fromEntries(Object.entries(Ct).map(t=>t.reverse()));`${Object.values(Ct).map(t=>`\\u{${t.toString(16)}}`).join("")}`;var V,nt;function pe(){if(nt)return V;nt=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString;return V=function(r,a,s){if(e.call(a)!=="[object Function]")throw new TypeError("iterator must be a function");var n=r.length;if(n===+n)for(var o=0;o<n;o++)a.call(s,r[o],o,r);else for(var i in r)t.call(r,i)&&a.call(s,r[i],i,r)},V}var N,st;function ye(){if(st)return N;st=1;var t=pe();N=e;function e(r,a,s){if(arguments.length===3)return e.set(r,a,s);if(arguments.length===2)return e.get(r,a);var n=e.bind(e,r);for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o].bind(n,r));return n}return e.get=function(r,a){for(var s=Array.isArray(a)?a:e.parse(a),n=0;n<s.length;++n){var o=s[n];if(!(typeof r=="object"&&o in r))throw new Error("Invalid reference token: "+o);r=r[o]}return r},e.set=function(r,a,s){var n=Array.isArray(a)?a:e.parse(a),o=n[0];if(n.length===0)throw Error("Can not set the root object");for(var i=0;i<n.length-1;++i){var l=n[i];typeof l!="string"&&typeof l!="number"&&(l=String(l)),!(l==="__proto__"||l==="constructor"||l==="prototype")&&(l==="-"&&Array.isArray(r)&&(l=r.length),o=n[i+1],l in r||(o.match(/^(\d+|-)$/)?r[l]=[]:r[l]={}),r=r[l])}return o==="-"&&Array.isArray(r)&&(o=r.length),r[o]=s,this},e.remove=function(r,a){var s=Array.isArray(a)?a:e.parse(a),n=s[s.length-1];if(n===void 0)throw new Error('Invalid JSON pointer for remove: "'+a+'"');var o=e.get(r,s.slice(0,-1));if(Array.isArray(o)){var i=+n;if(n===""&&isNaN(i))throw new Error('Invalid array index: "'+n+'"');Array.prototype.splice.call(o,i,1)}else delete o[n]},e.dict=function(r,a){var s={};return e.walk(r,function(n,o){s[o]=n},a),s},e.walk=function(r,a,s){var n=[];s=s||function(o){var i=Object.prototype.toString.call(o);return i==="[object Object]"||i==="[object Array]"},(function o(i){t(i,function(l,c){n.push(String(c)),s(l)?o(l):a(l,e.compile(n)),n.pop()})})(r)},e.has=function(r,a){try{e.get(r,a)}catch{return!1}return!0},e.escape=function(r){return r.toString().replace(/~/g,"~0").replace(/\//g,"~1")},e.unescape=function(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")},e.parse=function(r){if(r==="")return[];if(r.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+r);return r.substring(1).split(/\//).map(e.unescape)},e.compile=function(r){return r.length===0?"":"/"+r.map(e.escape).join("/")},N}ye();var v={exports:{}},at;function me(){return at||(at=1,(function(t,e){e=t.exports=r,e.getSerialize=a;function r(s,n,o,i){return JSON.stringify(s,a(n,i),o)}function a(s,n){var o=[],i=[];return n==null&&(n=function(l,c){return o[0]===c?"[Circular ~]":"[Circular ~."+i.slice(0,o.indexOf(c)).join(".")+"]"}),function(l,c){if(o.length>0){var u=o.indexOf(this);~u?o.splice(u+1):o.push(this),~u?i.splice(u,1/0,l):i.push(l),~o.indexOf(c)&&(c=n.call(this,l,c))}else o.push(c);return s==null?c:s.call(this,l,c)}}})(v,v.exports)),v.exports}me();class m{static _clientParams;static get clientParams(){if(!this._clientParams)throw new Error("Client is not configured");return this._clientParams}static configure(e){this._clientParams={...e,environment:e.environment??"master"}}static async graphqlQuery(e,r={}){const{space:a,accessToken:s,environment:n="master"}=this.clientParams,o=await fetch(`https://graphql.contentful.com/content/v1/spaces/${a}/environments/${n}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s}`},body:JSON.stringify({query:e,variables:r})});if(!o.ok){const l=await o.text();throw new Error(`GraphQL request failed: ${o.status} ${o.statusText}
2
- ${l}`)}const i=await o.json();if(i.errors)throw new Error(`GraphQL errors: ${JSON.stringify(i.errors,null,2)}`);return i.data}}class b{page;total;size;items;totalPages;constructor({page:e,total:r,size:a,items:s}){this.page=e,this.total=r,this.size=a,this.items=s,this.totalPages=Math.ceil(this.total/this.size)}}const de=async({slot:t,page:e=1,size:r=20,platform:a,marketCode:s,locale:n})=>{const o=Math.max(1,Math.floor(e)),i=Math.max(1,Math.floor(r)),l=["$slot: String!","$limit: Int!","$skip: Int!"],c={slot:t,limit:i,skip:(o-1)*i},u=["{ slot: $slot }"];a&&(l.push("$platform: String!"),c.platform=a,u.push("{ platform_contains_some: [$platform] }")),s&&(l.push("$marketCode: String!"),c.marketCode=s,u.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),n&&(l.push("$locale: String!"),c.locale=n,u.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const g=`(${l.join(", ")})`,f=`(
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class p{static _config;static get config(){if(!this._config)throw new Error("Client is not configured");return this._config}static configure(l){this._config=l}static async graphqlQuery(l,a={}){const{url:r,method:o="POST",headers:e={}}=this.config,t=await fetch(r,{method:o,headers:{"Content-Type":"application/json",...e},body:JSON.stringify({query:l,variables:a})});if(!t.ok){const i=await t.text();throw new Error(`GraphQL request failed: ${t.status} ${t.statusText}
2
+ ${i}`)}const s=await t.json();if(s.errors)throw new Error(`GraphQL errors: ${JSON.stringify(s.errors,null,2)}`);return s.data}}class ${page;total;size;items;totalPages;constructor({page:l,total:a,size:r,items:o}){this.page=l,this.total=a,this.size=r,this.items=o,this.totalPages=Math.ceil(this.total/this.size)}}const q=async({slot:c,page:l=1,size:a=20,platform:r,marketCode:o,locale:e})=>{const t=Math.max(1,Math.floor(l)),s=Math.max(1,Math.floor(a)),i=["$slot: String!","$limit: Int!","$skip: Int!"],n={slot:c,limit:s,skip:(t-1)*s},u=["{ slot: $slot }"];r&&(i.push("$platform: String!"),n.platform=r,u.push("{ platform_contains_some: [$platform] }")),o&&(i.push("$marketCode: String!"),n.marketCode=o,u.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),e&&(i.push("$locale: String!"),n.locale=e,u.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const h=`(${i.join(", ")})`,g=`(
3
3
  limit: $limit
4
4
  skip: $skip
5
5
  where: {
@@ -8,9 +8,9 @@ ${l}`)}const i=await o.json();if(i.errors)throw new Error(`GraphQL errors: ${JSO
8
8
  `)}
9
9
  ]
10
10
  }
11
- )`,y=`
12
- query${g} {
13
- bannerCollectionCollection${f} {
11
+ )`,m=`
12
+ query${h} {
13
+ bannerCollectionCollection${g} {
14
14
  total
15
15
  items {
16
16
  sys {
@@ -45,7 +45,7 @@ query${g} {
45
45
  }
46
46
  }
47
47
  }
48
- `,{bannerCollectionCollection:h}=await m.graphqlQuery(y,{...c});return new b({page:o,total:h.total,size:i,items:h.items})};class w extends Response{constructor(...e){super(e[0]??"Not Found",{status:404,...e[1]})}}const be=async({marketCode:t,locale:e,collectionId:r,categoryId:a,page:s=1,size:n=20,skip:o=0}={})=>{const i=Math.max(1,Math.floor(s)),l=Math.max(1,Math.floor(n)),c=Math.max(0,Math.floor(o));if(r){const St=`
48
+ `,{bannerCollectionCollection:d}=await p.graphqlQuery(m,{...n});return new $({page:t,total:d.total,size:s,items:d.items})};class y extends Response{constructor(...l){super(l[0]??"Not Found",{status:404,...l[1]})}}const S=async({marketCode:c,locale:l,collectionId:a,categoryId:r,page:o=1,size:e=20,skip:t=0}={})=>{const s=Math.max(1,Math.floor(o)),i=Math.max(1,Math.floor(e)),n=Math.max(0,Math.floor(t));if(a){const b=`
49
49
  query($collectionId: String!, $limit: Int!, $skip: Int!) {
50
50
  blogCollectionCollection(limit: 1 where: { sys: { id: $collectionId } }) {
51
51
  items {
@@ -86,17 +86,17 @@ query($collectionId: String!, $limit: Int!, $skip: Int!) {
86
86
  }
87
87
  }
88
88
  }
89
- `,{blogCollectionCollection:kt}=await m.graphqlQuery(St,{collectionId:r,limit:l,skip:(i-1)*l+c}),A=kt.items.at(0);if(!A)throw new w;return new b({page:i,total:A.postsCollection?.total??0,size:l,items:A.postsCollection?.items??[]})}const u=["$limit: Int!","$skip: Int!"],g={limit:l,skip:(i-1)*l+c},f=["limit: $limit","skip: $skip"],y=[];t&&(u.push("$marketCode: String!"),g.marketCode=t,y.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),e&&(u.push("$locale: String!"),g.locale=e,y.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")),a&&(u.push("$categoryId: String!"),g.categoryId=a,y.push("{ categories: { sys: { id: $categoryId } } }")),y.length&&f.push(`where: {
89
+ `,{blogCollectionCollection:A}=await p.graphqlQuery(b,{collectionId:a,limit:i,skip:(s-1)*i+n}),f=A.items.at(0);if(!f)throw new y;return new $({page:s,total:f.postsCollection?.total??0,size:i,items:f.postsCollection?.items??[]})}const u=["$limit: Int!","$skip: Int!"],h={limit:i,skip:(s-1)*i+n},g=["limit: $limit","skip: $skip"],m=[];c&&(u.push("$marketCode: String!"),h.marketCode=c,m.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),l&&(u.push("$locale: String!"),h.locale=l,m.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")),r&&(u.push("$categoryId: String!"),h.categoryId=r,m.push("{ categories: { sys: { id: $categoryId } } }")),m.length&&g.push(`where: {
90
90
  AND: [
91
- ${y.join(`
91
+ ${m.join(`
92
92
  `)}
93
93
  ]
94
- }`);const h=u.length?`(${u.join(", ")})`:"",p=f.length?`(
95
- ${f.join(`
94
+ }`);const d=u.length?`(${u.join(", ")})`:"",k=g.length?`(
95
+ ${g.join(`
96
96
  `)}
97
- )`:"",d=`
98
- query${h} {
99
- blogPostCollection${p} {
97
+ )`:"",w=`
98
+ query${d} {
99
+ blogPostCollection${k} {
100
100
  total
101
101
  items {
102
102
  sys {
@@ -131,17 +131,17 @@ query${h} {
131
131
  }
132
132
  }
133
133
  }
134
- `,{blogPostCollection:$}=await m.graphqlQuery(d,{...g});return new b({page:i,total:$.total,size:l,items:$.items})},$e=async({id:t,slug:e,marketCode:r,locale:a})=>{const s=[],n={},o=[];if(t)s.push("$id: String!"),n.id=t,o.push("{ sys: { id: $id } }");else if(e)s.push("$slug: String!"),n.slug=e,o.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");r&&(s.push("$marketCode: String!"),n.marketCode=r,o.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),a&&(s.push("$locale: String!"),n.locale=a,o.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const i=`(${s.join(", ")})`,l=`(
134
+ `,{blogPostCollection:C}=await p.graphqlQuery(w,{...h});return new $({page:s,total:C.total,size:i,items:C.items})},D=async({id:c,slug:l,marketCode:a,locale:r})=>{const o=[],e={},t=[];if(c)o.push("$id: String!"),e.id=c,t.push("{ sys: { id: $id } }");else if(l)o.push("$slug: String!"),e.slug=l,t.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");a&&(o.push("$marketCode: String!"),e.marketCode=a,t.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),r&&(o.push("$locale: String!"),e.locale=r,t.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const s=`(${o.join(", ")})`,i=`(
135
135
  limit: 1
136
136
  where: {
137
137
  AND: [
138
- ${o.join(`
138
+ ${t.join(`
139
139
  `)}
140
140
  ]
141
141
  }
142
- )`,c=`
143
- query${i} {
144
- blogPostCollection${l} {
142
+ )`,n=`
143
+ query${s} {
144
+ blogPostCollection${i} {
145
145
  items {
146
146
  sys {
147
147
  id
@@ -208,17 +208,17 @@ query${i} {
208
208
  }
209
209
  }
210
210
  }
211
- `,{blogPostCollection:u}=await m.graphqlQuery(c,{...n}),g=u.items.at(0);if(!g)throw new w;return g},we=async({marketCode:t,locale:e,page:r=1,size:a=20}={})=>{const s=Math.max(1,Math.floor(r)),n=Math.max(1,Math.floor(a)),o=["$limit: Int!","$skip: Int!"],i={limit:n,skip:(s-1)*n},l=["limit: $limit","skip: $skip"],c=[];t&&(o.push("$marketCode: String!"),i.marketCode=t,c.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),e&&(o.push("$locale: String!"),i.locale=e,c.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")),c.length&&l.push(`where: {
211
+ `,{blogPostCollection:u}=await p.graphqlQuery(n,{...e}),h=u.items.at(0);if(!h)throw new y;return h},x=async({marketCode:c,locale:l,page:a=1,size:r=20}={})=>{const o=Math.max(1,Math.floor(a)),e=Math.max(1,Math.floor(r)),t=["$limit: Int!","$skip: Int!"],s={limit:e,skip:(o-1)*e},i=["limit: $limit","skip: $skip"],n=[];c&&(t.push("$marketCode: String!"),s.marketCode=c,n.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),l&&(t.push("$locale: String!"),s.locale=l,n.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")),n.length&&i.push(`where: {
212
212
  AND: [
213
- ${c.join(`
213
+ ${n.join(`
214
214
  `)}
215
215
  ]
216
- }`);const u=o.length?`(${o.join(", ")})`:"",g=l.length?`(
217
- ${l.join(`
216
+ }`);const u=t.length?`(${t.join(", ")})`:"",h=i.length?`(
217
+ ${i.join(`
218
218
  `)}
219
- )`:"",f=`
219
+ )`:"",g=`
220
220
  query${u} {
221
- blogCategoryCollection${g} {
221
+ blogCategoryCollection${h} {
222
222
  total
223
223
  items {
224
224
  sys {
@@ -235,17 +235,17 @@ query${u} {
235
235
  }
236
236
  }
237
237
  }
238
- `,{blogCategoryCollection:y}=await m.graphqlQuery(f,{...i});return new b({page:s,total:y.total,size:n,items:y.items})},Ce=async({id:t,slug:e,marketCode:r,locale:a})=>{const s=[],n={},o=[];if(t)s.push("$id: String!"),n.id=t,o.push("{ sys: { id: $id } }");else if(e)s.push("$slug: String!"),n.slug=e,o.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");r&&(s.push("$marketCode: String!"),n.marketCode=r,o.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),a&&(s.push("$locale: String!"),n.locale=a,o.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const i=`(${s.join(", ")})`,l=`(
238
+ `,{blogCategoryCollection:m}=await p.graphqlQuery(g,{...s});return new $({page:o,total:m.total,size:e,items:m.items})},z=async({id:c,slug:l,marketCode:a,locale:r})=>{const o=[],e={},t=[];if(c)o.push("$id: String!"),e.id=c,t.push("{ sys: { id: $id } }");else if(l)o.push("$slug: String!"),e.slug=l,t.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");a&&(o.push("$marketCode: String!"),e.marketCode=a,t.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),r&&(o.push("$locale: String!"),e.locale=r,t.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const s=`(${o.join(", ")})`,i=`(
239
239
  limit: 1
240
240
  where: {
241
241
  AND: [
242
- ${o.join(`
242
+ ${t.join(`
243
243
  `)}
244
244
  ]
245
245
  }
246
- )`,c=`
247
- query${i} {
248
- blogCategoryCollection${l} {
246
+ )`,n=`
247
+ query${s} {
248
+ blogCategoryCollection${i} {
249
249
  items {
250
250
  sys {
251
251
  id
@@ -268,17 +268,17 @@ query${i} {
268
268
  }
269
269
  }
270
270
  }
271
- `,{blogCategoryCollection:u}=await m.graphqlQuery(c,{...n}),g=u.items.at(0);if(!g)throw new w;return g},ve=async({marketCode:t,locale:e,page:r=1,size:a=20}={})=>{const s=Math.max(1,Math.floor(r)),n=Math.max(1,Math.floor(a)),o=["$limit: Int!","$skip: Int!"],i={limit:n,skip:(s-1)*n},l=["limit: $limit","skip: $skip"],c=[];t&&(o.push("$marketCode: String!"),i.marketCode=t,c.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),e&&(o.push("$locale: String!"),i.locale=e,c.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")),c.length&&l.push(`where: {
271
+ `,{blogCategoryCollection:u}=await p.graphqlQuery(n,{...e}),h=u.items.at(0);if(!h)throw new y;return h},M=async({marketCode:c,locale:l,page:a=1,size:r=20}={})=>{const o=Math.max(1,Math.floor(a)),e=Math.max(1,Math.floor(r)),t=["$limit: Int!","$skip: Int!"],s={limit:e,skip:(o-1)*e},i=["limit: $limit","skip: $skip"],n=[];c&&(t.push("$marketCode: String!"),s.marketCode=c,n.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),l&&(t.push("$locale: String!"),s.locale=l,n.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")),n.length&&i.push(`where: {
272
272
  AND: [
273
- ${c.join(`
273
+ ${n.join(`
274
274
  `)}
275
275
  ]
276
- }`);const u=o.length?`(${o.join(", ")})`:"",g=l.length?`(
277
- ${l.join(`
276
+ }`);const u=t.length?`(${t.join(", ")})`:"",h=i.length?`(
277
+ ${i.join(`
278
278
  `)}
279
- )`:"",f=`
279
+ )`:"",g=`
280
280
  query${u} {
281
- blogCollectionCollection${g} {
281
+ blogCollectionCollection${h} {
282
282
  total
283
283
  items {
284
284
  name
@@ -303,20 +303,20 @@ query${u} {
303
303
  }
304
304
  }
305
305
  }
306
- `,{blogCollectionCollection:y}=await m.graphqlQuery(f,{...i});return new b({page:s,total:y.total,size:n,items:y.items.map(h=>({...h,category:h.type==="category"?h.category:null,categoryId:h.type==="category"?h.category?.sys.id??null:null,collectionId:h.type==="manual"?h.sys.id:null}))})},Se=async({page:t=1,size:e=20,marketCode:r,locale:a}={})=>{const s=Math.max(1,Math.floor(t)),n=Math.max(1,Math.floor(e)),o=["$limit: Int!","$skip: Int!"],i={limit:n,skip:(s-1)*n},l=[];r&&(o.push("$marketCode: String!"),i.marketCode=r,l.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),a&&(o.push("$locale: String!"),i.locale=a,l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const c=`(${o.join(", ")})`,u=l.length?`(
306
+ `,{blogCollectionCollection:m}=await p.graphqlQuery(g,{...s});return new $({page:o,total:m.total,size:e,items:m.items.map(d=>({...d,category:d.type==="category"?d.category:null,categoryId:d.type==="category"?d.category?.sys.id??null:null,collectionId:d.type==="manual"?d.sys.id:null}))})},j=async({page:c=1,size:l=20,marketCode:a,locale:r}={})=>{const o=Math.max(1,Math.floor(c)),e=Math.max(1,Math.floor(l)),t=["$limit: Int!","$skip: Int!"],s={limit:e,skip:(o-1)*e},i=[];a&&(t.push("$marketCode: String!"),s.marketCode=a,i.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),r&&(t.push("$locale: String!"),s.locale=r,i.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const n=`(${t.join(", ")})`,u=i.length?`(
307
307
  limit: $limit
308
308
  skip: $skip
309
309
  where: {
310
310
  AND: [
311
- ${l.join(`
311
+ ${i.join(`
312
312
  `)}
313
313
  ]
314
314
  }
315
315
  )`:`(
316
316
  limit: $limit
317
317
  skip: $skip
318
- )`,g=`
319
- query${c} {
318
+ )`,h=`
319
+ query${n} {
320
320
  brandCollectionCollection${u} {
321
321
  total
322
322
  items {
@@ -351,17 +351,17 @@ query${c} {
351
351
  }
352
352
  }
353
353
  }
354
- `,{brandCollectionCollection:f}=await m.graphqlQuery(g,{...i});return new b({page:s,total:f.total,size:n,items:f.items})},ke=async({marketCode:t,locale:e,page:r=1,size:a=20}={})=>{const s=Math.max(1,Math.floor(r)),n=Math.max(1,Math.floor(a)),o=["$limit: Int!","$skip: Int!"],i={limit:n,skip:(s-1)*n},l=["limit: $limit","skip: $skip"],c=[];t&&(o.push("$marketCode: String!"),i.marketCode=t,c.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),e&&(o.push("$locale: String!"),i.locale=e,c.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")),c.length&&l.push(`where: {
354
+ `,{brandCollectionCollection:g}=await p.graphqlQuery(h,{...s});return new $({page:o,total:g.total,size:e,items:g.items})},R=async({marketCode:c,locale:l,page:a=1,size:r=20}={})=>{const o=Math.max(1,Math.floor(a)),e=Math.max(1,Math.floor(r)),t=["$limit: Int!","$skip: Int!"],s={limit:e,skip:(o-1)*e},i=["limit: $limit","skip: $skip"],n=[];c&&(t.push("$marketCode: String!"),s.marketCode=c,n.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),l&&(t.push("$locale: String!"),s.locale=l,n.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")),n.length&&i.push(`where: {
355
355
  AND: [
356
- ${c.join(`
356
+ ${n.join(`
357
357
  `)}
358
358
  ]
359
- }`);const u=o.length?`(${o.join(", ")})`:"",g=l.length?`(
360
- ${l.join(`
359
+ }`);const u=t.length?`(${t.join(", ")})`:"",h=i.length?`(
360
+ ${i.join(`
361
361
  `)}
362
- )`:"",f=`
362
+ )`:"",g=`
363
363
  query${u} {
364
- documentationCategoryCollection${g} {
364
+ documentationCategoryCollection${h} {
365
365
  total
366
366
  items {
367
367
  sys {
@@ -382,17 +382,17 @@ query${u} {
382
382
  }
383
383
  }
384
384
  }
385
- `,{documentationCategoryCollection:y}=await m.graphqlQuery(f,{...i});return new b({page:s,total:y.total,size:n,items:y.items})},Ae=async({id:t,slug:e,marketCode:r,locale:a})=>{const s=[],n={},o=[];if(t)s.push("$id: String!"),n.id=t,o.push("{ sys: { id: $id } }");else if(e)s.push("$slug: String!"),n.slug=e,o.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");r&&(s.push("$marketCode: String!"),n.marketCode=r,o.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),a&&(s.push("$locale: String!"),n.locale=a,o.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const i=`(${s.join(", ")})`,l=`(
385
+ `,{documentationCategoryCollection:m}=await p.graphqlQuery(g,{...s});return new $({page:o,total:m.total,size:e,items:m.items})},I=async({id:c,slug:l,marketCode:a,locale:r})=>{const o=[],e={},t=[];if(c)o.push("$id: String!"),e.id=c,t.push("{ sys: { id: $id } }");else if(l)o.push("$slug: String!"),e.slug=l,t.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");a&&(o.push("$marketCode: String!"),e.marketCode=a,t.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),r&&(o.push("$locale: String!"),e.locale=r,t.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const s=`(${o.join(", ")})`,i=`(
386
386
  limit: 1
387
387
  where: {
388
388
  AND: [
389
- ${o.join(`
389
+ ${t.join(`
390
390
  `)}
391
391
  ]
392
392
  }
393
- )`,c=`
394
- query${i} {
395
- documentationCategoryCollection${l} {
393
+ )`,n=`
394
+ query${s} {
395
+ documentationCategoryCollection${i} {
396
396
  items {
397
397
  sys {
398
398
  id
@@ -412,17 +412,17 @@ query${i} {
412
412
  }
413
413
  }
414
414
  }
415
- `,{documentationCategoryCollection:u}=await m.graphqlQuery(c,{...n}),g=u.items.at(0);if(!g)throw new w;return g},Oe=async({marketCode:t,locale:e,categorySlug:r,page:a=1,size:s=20}={})=>{const n=Math.max(1,Math.floor(a)),o=Math.max(1,Math.floor(s)),i=["$limit: Int!","$skip: Int!"],l={limit:o,skip:(n-1)*o},c=["limit: $limit","skip: $skip"],u=[];t&&(i.push("$marketCode: String!"),l.marketCode=t,u.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),e&&(i.push("$locale: String!"),l.locale=e,u.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")),r&&(i.push("$categorySlug: String!"),l.categorySlug=r,u.push("{ category: { slug: $categorySlug } }")),u.length&&c.push(`where: {
415
+ `,{documentationCategoryCollection:u}=await p.graphqlQuery(n,{...e}),h=u.items.at(0);if(!h)throw new y;return h},_=async({marketCode:c,locale:l,categorySlug:a,page:r=1,size:o=20}={})=>{const e=Math.max(1,Math.floor(r)),t=Math.max(1,Math.floor(o)),s=["$limit: Int!","$skip: Int!"],i={limit:t,skip:(e-1)*t},n=["limit: $limit","skip: $skip"],u=[];c&&(s.push("$marketCode: String!"),i.marketCode=c,u.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),l&&(s.push("$locale: String!"),i.locale=l,u.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")),a&&(s.push("$categorySlug: String!"),i.categorySlug=a,u.push("{ category: { slug: $categorySlug } }")),u.length&&n.push(`where: {
416
416
  AND: [
417
417
  ${u.join(`
418
418
  `)}
419
419
  ]
420
- }`);const g=i.length?`(${i.join(", ")})`:"",f=c.length?`(
421
- ${c.join(`
420
+ }`);const h=s.length?`(${s.join(", ")})`:"",g=n.length?`(
421
+ ${n.join(`
422
422
  `)}
423
- )`:"",y=`
424
- query${g} {
425
- documentationArticleCollection${f} {
423
+ )`:"",m=`
424
+ query${h} {
425
+ documentationArticleCollection${g} {
426
426
  total
427
427
  items {
428
428
  sys {
@@ -450,17 +450,17 @@ query${g} {
450
450
  }
451
451
  }
452
452
  }
453
- `,{documentationArticleCollection:h}=await m.graphqlQuery(y,{...l});return new b({page:n,total:h.total,size:o,items:h.items})},je=async({id:t,slug:e,marketCode:r,locale:a})=>{const s=[],n={},o=[];if(t)s.push("$id: String!"),n.id=t,o.push("{ sys: { id: $id } }");else if(e)s.push("$slug: String!"),n.slug=e,o.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");r&&(s.push("$marketCode: String!"),n.marketCode=r,o.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),a&&(s.push("$locale: String!"),n.locale=a,o.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const i=`(${s.join(", ")})`,l=`(
453
+ `,{documentationArticleCollection:d}=await p.graphqlQuery(m,{...i});return new $({page:e,total:d.total,size:t,items:d.items})},O=async({id:c,slug:l,marketCode:a,locale:r})=>{const o=[],e={},t=[];if(c)o.push("$id: String!"),e.id=c,t.push("{ sys: { id: $id } }");else if(l)o.push("$slug: String!"),e.slug=l,t.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");a&&(o.push("$marketCode: String!"),e.marketCode=a,t.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),r&&(o.push("$locale: String!"),e.locale=r,t.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const s=`(${o.join(", ")})`,i=`(
454
454
  limit: 1
455
455
  where: {
456
456
  AND: [
457
- ${o.join(`
457
+ ${t.join(`
458
458
  `)}
459
459
  ]
460
460
  }
461
- )`,c=`
462
- query${i} {
463
- documentationArticleCollection${l} {
461
+ )`,n=`
462
+ query${s} {
463
+ documentationArticleCollection${i} {
464
464
  items {
465
465
  sys {
466
466
  id
@@ -511,13 +511,13 @@ query${i} {
511
511
  }
512
512
  }
513
513
  }
514
- `,{documentationArticleCollection:u}=await m.graphqlQuery(c,{...n}),g=u.items.at(0);if(!g)throw new w;return g},Te=async({page:t=1,size:e=20,marketCode:r,locale:a}={})=>{const s=Math.max(1,Math.floor(t)),n=Math.max(1,Math.floor(e)),o=["$limit: Int!","$skip: Int!"],i={limit:n,skip:(s-1)*n},l=[];r&&(o.push("$marketCode: String!"),i.marketCode=r,l.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),a&&(o.push("$locale: String!"),i.locale=a,l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const c=o.length?`(${o.join(", ")})`:"",u=l.length?`(
514
+ `,{documentationArticleCollection:u}=await p.graphqlQuery(n,{...e}),h=u.items.at(0);if(!h)throw new y;return h},P=async({page:c=1,size:l=20,marketCode:a,locale:r}={})=>{const o=Math.max(1,Math.floor(c)),e=Math.max(1,Math.floor(l)),t=["$limit: Int!","$skip: Int!"],s={limit:e,skip:(o-1)*e},i=[];a&&(t.push("$marketCode: String!"),s.marketCode=a,i.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),r&&(t.push("$locale: String!"),s.locale=r,i.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const n=t.length?`(${t.join(", ")})`:"",u=i.length?`(
515
515
  limit: $limit
516
516
  skip: $skip
517
517
  order: order_ASC
518
518
  where: {
519
519
  AND: [
520
- ${l.join(`
520
+ ${i.join(`
521
521
  `)}
522
522
  ]
523
523
  }
@@ -525,8 +525,8 @@ query${i} {
525
525
  limit: $limit
526
526
  skip: $skip
527
527
  order: order_ASC
528
- )`,g=`
529
- query${c} {
528
+ )`,h=`
529
+ query${n} {
530
530
  hyperlinkCollectionCollection${u} {
531
531
  total
532
532
  items {
@@ -550,20 +550,20 @@ query${c} {
550
550
  }
551
551
  }
552
552
  }
553
- `,{hyperlinkCollectionCollection:f}=await m.graphqlQuery(g,{...i});return new b({page:s,total:f.total,size:n,items:f.items})},qe=async({page:t=1,size:e=20,marketCode:r,locale:a}={})=>{const s=Math.max(1,Math.floor(t)),n=Math.max(1,Math.floor(e)),o=["$limit: Int!","$skip: Int!"],i={limit:n,skip:(s-1)*n},l=[];r&&(o.push("$marketCode: String!"),i.marketCode=r,l.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),a&&(o.push("$locale: String!"),i.locale=a,l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const c=`(${o.join(", ")})`,u=l.length?`(
553
+ `,{hyperlinkCollectionCollection:g}=await p.graphqlQuery(h,{...s});return new $({page:o,total:g.total,size:e,items:g.items})},T=async({page:c=1,size:l=20,marketCode:a,locale:r}={})=>{const o=Math.max(1,Math.floor(c)),e=Math.max(1,Math.floor(l)),t=["$limit: Int!","$skip: Int!"],s={limit:e,skip:(o-1)*e},i=[];a&&(t.push("$marketCode: String!"),s.marketCode=a,i.push("{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }")),r&&(t.push("$locale: String!"),s.locale=r,i.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));const n=`(${t.join(", ")})`,u=i.length?`(
554
554
  limit: $limit
555
555
  skip: $skip
556
556
  where: {
557
557
  AND: [
558
- ${l.join(`
558
+ ${i.join(`
559
559
  `)}
560
560
  ]
561
561
  }
562
562
  )`:`(
563
563
  limit: $limit
564
564
  skip: $skip
565
- )`,g=`
566
- query${c} {
565
+ )`,h=`
566
+ query${n} {
567
567
  keywordCollectionCollection${u} {
568
568
  total
569
569
  items {
@@ -576,4 +576,4 @@ query${c} {
576
576
  }
577
577
  }
578
578
  }
579
- `,{keywordCollectionCollection:f}=await m.graphqlQuery(g,{...i});return new b({page:s,total:f.total,size:n,items:f.items})};exports.ContentfulSDK=m;exports.PaginatedResponse=b;exports.getBannerCollections=de;exports.getBlogCategories=we;exports.getBlogCategoryDetail=Ce;exports.getBlogCollections=ve;exports.getBlogPostDetail=$e;exports.getBlogPosts=be;exports.getBrandCollections=Se;exports.getDocArticleDetail=je;exports.getDocArticles=Oe;exports.getDocCategories=ke;exports.getDocCategoryDetail=Ae;exports.getHyperlinkCollections=Te;exports.getKeywordCollections=qe;
579
+ `,{keywordCollectionCollection:g}=await p.graphqlQuery(h,{...s});return new $({page:o,total:g.total,size:e,items:g.items})};exports.ContentfulSDK=p;exports.PaginatedResponse=$;exports.getBannerCollections=q;exports.getBlogCategories=x;exports.getBlogCategoryDetail=z;exports.getBlogCollections=M;exports.getBlogPostDetail=D;exports.getBlogPosts=S;exports.getBrandCollections=j;exports.getDocArticleDetail=O;exports.getDocArticles=_;exports.getDocCategories=R;exports.getDocCategoryDetail=I;exports.getHyperlinkCollections=P;exports.getKeywordCollections=T;