@janbox/contentful-marketplace-sdk 1.0.12 → 1.0.13

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.
@@ -2,6 +2,9 @@ import { TypeBlogCollectionSkeleton, GraphQLAsset } from '../types';
2
2
  import { Entry } from 'contentful';
3
3
  type BlogCollectionEntry = Entry<TypeBlogCollectionSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>;
4
4
  type BlogCollectionCategoryGraphQLItem = {
5
+ sys: {
6
+ id: string;
7
+ };
5
8
  title: string;
6
9
  slug: string;
7
10
  };
@@ -15,11 +15,11 @@ type BlogPostCategoryGraphQLItem = {
15
15
  export type BlogPostGraphQLItem = {
16
16
  sys: GraphQLEntrySys;
17
17
  featuredImage: GraphQLAsset | null;
18
- } & Pick<BlogPostEntry["fields"], "title" | "shortDescription" | "slug">;
19
- export interface BlogPostDetailGraphQLItem extends BlogPostGraphQLItem {
20
18
  categoriesCollection: {
21
19
  items: BlogPostCategoryGraphQLItem[];
22
20
  } | null;
21
+ } & Pick<BlogPostEntry["fields"], "title" | "shortDescription" | "slug">;
22
+ export interface BlogPostDetailGraphQLItem extends BlogPostGraphQLItem {
23
23
  author: {
24
24
  name: string;
25
25
  avatar: GraphQLAsset | null;
package/dist/index.cjs CHANGED
@@ -60,6 +60,12 @@ query($collectionId: String!, $limit: Int!, $skip: Int!) {
60
60
  title
61
61
  shortDescription
62
62
  slug
63
+ categoriesCollection {
64
+ items {
65
+ title
66
+ slug
67
+ }
68
+ }
63
69
  featuredImage {
64
70
  url
65
71
  width
@@ -92,6 +98,12 @@ query${g} {
92
98
  title
93
99
  shortDescription
94
100
  slug
101
+ categoriesCollection {
102
+ items {
103
+ title
104
+ slug
105
+ }
106
+ }
95
107
  featuredImage {
96
108
  url
97
109
  width
@@ -248,6 +260,9 @@ query${u} {
248
260
  id
249
261
  }
250
262
  category {
263
+ sys {
264
+ id
265
+ }
251
266
  title
252
267
  slug
253
268
  }
package/dist/index.js CHANGED
@@ -54,17 +54,17 @@ function Mt(t) {
54
54
  }
55
55
  var zt = ft ? Mt : lt;
56
56
  function S(t, e, r) {
57
- for (var a = zt(t), s = 0, i = a.length, o = void 0, n = void 0; s < i; ++s)
58
- if (o = a[s], !(o === "callee" || o === "caller")) {
59
- if (n = It(t, o), !n) {
60
- e[o] = r.copier(t[o], r);
57
+ for (var a = zt(t), s = 0, n = a.length, i = void 0, o = void 0; s < n; ++s)
58
+ if (i = a[s], !(i === "callee" || i === "caller")) {
59
+ if (o = It(t, i), !o) {
60
+ e[i] = r.copier(t[i], r);
61
61
  continue;
62
62
  }
63
- !n.get && !n.set && (n.value = r.copier(n.value, r));
63
+ !o.get && !o.set && (o.value = r.copier(o.value, r));
64
64
  try {
65
- Rt(e, o, n);
65
+ Rt(e, i, o);
66
66
  } catch {
67
- e[o] = n.value;
67
+ e[i] = o.value;
68
68
  }
69
69
  }
70
70
  return e;
@@ -113,8 +113,8 @@ function Gt(t, e) {
113
113
  e.cache.set(t, r);
114
114
  for (var a in t)
115
115
  ut.call(t, a) && (r[a] = e.copier(t[a], e));
116
- for (var s = Q(t), i = 0, o = s.length, n = void 0; i < o; ++i)
117
- n = s[i], Dt.call(t, n) && (r[n] = e.copier(t[n], e));
116
+ for (var s = Q(t), n = 0, i = s.length, o = void 0; n < i; ++n)
117
+ o = s[n], Dt.call(t, o) && (r[o] = e.copier(t[o], e));
118
118
  return r;
119
119
  }
120
120
  var Ut = ft ? Gt : Ft;
@@ -193,23 +193,23 @@ function Zt(t) {
193
193
  }
194
194
  function yt(t) {
195
195
  var e = F({}, mt, t), r = Zt(e), a = r.Array, s = r.Object;
196
- function i(o, n) {
197
- if (n.prototype = n.Constructor = void 0, !o || typeof o != "object")
198
- return o;
199
- if (n.cache.has(o))
200
- return n.cache.get(o);
201
- if (n.prototype = Yt(o), n.Constructor = n.prototype && n.prototype.constructor, !n.Constructor || n.Constructor === Object)
202
- return s(o, n);
203
- if (Ht(o))
204
- return a(o, n);
205
- var l = r[xt(o)];
206
- return l ? l(o, n) : typeof o.then == "function" ? o : s(o, n);
196
+ function n(i, o) {
197
+ if (o.prototype = o.Constructor = void 0, !i || typeof i != "object")
198
+ return i;
199
+ if (o.cache.has(i))
200
+ return o.cache.get(i);
201
+ if (o.prototype = Yt(i), o.Constructor = o.prototype && o.prototype.constructor, !o.Constructor || o.Constructor === Object)
202
+ return s(i, o);
203
+ if (Ht(i))
204
+ return a(i, o);
205
+ var l = r[xt(i)];
206
+ return l ? l(i, o) : typeof i.then == "function" ? i : s(i, o);
207
207
  }
208
- return function(n) {
209
- return i(n, {
208
+ return function(o) {
209
+ return n(o, {
210
210
  Constructor: void 0,
211
211
  cache: jt(),
212
- copier: i,
212
+ copier: n,
213
213
  prototype: void 0
214
214
  });
215
215
  };
@@ -219,7 +219,7 @@ function te(t) {
219
219
  }
220
220
  te({});
221
221
  yt({});
222
- var w = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, j = { exports: {} }, G;
222
+ var C = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, j = { exports: {} }, G;
223
223
  function ee() {
224
224
  if (G) return j.exports;
225
225
  G = 1;
@@ -242,7 +242,7 @@ function ee() {
242
242
  r = s;
243
243
  }
244
244
  })();
245
- function i(p) {
245
+ function n(p) {
246
246
  if (e === setTimeout)
247
247
  return setTimeout(p, 0);
248
248
  if ((e === a || !e) && setTimeout)
@@ -257,7 +257,7 @@ function ee() {
257
257
  }
258
258
  }
259
259
  }
260
- function o(p) {
260
+ function i(p) {
261
261
  if (r === clearTimeout)
262
262
  return clearTimeout(p);
263
263
  if ((r === s || !r) && clearTimeout)
@@ -272,20 +272,20 @@ function ee() {
272
272
  }
273
273
  }
274
274
  }
275
- var n = [], l = !1, c, u = -1;
275
+ var o = [], l = !1, c, u = -1;
276
276
  function f() {
277
- !l || !c || (l = !1, c.length ? n = c.concat(n) : u = -1, n.length && g());
277
+ !l || !c || (l = !1, c.length ? o = c.concat(o) : u = -1, o.length && g());
278
278
  }
279
279
  function g() {
280
280
  if (!l) {
281
- var p = i(f);
281
+ var p = n(f);
282
282
  l = !0;
283
- for (var d = n.length; d; ) {
284
- for (c = n, n = []; ++u < d; )
283
+ for (var d = o.length; d; ) {
284
+ for (c = o, o = []; ++u < d; )
285
285
  c && c[u].run();
286
- u = -1, d = n.length;
286
+ u = -1, d = o.length;
287
287
  }
288
- c = null, l = !1, o(p);
288
+ c = null, l = !1, i(p);
289
289
  }
290
290
  }
291
291
  t.nextTick = function(p) {
@@ -293,7 +293,7 @@ function ee() {
293
293
  if (arguments.length > 1)
294
294
  for (var b = 1; b < arguments.length; b++)
295
295
  d[b - 1] = arguments[b];
296
- n.push(new h(p, d)), n.length === 1 && !l && i(g);
296
+ o.push(new h(p, d)), o.length === 1 && !l && n(g);
297
297
  };
298
298
  function h(p, d) {
299
299
  this.fun = p, this.array = d;
@@ -320,11 +320,11 @@ var q, U;
320
320
  function re() {
321
321
  if (U) return q;
322
322
  U = 1;
323
- var t = typeof w == "object" && w && w.Object === Object && w;
323
+ var t = typeof C == "object" && C && C.Object === Object && C;
324
324
  return q = t, q;
325
325
  }
326
326
  var T, K;
327
- function oe() {
327
+ function ie() {
328
328
  if (K) return T;
329
329
  K = 1;
330
330
  var t = re(), e = typeof self == "object" && self && self.Object === Object && self, r = t || e || Function("return this")();
@@ -334,28 +334,28 @@ var _, W;
334
334
  function dt() {
335
335
  if (W) return _;
336
336
  W = 1;
337
- var t = oe(), e = t.Symbol;
337
+ var t = ie(), e = t.Symbol;
338
338
  return _ = e, _;
339
339
  }
340
340
  var P, J;
341
- function ne() {
341
+ function oe() {
342
342
  if (J) return P;
343
343
  J = 1;
344
344
  var t = dt(), e = Object.prototype, r = e.hasOwnProperty, a = e.toString, s = t ? t.toStringTag : void 0;
345
- function i(o) {
346
- var n = r.call(o, s), l = o[s];
345
+ function n(i) {
346
+ var o = r.call(i, s), l = i[s];
347
347
  try {
348
- o[s] = void 0;
348
+ i[s] = void 0;
349
349
  var c = !0;
350
350
  } catch {
351
351
  }
352
- var u = a.call(o);
353
- return c && (n ? o[s] = l : delete o[s]), u;
352
+ var u = a.call(i);
353
+ return c && (o ? i[s] = l : delete i[s]), u;
354
354
  }
355
- return P = i, P;
355
+ return P = n, P;
356
356
  }
357
357
  var x, H;
358
- function ie() {
358
+ function ne() {
359
359
  if (H) return x;
360
360
  H = 1;
361
361
  var t = Object.prototype, e = t.toString;
@@ -368,11 +368,11 @@ var R, Y;
368
368
  function bt() {
369
369
  if (Y) return R;
370
370
  Y = 1;
371
- var t = dt(), e = ne(), r = ie(), a = "[object Null]", s = "[object Undefined]", i = t ? t.toStringTag : void 0;
372
- function o(n) {
373
- return n == null ? n === void 0 ? s : a : i && i in Object(n) ? e(n) : r(n);
371
+ var t = dt(), e = oe(), r = ne(), a = "[object Null]", s = "[object Undefined]", n = t ? t.toStringTag : void 0;
372
+ function i(o) {
373
+ return o == null ? o === void 0 ? s : a : n && n in Object(o) ? e(o) : r(o);
374
374
  }
375
- return R = o, R;
375
+ return R = i, R;
376
376
  }
377
377
  var I, X;
378
378
  function se() {
@@ -395,8 +395,8 @@ function ae() {
395
395
  if (tt) return M;
396
396
  tt = 1;
397
397
  var t = bt(), e = se(), r = $t(), a = "[object String]";
398
- function s(i) {
399
- return typeof i == "string" || !e(i) && r(i) && t(i) == a;
398
+ function s(n) {
399
+ return typeof n == "string" || !e(n) && r(n) && t(n) == a;
400
400
  }
401
401
  return M = s, M;
402
402
  }
@@ -419,49 +419,49 @@ function ce() {
419
419
  var t = le(), e = t(Object.getPrototypeOf, Object);
420
420
  return E = e, E;
421
421
  }
422
- var L, ot;
422
+ var L, it;
423
423
  function ue() {
424
- if (ot) return L;
425
- ot = 1;
426
- var t = bt(), e = ce(), r = $t(), a = "[object Object]", s = Function.prototype, i = Object.prototype, o = s.toString, n = i.hasOwnProperty, l = o.call(Object);
424
+ if (it) return L;
425
+ it = 1;
426
+ var t = bt(), e = ce(), r = $t(), a = "[object Object]", s = Function.prototype, n = Object.prototype, i = s.toString, o = n.hasOwnProperty, l = i.call(Object);
427
427
  function c(u) {
428
428
  if (!r(u) || t(u) != a)
429
429
  return !1;
430
430
  var f = e(u);
431
431
  if (f === null)
432
432
  return !0;
433
- var g = n.call(f, "constructor") && f.constructor;
434
- return typeof g == "function" && g instanceof g && o.call(g) == l;
433
+ var g = o.call(f, "constructor") && f.constructor;
434
+ return typeof g == "function" && g instanceof g && i.call(g) == l;
435
435
  }
436
436
  return L = c, L;
437
437
  }
438
438
  ue();
439
- var wt = { 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 }, Ct = { 0: 8203, 1: 8204, 2: 8205, 3: 65279 };
440
- new Array(4).fill(String.fromCodePoint(Ct[0])).join("");
441
- Object.fromEntries(Object.entries(Ct).map((t) => t.reverse()));
439
+ 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 }, wt = { 0: 8203, 1: 8204, 2: 8205, 3: 65279 };
440
+ new Array(4).fill(String.fromCodePoint(wt[0])).join("");
442
441
  Object.fromEntries(Object.entries(wt).map((t) => t.reverse()));
443
- `${Object.values(wt).map((t) => `\\u{${t.toString(16)}}`).join("")}`;
444
- var V, nt;
442
+ Object.fromEntries(Object.entries(Ct).map((t) => t.reverse()));
443
+ `${Object.values(Ct).map((t) => `\\u{${t.toString(16)}}`).join("")}`;
444
+ var V, ot;
445
445
  function fe() {
446
- if (nt) return V;
447
- nt = 1;
446
+ if (ot) return V;
447
+ ot = 1;
448
448
  var t = Object.prototype.hasOwnProperty, e = Object.prototype.toString;
449
449
  return V = function(r, a, s) {
450
450
  if (e.call(a) !== "[object Function]")
451
451
  throw new TypeError("iterator must be a function");
452
- var i = r.length;
453
- if (i === +i)
454
- for (var o = 0; o < i; o++)
455
- a.call(s, r[o], o, r);
452
+ var n = r.length;
453
+ if (n === +n)
454
+ for (var i = 0; i < n; i++)
455
+ a.call(s, r[i], i, r);
456
456
  else
457
- for (var n in r)
458
- t.call(r, n) && a.call(s, r[n], n, r);
457
+ for (var o in r)
458
+ t.call(r, o) && a.call(s, r[o], o, r);
459
459
  }, V;
460
460
  }
461
- var N, it;
461
+ var N, nt;
462
462
  function ge() {
463
- if (it) return N;
464
- it = 1;
463
+ if (nt) return N;
464
+ nt = 1;
465
465
  var t = fe();
466
466
  N = e;
467
467
  function e(r, a, s) {
@@ -469,53 +469,53 @@ function ge() {
469
469
  return e.set(r, a, s);
470
470
  if (arguments.length === 2)
471
471
  return e.get(r, a);
472
- var i = e.bind(e, r);
473
- for (var o in e)
474
- e.hasOwnProperty(o) && (i[o] = e[o].bind(i, r));
475
- return i;
472
+ var n = e.bind(e, r);
473
+ for (var i in e)
474
+ e.hasOwnProperty(i) && (n[i] = e[i].bind(n, r));
475
+ return n;
476
476
  }
477
477
  return e.get = function(r, a) {
478
- for (var s = Array.isArray(a) ? a : e.parse(a), i = 0; i < s.length; ++i) {
479
- var o = s[i];
480
- if (!(typeof r == "object" && o in r))
481
- throw new Error("Invalid reference token: " + o);
482
- r = r[o];
478
+ for (var s = Array.isArray(a) ? a : e.parse(a), n = 0; n < s.length; ++n) {
479
+ var i = s[n];
480
+ if (!(typeof r == "object" && i in r))
481
+ throw new Error("Invalid reference token: " + i);
482
+ r = r[i];
483
483
  }
484
484
  return r;
485
485
  }, e.set = function(r, a, s) {
486
- var i = Array.isArray(a) ? a : e.parse(a), o = i[0];
487
- if (i.length === 0)
486
+ var n = Array.isArray(a) ? a : e.parse(a), i = n[0];
487
+ if (n.length === 0)
488
488
  throw Error("Can not set the root object");
489
- for (var n = 0; n < i.length - 1; ++n) {
490
- var l = i[n];
491
- typeof l != "string" && typeof l != "number" && (l = String(l)), !(l === "__proto__" || l === "constructor" || l === "prototype") && (l === "-" && Array.isArray(r) && (l = r.length), o = i[n + 1], l in r || (o.match(/^(\d+|-)$/) ? r[l] = [] : r[l] = {}), r = r[l]);
489
+ for (var o = 0; o < n.length - 1; ++o) {
490
+ var l = n[o];
491
+ typeof l != "string" && typeof l != "number" && (l = String(l)), !(l === "__proto__" || l === "constructor" || l === "prototype") && (l === "-" && Array.isArray(r) && (l = r.length), i = n[o + 1], l in r || (i.match(/^(\d+|-)$/) ? r[l] = [] : r[l] = {}), r = r[l]);
492
492
  }
493
- return o === "-" && Array.isArray(r) && (o = r.length), r[o] = s, this;
493
+ return i === "-" && Array.isArray(r) && (i = r.length), r[i] = s, this;
494
494
  }, e.remove = function(r, a) {
495
- var s = Array.isArray(a) ? a : e.parse(a), i = s[s.length - 1];
496
- if (i === void 0)
495
+ var s = Array.isArray(a) ? a : e.parse(a), n = s[s.length - 1];
496
+ if (n === void 0)
497
497
  throw new Error('Invalid JSON pointer for remove: "' + a + '"');
498
- var o = e.get(r, s.slice(0, -1));
499
- if (Array.isArray(o)) {
500
- var n = +i;
501
- if (i === "" && isNaN(n))
502
- throw new Error('Invalid array index: "' + i + '"');
503
- Array.prototype.splice.call(o, n, 1);
498
+ var i = e.get(r, s.slice(0, -1));
499
+ if (Array.isArray(i)) {
500
+ var o = +n;
501
+ if (n === "" && isNaN(o))
502
+ throw new Error('Invalid array index: "' + n + '"');
503
+ Array.prototype.splice.call(i, o, 1);
504
504
  } else
505
- delete o[i];
505
+ delete i[n];
506
506
  }, e.dict = function(r, a) {
507
507
  var s = {};
508
- return e.walk(r, function(i, o) {
509
- s[o] = i;
508
+ return e.walk(r, function(n, i) {
509
+ s[i] = n;
510
510
  }, a), s;
511
511
  }, e.walk = function(r, a, s) {
512
- var i = [];
513
- s = s || function(o) {
514
- var n = Object.prototype.toString.call(o);
515
- return n === "[object Object]" || n === "[object Array]";
516
- }, (function o(n) {
517
- t(n, function(l, c) {
518
- i.push(String(c)), s(l) ? o(l) : a(l, e.compile(i)), i.pop();
512
+ var n = [];
513
+ s = s || function(i) {
514
+ var o = Object.prototype.toString.call(i);
515
+ return o === "[object Object]" || o === "[object Array]";
516
+ }, (function i(o) {
517
+ t(o, function(l, c) {
518
+ n.push(String(c)), s(l) ? i(l) : a(l, e.compile(n)), n.pop();
519
519
  });
520
520
  })(r);
521
521
  }, e.has = function(r, a) {
@@ -540,26 +540,26 @@ function ge() {
540
540
  }, N;
541
541
  }
542
542
  ge();
543
- var C = { exports: {} }, st;
543
+ var w = { exports: {} }, st;
544
544
  function pe() {
545
545
  return st || (st = 1, (function(t, e) {
546
546
  e = t.exports = r, e.getSerialize = a;
547
- function r(s, i, o, n) {
548
- return JSON.stringify(s, a(i, n), o);
547
+ function r(s, n, i, o) {
548
+ return JSON.stringify(s, a(n, o), i);
549
549
  }
550
- function a(s, i) {
551
- var o = [], n = [];
552
- return i == null && (i = function(l, c) {
553
- return o[0] === c ? "[Circular ~]" : "[Circular ~." + n.slice(0, o.indexOf(c)).join(".") + "]";
550
+ function a(s, n) {
551
+ var i = [], o = [];
552
+ return n == null && (n = function(l, c) {
553
+ return i[0] === c ? "[Circular ~]" : "[Circular ~." + o.slice(0, i.indexOf(c)).join(".") + "]";
554
554
  }), function(l, c) {
555
- if (o.length > 0) {
556
- var u = o.indexOf(this);
557
- ~u ? o.splice(u + 1) : o.push(this), ~u ? n.splice(u, 1 / 0, l) : n.push(l), ~o.indexOf(c) && (c = i.call(this, l, c));
558
- } else o.push(c);
555
+ if (i.length > 0) {
556
+ var u = i.indexOf(this);
557
+ ~u ? i.splice(u + 1) : i.push(this), ~u ? o.splice(u, 1 / 0, l) : o.push(l), ~i.indexOf(c) && (c = n.call(this, l, c));
558
+ } else i.push(c);
559
559
  return s == null ? c : s.call(this, l, c);
560
560
  };
561
561
  }
562
- })(C, C.exports)), C.exports;
562
+ })(w, w.exports)), w.exports;
563
563
  }
564
564
  pe();
565
565
  class y {
@@ -577,8 +577,8 @@ class y {
577
577
  };
578
578
  }
579
579
  static async graphqlQuery(e, r = {}) {
580
- const { space: a, accessToken: s, environment: i = "master" } = this.clientParams, o = await fetch(
581
- `https://graphql.contentful.com/content/v1/spaces/${a}/environments/${i}`,
580
+ const { space: a, accessToken: s, environment: n = "master" } = this.clientParams, i = await fetch(
581
+ `https://graphql.contentful.com/content/v1/spaces/${a}/environments/${n}`,
582
582
  {
583
583
  method: "POST",
584
584
  headers: {
@@ -588,19 +588,19 @@ class y {
588
588
  body: JSON.stringify({ query: e, variables: r })
589
589
  }
590
590
  );
591
- if (!o.ok) {
592
- const l = await o.text();
591
+ if (!i.ok) {
592
+ const l = await i.text();
593
593
  throw new Error(
594
- `GraphQL request failed: ${o.status} ${o.statusText}
594
+ `GraphQL request failed: ${i.status} ${i.statusText}
595
595
  ${l}`
596
596
  );
597
597
  }
598
- const n = await o.json();
599
- if (n.errors)
598
+ const o = await i.json();
599
+ if (o.errors)
600
600
  throw new Error(
601
- `GraphQL errors: ${JSON.stringify(n.errors, null, 2)}`
601
+ `GraphQL errors: ${JSON.stringify(o.errors, null, 2)}`
602
602
  );
603
- return n.data;
603
+ return o.data;
604
604
  }
605
605
  }
606
606
  const he = async ({
@@ -609,20 +609,20 @@ const he = async ({
609
609
  size: r = 20,
610
610
  platform: a,
611
611
  marketCode: s,
612
- locale: i
612
+ locale: n
613
613
  }) => {
614
- const o = Math.max(1, Math.floor(e)), n = Math.max(1, Math.floor(r)), l = [
614
+ const i = Math.max(1, Math.floor(e)), o = Math.max(1, Math.floor(r)), l = [
615
615
  "$slot: String!",
616
616
  "$limit: Int!",
617
617
  "$skip: Int!"
618
618
  ], c = {
619
619
  slot: t,
620
- limit: n,
621
- skip: (o - 1) * n
620
+ limit: o,
621
+ skip: (i - 1) * o
622
622
  }, u = ["{ slot: $slot }"];
623
623
  a && (l.push("$platform: String!"), c.platform = a, u.push("{ platform_contains_some: [$platform] }")), s && (l.push("$marketCode: String!"), c.marketCode = s, u.push(
624
624
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
625
- )), i && (l.push("$locale: String!"), c.locale = i, u.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
625
+ )), n && (l.push("$locale: String!"), c.locale = n, u.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
626
626
  const f = `(${l.join(", ")})`, g = `(
627
627
  limit: $limit
628
628
  skip: $skip
@@ -673,9 +673,9 @@ query${f} {
673
673
  ...c
674
674
  });
675
675
  return {
676
- page: o,
676
+ page: i,
677
677
  total: m.total,
678
- size: n,
678
+ size: o,
679
679
  items: m.items
680
680
  };
681
681
  };
@@ -693,9 +693,9 @@ const me = async ({
693
693
  collectionId: r,
694
694
  categoryId: a,
695
695
  page: s = 1,
696
- size: i = 20
696
+ size: n = 20
697
697
  } = {}) => {
698
- const o = Math.max(1, Math.floor(s)), n = Math.max(1, Math.floor(i));
698
+ const i = Math.max(1, Math.floor(s)), o = Math.max(1, Math.floor(n));
699
699
  if (r) {
700
700
  const d = `
701
701
  query($collectionId: String!, $limit: Int!, $skip: Int!) {
@@ -712,6 +712,12 @@ query($collectionId: String!, $limit: Int!, $skip: Int!) {
712
712
  title
713
713
  shortDescription
714
714
  slug
715
+ categoriesCollection {
716
+ items {
717
+ title
718
+ slug
719
+ }
720
+ }
715
721
  featuredImage {
716
722
  url
717
723
  width
@@ -725,21 +731,21 @@ query($collectionId: String!, $limit: Int!, $skip: Int!) {
725
731
  }
726
732
  `, { blogCollectionCollection: b } = await y.graphqlQuery(d, {
727
733
  collectionId: r,
728
- limit: n,
729
- skip: (o - 1) * n
734
+ limit: o,
735
+ skip: (i - 1) * o
730
736
  }), k = b.items.at(0);
731
737
  if (!k)
732
738
  throw new $();
733
739
  return {
734
- page: o,
740
+ page: i,
735
741
  total: k.postsCollection?.total ?? 0,
736
- size: n,
742
+ size: o,
737
743
  items: k.postsCollection?.items ?? []
738
744
  };
739
745
  }
740
746
  const l = ["$limit: Int!", "$skip: Int!"], c = {
741
- limit: n,
742
- skip: (o - 1) * n
747
+ limit: o,
748
+ skip: (i - 1) * o
743
749
  }, u = ["limit: $limit", "skip: $skip"], f = [];
744
750
  t && (l.push("$marketCode: String!"), c.marketCode = t, f.push(
745
751
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
@@ -765,6 +771,12 @@ query${g} {
765
771
  title
766
772
  shortDescription
767
773
  slug
774
+ categoriesCollection {
775
+ items {
776
+ title
777
+ slug
778
+ }
779
+ }
768
780
  featuredImage {
769
781
  url
770
782
  width
@@ -778,9 +790,9 @@ query${g} {
778
790
  ...c
779
791
  });
780
792
  return {
781
- page: o,
793
+ page: i,
782
794
  total: p.total,
783
- size: n,
795
+ size: o,
784
796
  items: p.items
785
797
  };
786
798
  }, ye = async ({
@@ -789,26 +801,26 @@ query${g} {
789
801
  marketCode: r,
790
802
  locale: a
791
803
  }) => {
792
- const s = [], i = {}, o = [];
804
+ const s = [], n = {}, i = [];
793
805
  if (t)
794
- s.push("$id: String!"), i.id = t, o.push("{ sys: { id: $id } }");
806
+ s.push("$id: String!"), n.id = t, i.push("{ sys: { id: $id } }");
795
807
  else if (e)
796
- s.push("$slug: String!"), i.slug = e, o.push("{ slug: $slug }");
808
+ s.push("$slug: String!"), n.slug = e, i.push("{ slug: $slug }");
797
809
  else
798
810
  throw new Error("Either id or slug is required.");
799
- r && (s.push("$marketCode: String!"), i.marketCode = r, o.push(
811
+ r && (s.push("$marketCode: String!"), n.marketCode = r, i.push(
800
812
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
801
- )), a && (s.push("$locale: String!"), i.locale = a, o.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
802
- const n = `(${s.join(", ")})`, l = `(
813
+ )), a && (s.push("$locale: String!"), n.locale = a, i.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
814
+ const o = `(${s.join(", ")})`, l = `(
803
815
  limit: 1
804
816
  where: {
805
817
  AND: [
806
- ${o.join(`
818
+ ${i.join(`
807
819
  `)}
808
820
  ]
809
821
  }
810
822
  )`, c = `
811
- query${n} {
823
+ query${o} {
812
824
  blogPostCollection${l} {
813
825
  items {
814
826
  sys {
@@ -868,7 +880,7 @@ query${n} {
868
880
  }
869
881
  }
870
882
  `, { blogPostCollection: u } = await y.graphqlQuery(c, {
871
- ...i
883
+ ...n
872
884
  }), f = u.items.at(0);
873
885
  if (!f)
874
886
  throw new $();
@@ -879,19 +891,19 @@ query${n} {
879
891
  page: r = 1,
880
892
  size: a = 20
881
893
  } = {}) => {
882
- const s = Math.max(1, Math.floor(r)), i = Math.max(1, Math.floor(a)), o = ["$limit: Int!", "$skip: Int!"], n = {
883
- limit: i,
884
- skip: (s - 1) * i
894
+ const s = Math.max(1, Math.floor(r)), n = Math.max(1, Math.floor(a)), i = ["$limit: Int!", "$skip: Int!"], o = {
895
+ limit: n,
896
+ skip: (s - 1) * n
885
897
  }, l = ["limit: $limit", "skip: $skip"], c = [];
886
- t && (o.push("$marketCode: String!"), n.marketCode = t, c.push(
898
+ t && (i.push("$marketCode: String!"), o.marketCode = t, c.push(
887
899
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
888
- )), e && (o.push("$locale: String!"), n.locale = e, c.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")), c.length && l.push(`where: {
900
+ )), e && (i.push("$locale: String!"), o.locale = e, c.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")), c.length && l.push(`where: {
889
901
  AND: [
890
902
  ${c.join(`
891
903
  `)}
892
904
  ]
893
905
  }`);
894
- const u = o.length ? `(${o.join(", ")})` : "", f = l.length ? `(
906
+ const u = i.length ? `(${i.join(", ")})` : "", f = l.length ? `(
895
907
  ${l.join(`
896
908
  `)}
897
909
  )` : "", g = `
@@ -908,12 +920,12 @@ query${u} {
908
920
  }
909
921
  }
910
922
  `, { blogCategoryCollection: h } = await y.graphqlQuery(g, {
911
- ...n
923
+ ...o
912
924
  });
913
925
  return {
914
926
  page: s,
915
927
  total: h.total,
916
- size: i,
928
+ size: n,
917
929
  items: h.items
918
930
  };
919
931
  }, be = async ({
@@ -922,26 +934,26 @@ query${u} {
922
934
  marketCode: r,
923
935
  locale: a
924
936
  }) => {
925
- const s = [], i = {}, o = [];
937
+ const s = [], n = {}, i = [];
926
938
  if (t)
927
- s.push("$id: String!"), i.id = t, o.push("{ sys: { id: $id } }");
939
+ s.push("$id: String!"), n.id = t, i.push("{ sys: { id: $id } }");
928
940
  else if (e)
929
- s.push("$slug: String!"), i.slug = e, o.push("{ slug: $slug }");
941
+ s.push("$slug: String!"), n.slug = e, i.push("{ slug: $slug }");
930
942
  else
931
943
  throw new Error("Either id or slug is required.");
932
- r && (s.push("$marketCode: String!"), i.marketCode = r, o.push(
944
+ r && (s.push("$marketCode: String!"), n.marketCode = r, i.push(
933
945
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
934
- )), a && (s.push("$locale: String!"), i.locale = a, o.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
935
- const n = `(${s.join(", ")})`, l = `(
946
+ )), a && (s.push("$locale: String!"), n.locale = a, i.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
947
+ const o = `(${s.join(", ")})`, l = `(
936
948
  limit: 1
937
949
  where: {
938
950
  AND: [
939
- ${o.join(`
951
+ ${i.join(`
940
952
  `)}
941
953
  ]
942
954
  }
943
955
  )`, c = `
944
- query${n} {
956
+ query${o} {
945
957
  blogCategoryCollection${l} {
946
958
  items {
947
959
  sys {
@@ -971,7 +983,7 @@ query${n} {
971
983
  }
972
984
  }
973
985
  `, { blogCategoryCollection: u } = await y.graphqlQuery(c, {
974
- ...i
986
+ ...n
975
987
  }), f = u.items.at(0);
976
988
  if (!f)
977
989
  throw new $();
@@ -982,19 +994,19 @@ query${n} {
982
994
  page: r = 1,
983
995
  size: a = 20
984
996
  } = {}) => {
985
- const s = Math.max(1, Math.floor(r)), i = Math.max(1, Math.floor(a)), o = ["$limit: Int!", "$skip: Int!"], n = {
986
- limit: i,
987
- skip: (s - 1) * i
997
+ const s = Math.max(1, Math.floor(r)), n = Math.max(1, Math.floor(a)), i = ["$limit: Int!", "$skip: Int!"], o = {
998
+ limit: n,
999
+ skip: (s - 1) * n
988
1000
  }, l = ["limit: $limit", "skip: $skip"], c = [];
989
- t && (o.push("$marketCode: String!"), n.marketCode = t, c.push(
1001
+ t && (i.push("$marketCode: String!"), o.marketCode = t, c.push(
990
1002
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
991
- )), e && (o.push("$locale: String!"), n.locale = e, c.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")), c.length && l.push(`where: {
1003
+ )), e && (i.push("$locale: String!"), o.locale = e, c.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")), c.length && l.push(`where: {
992
1004
  AND: [
993
1005
  ${c.join(`
994
1006
  `)}
995
1007
  ]
996
1008
  }`);
997
- const u = o.length ? `(${o.join(", ")})` : "", f = l.length ? `(
1009
+ const u = i.length ? `(${i.join(", ")})` : "", f = l.length ? `(
998
1010
  ${l.join(`
999
1011
  `)}
1000
1012
  )` : "", g = `
@@ -1009,6 +1021,9 @@ query${u} {
1009
1021
  id
1010
1022
  }
1011
1023
  category {
1024
+ sys {
1025
+ id
1026
+ }
1012
1027
  title
1013
1028
  slug
1014
1029
  }
@@ -1022,28 +1037,28 @@ query${u} {
1022
1037
  }
1023
1038
  }
1024
1039
  `, { blogCollectionCollection: h } = await y.graphqlQuery(g, {
1025
- ...n
1040
+ ...o
1026
1041
  });
1027
1042
  return {
1028
1043
  page: s,
1029
1044
  total: h.total,
1030
- size: i,
1045
+ size: n,
1031
1046
  items: h.items
1032
1047
  };
1033
- }, we = async ({
1048
+ }, Ce = async ({
1034
1049
  page: t = 1,
1035
1050
  size: e = 20,
1036
1051
  marketCode: r,
1037
1052
  locale: a
1038
1053
  } = {}) => {
1039
- const s = Math.max(1, Math.floor(t)), i = Math.max(1, Math.floor(e)), o = ["$limit: Int!", "$skip: Int!"], n = {
1040
- limit: i,
1041
- skip: (s - 1) * i
1054
+ const s = Math.max(1, Math.floor(t)), n = Math.max(1, Math.floor(e)), i = ["$limit: Int!", "$skip: Int!"], o = {
1055
+ limit: n,
1056
+ skip: (s - 1) * n
1042
1057
  }, l = [];
1043
- r && (o.push("$marketCode: String!"), n.marketCode = r, l.push(
1058
+ r && (i.push("$marketCode: String!"), o.marketCode = r, l.push(
1044
1059
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1045
- )), a && (o.push("$locale: String!"), n.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1046
- const c = `(${o.join(", ")})`, u = l.length ? `(
1060
+ )), a && (i.push("$locale: String!"), o.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1061
+ const c = `(${i.join(", ")})`, u = l.length ? `(
1047
1062
  limit: $limit
1048
1063
  skip: $skip
1049
1064
  where: {
@@ -1092,27 +1107,27 @@ query${c} {
1092
1107
  }
1093
1108
  }
1094
1109
  `, { brandCollectionCollection: g } = await y.graphqlQuery(f, {
1095
- ...n
1110
+ ...o
1096
1111
  });
1097
1112
  return {
1098
1113
  page: s,
1099
1114
  total: g.total,
1100
- size: i,
1115
+ size: n,
1101
1116
  items: g.items
1102
1117
  };
1103
- }, Ce = async ({
1118
+ }, we = async ({
1104
1119
  marketCode: t,
1105
1120
  locale: e,
1106
1121
  page: r = 1,
1107
1122
  size: a = 20
1108
1123
  } = {}) => {
1109
- const s = Math.max(1, Math.floor(r)), i = Math.max(1, Math.floor(a)), o = ["$limit: Int!", "$skip: Int!"], n = {
1110
- limit: i,
1111
- skip: (s - 1) * i
1124
+ const s = Math.max(1, Math.floor(r)), n = Math.max(1, Math.floor(a)), i = ["$limit: Int!", "$skip: Int!"], o = {
1125
+ limit: n,
1126
+ skip: (s - 1) * n
1112
1127
  }, l = ["limit: $limit", "skip: $skip"], c = [];
1113
- t && (o.push("$marketCode: String!"), n.marketCode = t, c.push(
1128
+ t && (i.push("$marketCode: String!"), o.marketCode = t, c.push(
1114
1129
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1115
- )), e && (o.push("$locale: String!"), n.locale = e, c.push(
1130
+ )), e && (i.push("$locale: String!"), o.locale = e, c.push(
1116
1131
  "{ OR: [{ locale_exists: false }, { locale: $locale }] }"
1117
1132
  )), c.length && l.push(`where: {
1118
1133
  AND: [
@@ -1120,7 +1135,7 @@ query${c} {
1120
1135
  `)}
1121
1136
  ]
1122
1137
  }`);
1123
- const u = o.length ? `(${o.join(", ")})` : "", f = l.length ? `(
1138
+ const u = i.length ? `(${i.join(", ")})` : "", f = l.length ? `(
1124
1139
  ${l.join(`
1125
1140
  `)}
1126
1141
  )` : "", g = `
@@ -1147,12 +1162,12 @@ query${u} {
1147
1162
  }
1148
1163
  }
1149
1164
  `, { documentationCategoryCollection: h } = await y.graphqlQuery(g, {
1150
- ...n
1165
+ ...o
1151
1166
  });
1152
1167
  return {
1153
1168
  page: s,
1154
1169
  total: h.total,
1155
- size: i,
1170
+ size: n,
1156
1171
  items: h.items
1157
1172
  };
1158
1173
  }, ve = async ({
@@ -1161,28 +1176,28 @@ query${u} {
1161
1176
  marketCode: r,
1162
1177
  locale: a
1163
1178
  }) => {
1164
- const s = [], i = {}, o = [];
1179
+ const s = [], n = {}, i = [];
1165
1180
  if (t)
1166
- s.push("$id: String!"), i.id = t, o.push("{ sys: { id: $id } }");
1181
+ s.push("$id: String!"), n.id = t, i.push("{ sys: { id: $id } }");
1167
1182
  else if (e)
1168
- s.push("$slug: String!"), i.slug = e, o.push("{ slug: $slug }");
1183
+ s.push("$slug: String!"), n.slug = e, i.push("{ slug: $slug }");
1169
1184
  else
1170
1185
  throw new Error("Either id or slug is required.");
1171
- r && (s.push("$marketCode: String!"), i.marketCode = r, o.push(
1186
+ r && (s.push("$marketCode: String!"), n.marketCode = r, i.push(
1172
1187
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1173
- )), a && (s.push("$locale: String!"), i.locale = a, o.push(
1188
+ )), a && (s.push("$locale: String!"), n.locale = a, i.push(
1174
1189
  "{ OR: [{ locale_exists: false }, { locale: $locale }] }"
1175
1190
  ));
1176
- const n = `(${s.join(", ")})`, l = `(
1191
+ const o = `(${s.join(", ")})`, l = `(
1177
1192
  limit: 1
1178
1193
  where: {
1179
1194
  AND: [
1180
- ${o.join(`
1195
+ ${i.join(`
1181
1196
  `)}
1182
1197
  ]
1183
1198
  }
1184
1199
  )`, c = `
1185
- query${n} {
1200
+ query${o} {
1186
1201
  documentationCategoryCollection${l} {
1187
1202
  items {
1188
1203
  sys {
@@ -1204,7 +1219,7 @@ query${n} {
1204
1219
  }
1205
1220
  }
1206
1221
  `, { documentationCategoryCollection: u } = await y.graphqlQuery(c, {
1207
- ...i
1222
+ ...n
1208
1223
  }), f = u.items.at(0);
1209
1224
  if (!f)
1210
1225
  throw new $();
@@ -1216,21 +1231,21 @@ query${n} {
1216
1231
  page: a = 1,
1217
1232
  size: s = 20
1218
1233
  } = {}) => {
1219
- const i = Math.max(1, Math.floor(a)), o = Math.max(1, Math.floor(s)), n = ["$limit: Int!", "$skip: Int!"], l = {
1220
- limit: o,
1221
- skip: (i - 1) * o
1234
+ const n = Math.max(1, Math.floor(a)), i = Math.max(1, Math.floor(s)), o = ["$limit: Int!", "$skip: Int!"], l = {
1235
+ limit: i,
1236
+ skip: (n - 1) * i
1222
1237
  }, c = ["limit: $limit", "skip: $skip"], u = [];
1223
- t && (n.push("$marketCode: String!"), l.marketCode = t, u.push(
1238
+ t && (o.push("$marketCode: String!"), l.marketCode = t, u.push(
1224
1239
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1225
- )), e && (n.push("$locale: String!"), l.locale = e, u.push(
1240
+ )), e && (o.push("$locale: String!"), l.locale = e, u.push(
1226
1241
  "{ OR: [{ locale_exists: false }, { locale: $locale }] }"
1227
- )), r && (n.push("$categorySlug: String!"), l.categorySlug = r, u.push("{ category: { slug: $categorySlug } }")), u.length && c.push(`where: {
1242
+ )), r && (o.push("$categorySlug: String!"), l.categorySlug = r, u.push("{ category: { slug: $categorySlug } }")), u.length && c.push(`where: {
1228
1243
  AND: [
1229
1244
  ${u.join(`
1230
1245
  `)}
1231
1246
  ]
1232
1247
  }`);
1233
- const f = n.length ? `(${n.join(", ")})` : "", g = c.length ? `(
1248
+ const f = o.length ? `(${o.join(", ")})` : "", g = c.length ? `(
1234
1249
  ${c.join(`
1235
1250
  `)}
1236
1251
  )` : "", h = `
@@ -1267,9 +1282,9 @@ query${f} {
1267
1282
  ...l
1268
1283
  });
1269
1284
  return {
1270
- page: i,
1285
+ page: n,
1271
1286
  total: m.total,
1272
- size: o,
1287
+ size: i,
1273
1288
  items: m.items
1274
1289
  };
1275
1290
  }, ke = async ({
@@ -1278,28 +1293,28 @@ query${f} {
1278
1293
  marketCode: r,
1279
1294
  locale: a
1280
1295
  }) => {
1281
- const s = [], i = {}, o = [];
1296
+ const s = [], n = {}, i = [];
1282
1297
  if (t)
1283
- s.push("$id: String!"), i.id = t, o.push("{ sys: { id: $id } }");
1298
+ s.push("$id: String!"), n.id = t, i.push("{ sys: { id: $id } }");
1284
1299
  else if (e)
1285
- s.push("$slug: String!"), i.slug = e, o.push("{ slug: $slug }");
1300
+ s.push("$slug: String!"), n.slug = e, i.push("{ slug: $slug }");
1286
1301
  else
1287
1302
  throw new Error("Either id or slug is required.");
1288
- r && (s.push("$marketCode: String!"), i.marketCode = r, o.push(
1303
+ r && (s.push("$marketCode: String!"), n.marketCode = r, i.push(
1289
1304
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1290
- )), a && (s.push("$locale: String!"), i.locale = a, o.push(
1305
+ )), a && (s.push("$locale: String!"), n.locale = a, i.push(
1291
1306
  "{ OR: [{ locale_exists: false }, { locale: $locale }] }"
1292
1307
  ));
1293
- const n = `(${s.join(", ")})`, l = `(
1308
+ const o = `(${s.join(", ")})`, l = `(
1294
1309
  limit: 1
1295
1310
  where: {
1296
1311
  AND: [
1297
- ${o.join(`
1312
+ ${i.join(`
1298
1313
  `)}
1299
1314
  ]
1300
1315
  }
1301
1316
  )`, c = `
1302
- query${n} {
1317
+ query${o} {
1303
1318
  documentationArticleCollection${l} {
1304
1319
  items {
1305
1320
  sys {
@@ -1352,7 +1367,7 @@ query${n} {
1352
1367
  }
1353
1368
  }
1354
1369
  `, { documentationArticleCollection: u } = await y.graphqlQuery(c, {
1355
- ...i
1370
+ ...n
1356
1371
  }), f = u.items.at(0);
1357
1372
  if (!f)
1358
1373
  throw new $();
@@ -1363,14 +1378,14 @@ query${n} {
1363
1378
  marketCode: r,
1364
1379
  locale: a
1365
1380
  } = {}) => {
1366
- const s = Math.max(1, Math.floor(t)), i = Math.max(1, Math.floor(e)), o = ["$limit: Int!", "$skip: Int!"], n = {
1367
- limit: i,
1368
- skip: (s - 1) * i
1381
+ const s = Math.max(1, Math.floor(t)), n = Math.max(1, Math.floor(e)), i = ["$limit: Int!", "$skip: Int!"], o = {
1382
+ limit: n,
1383
+ skip: (s - 1) * n
1369
1384
  }, l = [];
1370
- r && (o.push("$marketCode: String!"), n.marketCode = r, l.push(
1385
+ r && (i.push("$marketCode: String!"), o.marketCode = r, l.push(
1371
1386
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1372
- )), a && (o.push("$locale: String!"), n.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1373
- const c = o.length ? `(${o.join(", ")})` : "", u = l.length ? `(
1387
+ )), a && (i.push("$locale: String!"), o.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1388
+ const c = i.length ? `(${i.join(", ")})` : "", u = l.length ? `(
1374
1389
  limit: $limit
1375
1390
  skip: $skip
1376
1391
  order: order_ASC
@@ -1412,13 +1427,13 @@ query${c} {
1412
1427
  `, { hyperlinkCollectionCollection: g } = await y.graphqlQuery(
1413
1428
  f,
1414
1429
  {
1415
- ...n
1430
+ ...o
1416
1431
  }
1417
1432
  );
1418
1433
  return {
1419
1434
  page: s,
1420
1435
  total: g.total,
1421
- size: i,
1436
+ size: n,
1422
1437
  items: g.items
1423
1438
  };
1424
1439
  }, Oe = async ({
@@ -1427,14 +1442,14 @@ query${c} {
1427
1442
  marketCode: r,
1428
1443
  locale: a
1429
1444
  } = {}) => {
1430
- const s = Math.max(1, Math.floor(t)), i = Math.max(1, Math.floor(e)), o = ["$limit: Int!", "$skip: Int!"], n = {
1431
- limit: i,
1432
- skip: (s - 1) * i
1445
+ const s = Math.max(1, Math.floor(t)), n = Math.max(1, Math.floor(e)), i = ["$limit: Int!", "$skip: Int!"], o = {
1446
+ limit: n,
1447
+ skip: (s - 1) * n
1433
1448
  }, l = [];
1434
- r && (o.push("$marketCode: String!"), n.marketCode = r, l.push(
1449
+ r && (i.push("$marketCode: String!"), o.marketCode = r, l.push(
1435
1450
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1436
- )), a && (o.push("$locale: String!"), n.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1437
- const c = `(${o.join(", ")})`, u = l.length ? `(
1451
+ )), a && (i.push("$locale: String!"), o.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1452
+ const c = `(${i.join(", ")})`, u = l.length ? `(
1438
1453
  limit: $limit
1439
1454
  skip: $skip
1440
1455
  where: {
@@ -1461,12 +1476,12 @@ query${c} {
1461
1476
  }
1462
1477
  }
1463
1478
  `, { keywordCollectionCollection: g } = await y.graphqlQuery(f, {
1464
- ...n
1479
+ ...o
1465
1480
  });
1466
1481
  return {
1467
1482
  page: s,
1468
1483
  total: g.total,
1469
- size: i,
1484
+ size: n,
1470
1485
  items: g.items
1471
1486
  };
1472
1487
  };
@@ -1478,10 +1493,10 @@ export {
1478
1493
  $e as getBlogCollections,
1479
1494
  ye as getBlogPostDetail,
1480
1495
  me as getBlogPosts,
1481
- we as getBrandCollections,
1496
+ Ce as getBrandCollections,
1482
1497
  ke as getDocArticleDetail,
1483
1498
  Se as getDocArticles,
1484
- Ce as getDocCategories,
1499
+ we as getDocCategories,
1485
1500
  ve as getDocCategoryDetail,
1486
1501
  Ae as getHyperlinkCollections,
1487
1502
  Oe as getKeywordCollections
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janbox/contentful-marketplace-sdk",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",