@janbox/contentful-marketplace-sdk 1.0.3 → 1.0.5

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 CHANGED
@@ -29,7 +29,7 @@ yarn add @janbox/contentful-marketplace-sdk contentful
29
29
  ```ts
30
30
  import {
31
31
  ContentfulSDK,
32
- listBannerCollections,
32
+ getBannerCollections,
33
33
  } from "@janbox/contentful-marketplace-sdk";
34
34
  import type { CreateClientParams } from "contentful";
35
35
 
@@ -41,7 +41,7 @@ const clientOptions: CreateClientParams = {
41
41
 
42
42
  ContentfulSDK.configure(clientOptions);
43
43
 
44
- const result = await listBannerCollections({
44
+ const result = await getBannerCollections({
45
45
  slot: "home_hero",
46
46
  marketCode: "vn",
47
47
  language: "en",
@@ -75,15 +75,15 @@ Notes:
75
75
 
76
76
  ## API Methods
77
77
 
78
- List methods return `{ page, total, size, items }`.
78
+ Collection methods return `{ page, total, size, items }`.
79
79
  Detail methods return the entry object directly.
80
80
 
81
81
  ### Banner Collection
82
82
 
83
- - `listBannerCollections(options)`
83
+ - `getBannerCollections(options)`
84
84
 
85
85
  ```ts
86
- await listBannerCollections({
86
+ await getBannerCollections({
87
87
  slot: "home_hero",
88
88
  page: 1,
89
89
  size: 20,
@@ -95,11 +95,11 @@ await listBannerCollections({
95
95
 
96
96
  ### Blog
97
97
 
98
- - `listBlogPosts(options?)`
98
+ - `getBlogPosts(options?)`
99
99
  - `getBlogPostDetail({ id } | { slug })`
100
100
 
101
101
  ```ts
102
- const posts = await listBlogPosts({
102
+ const posts = await getBlogPosts({
103
103
  marketCode: "vn",
104
104
  language: "en",
105
105
  page: 1,
@@ -122,13 +122,13 @@ const postById = await getBlogPostDetail({
122
122
 
123
123
  ### Documentation
124
124
 
125
- - `listDocCategories(options?)`
125
+ - `getDocCategories(options?)`
126
126
  - `getDocCategoryDetail({ id } | { slug })`
127
- - `listDocArticles(options?)`
127
+ - `getDocArticles(options?)`
128
128
  - `getDocArticleDetail({ id } | { slug })`
129
129
 
130
130
  ```ts
131
- const categories = await listDocCategories({
131
+ const categories = await getDocCategories({
132
132
  marketCode: "vn",
133
133
  language: "en",
134
134
  page: 1,
@@ -148,14 +148,14 @@ const categoryById = await getDocCategoryDetail({
148
148
  language: "en",
149
149
  });
150
150
 
151
- const articles = await listDocArticles({
151
+ const articles = await getDocArticles({
152
152
  categorySlug: "getting-started",
153
153
  marketCode: "vn",
154
154
  language: "en",
155
155
  page: 1,
156
156
  size: 10,
157
157
  });
158
- // listDocArticles returns summary fields only (no content, no seo)
158
+ // getDocArticles returns summary fields only (no content, no seo)
159
159
 
160
160
  const article = await getDocArticleDetail({
161
161
  slug: "payment-methods",
@@ -172,26 +172,26 @@ const articleById = await getDocArticleDetail({
172
172
 
173
173
  ### Brand / Hyperlink / Keyword Collections
174
174
 
175
- - `listBrandCollections(options?)`
176
- - `listHyperlinkCollections(options?)`
177
- - `listKeywordCollections(options?)`
175
+ - `getBrandCollections(options?)`
176
+ - `getHyperlinkCollections(options?)`
177
+ - `getKeywordCollections(options?)`
178
178
 
179
179
  ```ts
180
- const brands = await listBrandCollections({
180
+ const brands = await getBrandCollections({
181
181
  marketCode: "vn",
182
182
  language: "en",
183
183
  page: 1,
184
184
  size: 20,
185
185
  });
186
186
 
187
- const links = await listHyperlinkCollections({
187
+ const links = await getHyperlinkCollections({
188
188
  page: 1,
189
189
  size: 20,
190
190
  marketCode: "vn",
191
191
  language: "en",
192
192
  });
193
193
 
194
- const keywords = await listKeywordCollections({
194
+ const keywords = await getKeywordCollections({
195
195
  marketCode: "vn",
196
196
  language: "en",
197
197
  page: 1,
@@ -10,7 +10,7 @@ export type BannerCollectionGraphQLItem = {
10
10
  sys: GraphQLEntrySys;
11
11
  hyperlink: ({
12
12
  sys: GraphQLEntrySys;
13
- } & Pick<HyperlinkEntry["fields"], "label" | "url" | "target" | "includesMarketCode">) | null;
13
+ } & Pick<HyperlinkEntry["fields"], "label" | "url" | "target" | "marketHandling">) | null;
14
14
  media: {
15
15
  url: string;
16
16
  width: number | null;
@@ -21,18 +21,18 @@ export type BannerCollectionGraphQLItem = {
21
21
  }>;
22
22
  };
23
23
  } & Pick<BannerCollectionEntry["fields"], "name" | "slot" | "platform">;
24
- export type ListBannerCollectionsResponse = {
24
+ export type GetBannerCollectionsResponse = {
25
25
  page: number;
26
26
  total: number;
27
27
  size: number;
28
28
  items: BannerCollectionGraphQLItem[];
29
29
  };
30
- export declare const listBannerCollections: ({ slot, page, size, platform, marketCode, language, }: {
30
+ export declare const getBannerCollections: ({ slot, page, size, platform, marketCode, language, }: {
31
31
  slot: BannerCollectionEntry["fields"]["slot"];
32
32
  page?: number;
33
33
  size?: number;
34
34
  platform?: BannerCollectionEntry["fields"]["platform"][number];
35
35
  marketCode?: string;
36
36
  language?: string;
37
- }) => Promise<ListBannerCollectionsResponse>;
37
+ }) => Promise<GetBannerCollectionsResponse>;
38
38
  export {};
@@ -33,19 +33,19 @@ export interface BlogPostDetailGraphQLItem extends BlogPostGraphQLItem {
33
33
  };
34
34
  seo: GraphQLSeo | null;
35
35
  }
36
- export type ListBlogPostsResponse = {
36
+ export type GetBlogPostsResponse = {
37
37
  page: number;
38
38
  total: number;
39
39
  size: number;
40
40
  items: BlogPostGraphQLItem[];
41
41
  };
42
42
  export type GetBlogPostDetailResponse = BlogPostDetailGraphQLItem;
43
- export declare const listBlogPosts: ({ marketCode, language, page, size, }?: {
43
+ export declare const getBlogPosts: ({ marketCode, language, page, size, }?: {
44
44
  marketCode?: string;
45
45
  language?: string;
46
46
  page?: number;
47
47
  size?: number;
48
- }) => Promise<ListBlogPostsResponse>;
48
+ }) => Promise<GetBlogPostsResponse>;
49
49
  export declare const getBlogPostDetail: ({ id, slug, marketCode, language, }: {
50
50
  id?: string;
51
51
  slug?: string;
@@ -11,16 +11,16 @@ export type BrandCollectionGraphQLItem = {
11
11
  } & Pick<BrandEntry["fields"], "name" | "slug">>;
12
12
  };
13
13
  } & Pick<BrandCollectionEntry["fields"], "name" | "slot">;
14
- export type ListBrandCollectionsResponse = {
14
+ export type GetBrandCollectionsResponse = {
15
15
  page: number;
16
16
  total: number;
17
17
  size: number;
18
18
  items: BrandCollectionGraphQLItem[];
19
19
  };
20
- export declare const listBrandCollections: ({ page, size, marketCode, language, }?: {
20
+ export declare const getBrandCollections: ({ page, size, marketCode, language, }?: {
21
21
  page?: number;
22
22
  size?: number;
23
23
  marketCode?: string;
24
24
  language?: string;
25
- }) => Promise<ListBrandCollectionsResponse>;
25
+ }) => Promise<GetBrandCollectionsResponse>;
26
26
  export {};
@@ -34,39 +34,39 @@ export interface DocArticleDetailGraphQLItem extends DocArticleGraphQLItem {
34
34
  };
35
35
  seo: GraphQLSeo | null;
36
36
  }
37
- export type ListDocCategoriesResponse = {
37
+ export type GetDocCategoriesResponse = {
38
38
  page: number;
39
39
  total: number;
40
40
  size: number;
41
41
  items: DocCategoryGraphQLItem[];
42
42
  };
43
43
  export type GetDocCategoryDetailResponse = DocCategoryGraphQLItem;
44
- export type ListDocArticlesResponse = {
44
+ export type getDocArticlesResponse = {
45
45
  page: number;
46
46
  total: number;
47
47
  size: number;
48
48
  items: DocArticleGraphQLItem[];
49
49
  };
50
50
  export type GetDocArticleDetailResponse = DocArticleDetailGraphQLItem;
51
- export declare const listDocCategories: ({ marketCode, language, page, size, }?: {
51
+ export declare const getDocCategories: ({ marketCode, language, page, size, }?: {
52
52
  marketCode?: string;
53
53
  language?: string;
54
54
  page?: number;
55
55
  size?: number;
56
- }) => Promise<ListDocCategoriesResponse>;
56
+ }) => Promise<GetDocCategoriesResponse>;
57
57
  export declare const getDocCategoryDetail: ({ id, slug, marketCode, language, }: {
58
58
  id?: string;
59
59
  slug?: string;
60
60
  marketCode?: string;
61
61
  language?: string;
62
62
  }) => Promise<GetDocCategoryDetailResponse>;
63
- export declare const listDocArticles: ({ marketCode, language, categorySlug, page, size, }?: {
63
+ export declare const getDocArticles: ({ marketCode, language, categorySlug, page, size, }?: {
64
64
  marketCode?: string;
65
65
  language?: string;
66
66
  categorySlug?: string;
67
67
  page?: number;
68
68
  size?: number;
69
- }) => Promise<ListDocArticlesResponse>;
69
+ }) => Promise<getDocArticlesResponse>;
70
70
  export declare const getDocArticleDetail: ({ id, slug, marketCode, language, }: {
71
71
  id?: string;
72
72
  slug?: string;
@@ -8,19 +8,19 @@ export type HyperlinkCollectionGraphQLItem = {
8
8
  linksCollection: {
9
9
  items: Array<{
10
10
  sys: GraphQLEntrySys;
11
- } & Pick<HyperlinkEntry["fields"], "label" | "url" | "target" | "includesMarketCode">>;
11
+ } & Pick<HyperlinkEntry["fields"], "label" | "url" | "target" | 'marketHandling'>>;
12
12
  };
13
13
  } & Pick<HyperlinkCollectionEntry["fields"], "name" | "slot" | "order">;
14
- export type ListHyperlinkCollectionsResponse = {
14
+ export type GetHyperlinkCollectionsResponse = {
15
15
  page: number;
16
16
  total: number;
17
17
  size: number;
18
18
  items: HyperlinkCollectionGraphQLItem[];
19
19
  };
20
- export declare const listHyperlinkCollections: ({ page, size, marketCode, language, }?: {
20
+ export declare const getHyperlinkCollections: ({ page, size, marketCode, language, }?: {
21
21
  page?: number;
22
22
  size?: number;
23
23
  marketCode?: string;
24
24
  language?: string;
25
- }) => Promise<ListHyperlinkCollectionsResponse>;
25
+ }) => Promise<GetHyperlinkCollectionsResponse>;
26
26
  export {};
@@ -5,16 +5,16 @@ type GraphQLEntrySys = Pick<EntrySys, "id">;
5
5
  export type KeywordCollectionGraphQLItem = {
6
6
  sys: GraphQLEntrySys;
7
7
  } & Pick<KeywordCollectionEntry["fields"], "name" | "slot" | "keywords">;
8
- export type ListKeywordCollectionsResponse = {
8
+ export type GetKeywordCollectionsResponse = {
9
9
  page: number;
10
10
  total: number;
11
11
  size: number;
12
12
  items: KeywordCollectionGraphQLItem[];
13
13
  };
14
- export declare const listKeywordCollections: ({ page, size, marketCode, language, }?: {
14
+ export declare const getKeywordCollections: ({ page, size, marketCode, language, }?: {
15
15
  page?: number;
16
16
  size?: number;
17
17
  marketCode?: string;
18
18
  language?: string;
19
- }) => Promise<ListKeywordCollectionsResponse>;
19
+ }) => Promise<GetKeywordCollectionsResponse>;
20
20
  export {};
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var we=Function.prototype.toString,C=Object.create,Se=Object.prototype.toString,Ce=(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 Oe(){return new Ce}function je(){return new WeakMap}var ke=typeof WeakMap<"u"?je:Oe;function B(e){if(!e)return C(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:C(e);if(t&&~we.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 Te(e){return e.flags}var _e=/test/g.flags==="g"?Te:Ae;function ae(e){var t=Se.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,xe=Object.defineProperty,De=Object.getOwnPropertyDescriptor,se=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols,ce=Object.prototype,le=ce.hasOwnProperty,Re=ce.propertyIsEnumerable,ue=typeof N=="function";function Me(e){return se(e).concat(N(e))}var Ie=ue?Me:se;function S(e,t,r){for(var s=Ie(e),a=0,o=s.length,n=void 0,i=void 0;a<o;++a)if(n=s[a],!(n==="callee"||n==="caller")){if(i=De(e,n),!i){t[n]=r.copier(e[n],r);continue}!i.get&&!i.set&&(i.value=r.copier(i.value,r));try{xe(t,n,i)}catch{t[n]=i.value}}return t}function ze(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 Ee(e,t){var r=new t.Constructor;return t.cache.set(e,r),S(e,r,t)}function ge(e,t){return e.slice(0)}function Le(e,t){return e.slice(0,e.size,e.type)}function Be(e,t){return new t.Constructor(ge(e.buffer))}function Ne(e,t){return new t.Constructor(e.getTime())}function fe(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 Ve(e,t){return S(e,fe(e,t),t)}function Qe(e,t){var r=B(t.prototype);t.cache.set(e,r);for(var s in e)le.call(e,s)&&(r[s]=t.copier(e[s],t));return r}function Fe(e,t){var r=B(t.prototype);t.cache.set(e,r);for(var s in e)le.call(e,s)&&(r[s]=t.copier(e[s],t));for(var a=N(e),o=0,n=a.length,i=void 0;o<n;++o)i=a[o],Re.call(e,i)&&(r[i]=t.copier(e[i],t));return r}var Ge=ue?Fe:Qe;function Ue(e,t){var r=B(t.prototype);return t.cache.set(e,r),S(e,r,t)}function O(e,t){return new t.Constructor(e.valueOf())}function Ke(e,t){var r=new t.Constructor(e.source,_e(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 We(e,t){return S(e,pe(e,t),t)}var Je=Array.isArray,V=Object.assign,He=Object.getPrototypeOf||(function(e){return e.__proto__}),he={array:ze,arrayBuffer:ge,blob:Le,dataView:Be,date:Ne,error:w,map:fe,object:Ge,regExp:Ke,set:pe},Ye=V({},he,{array:Ee,map:Ve,object:Ue,set:We});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 ye(e){var t=V({},he,e),r=Xe(t),s=r.Array,a=r.Object;function o(n,i){if(i.prototype=i.Constructor=void 0,!n||typeof n!="object")return n;if(i.cache.has(n))return i.cache.get(n);if(i.prototype=He(n),i.Constructor=i.prototype&&i.prototype.constructor,!i.Constructor||i.Constructor===Object)return a(n,i);if(Je(n))return s(n,i);var c=r[Pe(n)];return c?c(n,i):typeof n.then=="function"?n:a(n,i)}return function(i){return o(i,{Constructor:void 0,cache:ke(),copier:o,prototype:void 0})}}function Ze(e){return ye(V({},Ye,e))}Ze({});ye({});var v=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},j={exports:{}},F;function et(){if(F)return j.exports;F=1;var e=j.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 o(p){if(t===setTimeout)return setTimeout(p,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(p,0);try{return t(p,0)}catch{try{return t.call(null,p,0)}catch{return t.call(this,p,0)}}}function n(p){if(r===clearTimeout)return clearTimeout(p);if((r===a||!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=[],c=!1,l,u=-1;function g(){!c||!l||(c=!1,l.length?i=l.concat(i):u=-1,i.length&&f())}function f(){if(!c){var p=o(g);c=!0;for(var d=i.length;d;){for(l=i,i=[];++u<d;)l&&l[u].run();u=-1,d=i.length}l=null,c=!1,n(p)}}e.nextTick=function(p){var d=new Array(arguments.length-1);if(arguments.length>1)for(var b=1;b<arguments.length;b++)d[b-1]=arguments[b];i.push(new y(p,d)),i.length===1&&!c&&o(f)};function y(p,d){this.fun=p,this.array=d}y.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function h(){}return e.on=h,e.addListener=h,e.once=h,e.off=h,e.removeListener=h,e.removeAllListeners=h,e.emit=h,e.prependListener=h,e.prependOnceListener=h,e.listeners=function(p){return[]},e.binding=function(p){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(p){throw new Error("process.chdir is not supported")},e.umask=function(){return 0},j.exports}et();var k,G;function tt(){if(G)return k;G=1;var e=typeof v=="object"&&v&&v.Object===Object&&v;return k=e,k}var A,U;function rt(){if(U)return A;U=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,K;function me(){if(K)return T;K=1;var e=rt(),t=e.Symbol;return T=t,T}var _,W;function nt(){if(W)return _;W=1;var e=me(),t=Object.prototype,r=t.hasOwnProperty,s=t.toString,a=e?e.toStringTag:void 0;function o(n){var i=r.call(n,a),c=n[a];try{n[a]=void 0;var l=!0}catch{}var u=s.call(n);return l&&(i?n[a]=c:delete n[a]),u}return _=o,_}var q,J;function it(){if(J)return q;J=1;var e=Object.prototype,t=e.toString;function r(s){return t.call(s)}return q=r,q}var P,H;function de(){if(H)return P;H=1;var e=me(),t=nt(),r=it(),s="[object Null]",a="[object Undefined]",o=e?e.toStringTag:void 0;function n(i){return i==null?i===void 0?a:s:o&&o in Object(i)?t(i):r(i)}return P=n,P}var x,Y;function ot(){if(Y)return x;Y=1;var e=Array.isArray;return x=e,x}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=de(),t=ot(),r=be(),s="[object String]";function a(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==s}return R=a,R}at();var M,ee;function st(){if(ee)return M;ee=1;function e(t,r){return function(s){return t(r(s))}}return M=e,M}var I,te;function ct(){if(te)return I;te=1;var e=st(),t=e(Object.getPrototypeOf,Object);return I=t,I}var z,re;function lt(){if(re)return z;re=1;var e=de(),t=ct(),r=be(),s="[object Object]",a=Function.prototype,o=Object.prototype,n=a.toString,i=o.hasOwnProperty,c=n.call(Object);function l(u){if(!r(u)||e(u)!=s)return!1;var g=t(u);if(g===null)return!0;var f=i.call(g,"constructor")&&g.constructor;return typeof f=="function"&&f instanceof f&&n.call(f)==c}return z=l,z}lt();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},$e={0:8203,1:8204,2:8205,3:65279};new Array(4).fill(String.fromCodePoint($e[0])).join("");Object.fromEntries(Object.entries($e).map(e=>e.reverse()));Object.fromEntries(Object.entries(ve).map(e=>e.reverse()));`${Object.values(ve).map(e=>`\\u{${e.toString(16)}}`).join("")}`;var E,ne;function ut(){if(ne)return E;ne=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString;return E=function(r,s,a){if(t.call(s)!=="[object Function]")throw new TypeError("iterator must be a function");var o=r.length;if(o===+o)for(var n=0;n<o;n++)s.call(a,r[n],n,r);else for(var i in r)e.call(r,i)&&s.call(a,r[i],i,r)},E}var L,ie;function gt(){if(ie)return L;ie=1;var e=ut();L=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 o=t.bind(t,r);for(var n in t)t.hasOwnProperty(n)&&(o[n]=t[n].bind(o,r));return o}return t.get=function(r,s){for(var a=Array.isArray(s)?s:t.parse(s),o=0;o<a.length;++o){var n=a[o];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 o=Array.isArray(s)?s:t.parse(s),n=o[0];if(o.length===0)throw Error("Can not set the root object");for(var i=0;i<o.length-1;++i){var c=o[i];typeof c!="string"&&typeof c!="number"&&(c=String(c)),!(c==="__proto__"||c==="constructor"||c==="prototype")&&(c==="-"&&Array.isArray(r)&&(c=r.length),n=o[i+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),o=a[a.length-1];if(o===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 i=+o;if(o===""&&isNaN(i))throw new Error('Invalid array index: "'+o+'"');Array.prototype.splice.call(n,i,1)}else delete n[o]},t.dict=function(r,s){var a={};return t.walk(r,function(o,n){a[n]=o},s),a},t.walk=function(r,s,a){var o=[];a=a||function(n){var i=Object.prototype.toString.call(n);return i==="[object Object]"||i==="[object Array]"},(function n(i){e(i,function(c,l){o.push(String(l)),a(c)?n(c):s(c,t.compile(o)),o.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("/")},L}gt();var $={exports:{}},oe;function ft(){return oe||(oe=1,(function(e,t){t=e.exports=r,t.getSerialize=s;function r(a,o,n,i){return JSON.stringify(a,s(o,i),n)}function s(a,o){var n=[],i=[];return o==null&&(o=function(c,l){return n[0]===l?"[Circular ~]":"[Circular ~."+i.slice(0,n.indexOf(l)).join(".")+"]"}),function(c,l){if(n.length>0){var u=n.indexOf(this);~u?n.splice(u+1):n.push(this),~u?i.splice(u,1/0,c):i.push(c),~n.indexOf(l)&&(l=o.call(this,c,l))}else n.push(l);return a==null?l:a.call(this,c,l)}}})($,$.exports)),$.exports}ft();class m{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:o="master"}=this.clientParams,n=await fetch(`https://graphql.contentful.com/content/v1/spaces/${s}/environments/${o}`,{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}
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var we=Function.prototype.toString,C=Object.create,Se=Object.prototype.toString,Ce=(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 Oe(){return new Ce}function Ae(){return new WeakMap}var je=typeof WeakMap<"u"?Ae:Oe;function B(e){if(!e)return C(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:C(e);if(t&&~we.call(t).indexOf("[native code]"))try{return new t}catch{}return C(e)}function ke(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 Te(e){return e.flags}var _e=/test/g.flags==="g"?Te:ke;function ae(e){var t=Se.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,xe=Object.defineProperty,De=Object.getOwnPropertyDescriptor,se=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols,ce=Object.prototype,le=ce.hasOwnProperty,Re=ce.propertyIsEnumerable,ue=typeof N=="function";function Ie(e){return se(e).concat(N(e))}var Me=ue?Ie:se;function S(e,t,r){for(var s=Me(e),a=0,o=s.length,n=void 0,i=void 0;a<o;++a)if(n=s[a],!(n==="callee"||n==="caller")){if(i=De(e,n),!i){t[n]=r.copier(e[n],r);continue}!i.get&&!i.set&&(i.value=r.copier(i.value,r));try{xe(t,n,i)}catch{t[n]=i.value}}return t}function ze(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 Ee(e,t){var r=new t.Constructor;return t.cache.set(e,r),S(e,r,t)}function ge(e,t){return e.slice(0)}function Le(e,t){return e.slice(0,e.size,e.type)}function Be(e,t){return new t.Constructor(ge(e.buffer))}function Ne(e,t){return new t.Constructor(e.getTime())}function fe(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 Ve(e,t){return S(e,fe(e,t),t)}function Qe(e,t){var r=B(t.prototype);t.cache.set(e,r);for(var s in e)le.call(e,s)&&(r[s]=t.copier(e[s],t));return r}function Fe(e,t){var r=B(t.prototype);t.cache.set(e,r);for(var s in e)le.call(e,s)&&(r[s]=t.copier(e[s],t));for(var a=N(e),o=0,n=a.length,i=void 0;o<n;++o)i=a[o],Re.call(e,i)&&(r[i]=t.copier(e[i],t));return r}var Ge=ue?Fe:Qe;function Ue(e,t){var r=B(t.prototype);return t.cache.set(e,r),S(e,r,t)}function O(e,t){return new t.Constructor(e.valueOf())}function Ke(e,t){var r=new t.Constructor(e.source,_e(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 We(e,t){return S(e,pe(e,t),t)}var Je=Array.isArray,V=Object.assign,He=Object.getPrototypeOf||(function(e){return e.__proto__}),he={array:ze,arrayBuffer:ge,blob:Le,dataView:Be,date:Ne,error:w,map:fe,object:Ge,regExp:Ke,set:pe},Ye=V({},he,{array:Ee,map:Ve,object:Ue,set:We});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 ye(e){var t=V({},he,e),r=Xe(t),s=r.Array,a=r.Object;function o(n,i){if(i.prototype=i.Constructor=void 0,!n||typeof n!="object")return n;if(i.cache.has(n))return i.cache.get(n);if(i.prototype=He(n),i.Constructor=i.prototype&&i.prototype.constructor,!i.Constructor||i.Constructor===Object)return a(n,i);if(Je(n))return s(n,i);var c=r[Pe(n)];return c?c(n,i):typeof n.then=="function"?n:a(n,i)}return function(i){return o(i,{Constructor:void 0,cache:je(),copier:o,prototype:void 0})}}function Ze(e){return ye(V({},Ye,e))}Ze({});ye({});var v=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},A={exports:{}},F;function et(){if(F)return A.exports;F=1;var e=A.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 o(p){if(t===setTimeout)return setTimeout(p,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(p,0);try{return t(p,0)}catch{try{return t.call(null,p,0)}catch{return t.call(this,p,0)}}}function n(p){if(r===clearTimeout)return clearTimeout(p);if((r===a||!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=[],c=!1,l,u=-1;function g(){!c||!l||(c=!1,l.length?i=l.concat(i):u=-1,i.length&&f())}function f(){if(!c){var p=o(g);c=!0;for(var d=i.length;d;){for(l=i,i=[];++u<d;)l&&l[u].run();u=-1,d=i.length}l=null,c=!1,n(p)}}e.nextTick=function(p){var d=new Array(arguments.length-1);if(arguments.length>1)for(var b=1;b<arguments.length;b++)d[b-1]=arguments[b];i.push(new y(p,d)),i.length===1&&!c&&o(f)};function y(p,d){this.fun=p,this.array=d}y.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function h(){}return e.on=h,e.addListener=h,e.once=h,e.off=h,e.removeListener=h,e.removeAllListeners=h,e.emit=h,e.prependListener=h,e.prependOnceListener=h,e.listeners=function(p){return[]},e.binding=function(p){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(p){throw new Error("process.chdir is not supported")},e.umask=function(){return 0},A.exports}et();var j,G;function tt(){if(G)return j;G=1;var e=typeof v=="object"&&v&&v.Object===Object&&v;return j=e,j}var k,U;function rt(){if(U)return k;U=1;var e=tt(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return k=r,k}var T,K;function me(){if(K)return T;K=1;var e=rt(),t=e.Symbol;return T=t,T}var _,W;function nt(){if(W)return _;W=1;var e=me(),t=Object.prototype,r=t.hasOwnProperty,s=t.toString,a=e?e.toStringTag:void 0;function o(n){var i=r.call(n,a),c=n[a];try{n[a]=void 0;var l=!0}catch{}var u=s.call(n);return l&&(i?n[a]=c:delete n[a]),u}return _=o,_}var q,J;function it(){if(J)return q;J=1;var e=Object.prototype,t=e.toString;function r(s){return t.call(s)}return q=r,q}var P,H;function de(){if(H)return P;H=1;var e=me(),t=nt(),r=it(),s="[object Null]",a="[object Undefined]",o=e?e.toStringTag:void 0;function n(i){return i==null?i===void 0?a:s:o&&o in Object(i)?t(i):r(i)}return P=n,P}var x,Y;function ot(){if(Y)return x;Y=1;var e=Array.isArray;return x=e,x}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=de(),t=ot(),r=be(),s="[object String]";function a(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==s}return R=a,R}at();var I,ee;function st(){if(ee)return I;ee=1;function e(t,r){return function(s){return t(r(s))}}return I=e,I}var M,te;function ct(){if(te)return M;te=1;var e=st(),t=e(Object.getPrototypeOf,Object);return M=t,M}var z,re;function lt(){if(re)return z;re=1;var e=de(),t=ct(),r=be(),s="[object Object]",a=Function.prototype,o=Object.prototype,n=a.toString,i=o.hasOwnProperty,c=n.call(Object);function l(u){if(!r(u)||e(u)!=s)return!1;var g=t(u);if(g===null)return!0;var f=i.call(g,"constructor")&&g.constructor;return typeof f=="function"&&f instanceof f&&n.call(f)==c}return z=l,z}lt();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},$e={0:8203,1:8204,2:8205,3:65279};new Array(4).fill(String.fromCodePoint($e[0])).join("");Object.fromEntries(Object.entries($e).map(e=>e.reverse()));Object.fromEntries(Object.entries(ve).map(e=>e.reverse()));`${Object.values(ve).map(e=>`\\u{${e.toString(16)}}`).join("")}`;var E,ne;function ut(){if(ne)return E;ne=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString;return E=function(r,s,a){if(t.call(s)!=="[object Function]")throw new TypeError("iterator must be a function");var o=r.length;if(o===+o)for(var n=0;n<o;n++)s.call(a,r[n],n,r);else for(var i in r)e.call(r,i)&&s.call(a,r[i],i,r)},E}var L,ie;function gt(){if(ie)return L;ie=1;var e=ut();L=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 o=t.bind(t,r);for(var n in t)t.hasOwnProperty(n)&&(o[n]=t[n].bind(o,r));return o}return t.get=function(r,s){for(var a=Array.isArray(s)?s:t.parse(s),o=0;o<a.length;++o){var n=a[o];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 o=Array.isArray(s)?s:t.parse(s),n=o[0];if(o.length===0)throw Error("Can not set the root object");for(var i=0;i<o.length-1;++i){var c=o[i];typeof c!="string"&&typeof c!="number"&&(c=String(c)),!(c==="__proto__"||c==="constructor"||c==="prototype")&&(c==="-"&&Array.isArray(r)&&(c=r.length),n=o[i+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),o=a[a.length-1];if(o===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 i=+o;if(o===""&&isNaN(i))throw new Error('Invalid array index: "'+o+'"');Array.prototype.splice.call(n,i,1)}else delete n[o]},t.dict=function(r,s){var a={};return t.walk(r,function(o,n){a[n]=o},s),a},t.walk=function(r,s,a){var o=[];a=a||function(n){var i=Object.prototype.toString.call(n);return i==="[object Object]"||i==="[object Array]"},(function n(i){e(i,function(c,l){o.push(String(l)),a(c)?n(c):s(c,t.compile(o)),o.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("/")},L}gt();var $={exports:{}},oe;function ft(){return oe||(oe=1,(function(e,t){t=e.exports=r,t.getSerialize=s;function r(a,o,n,i){return JSON.stringify(a,s(o,i),n)}function s(a,o){var n=[],i=[];return o==null&&(o=function(c,l){return n[0]===l?"[Circular ~]":"[Circular ~."+i.slice(0,n.indexOf(l)).join(".")+"]"}),function(c,l){if(n.length>0){var u=n.indexOf(this);~u?n.splice(u+1):n.push(this),~u?i.splice(u,1/0,c):i.push(c),~n.indexOf(l)&&(l=o.call(this,c,l))}else n.push(l);return a==null?l:a.call(this,c,l)}}})($,$.exports)),$.exports}ft();class m{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:o="master"}=this.clientParams,n=await fetch(`https://graphql.contentful.com/content/v1/spaces/${s}/environments/${o}`,{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
2
  ${c}`)}const i=await n.json();if(i.errors)throw new Error(`GraphQL errors: ${JSON.stringify(i.errors,null,2)}`);return i.data}}const pt=async({slot:e,page:t=1,size:r=20,platform:s,marketCode:a,language:o})=>{const n=Math.max(1,Math.floor(t)),i=Math.max(1,Math.floor(r)),c=["$slot: String!","$limit: Int!","$skip: Int!"],l={slot:e,limit:i,skip:(n-1)*i},u=["{ slot: $slot }"];s&&(c.push("$platform: String!"),l.platform=s,u.push("{ platform_contains_some: [$platform] }")),a&&(c.push("$marketCode: String!"),l.marketCode=a,u.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),o&&(c.push("$language: String!"),l.language=o,u.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const g=`(${c.join(", ")})`,f=`(
3
3
  limit: $limit
4
4
  skip: $skip
@@ -32,7 +32,7 @@ query${g} {
32
32
  label
33
33
  url
34
34
  target
35
- includesMarketCode
35
+ marketHandling
36
36
  }
37
37
  media {
38
38
  url
@@ -60,8 +60,8 @@ query${u} {
60
60
  items {
61
61
  sys {
62
62
  id
63
- createdAt
64
- updatedAt
63
+ createdAt: firstPublishedAt
64
+ updatedAt: publishedAt
65
65
  }
66
66
  title
67
67
  shortDescription
@@ -93,8 +93,8 @@ query${i} {
93
93
  items {
94
94
  sys {
95
95
  id
96
- createdAt
97
- updatedAt
96
+ createdAt: firstPublishedAt
97
+ updatedAt: publishedAt
98
98
  }
99
99
  title
100
100
  shortDescription
@@ -179,8 +179,8 @@ query${u} {
179
179
  items {
180
180
  sys {
181
181
  id
182
- createdAt
183
- updatedAt
182
+ createdAt: firstPublishedAt
183
+ updatedAt: publishedAt
184
184
  }
185
185
  title
186
186
  slug
@@ -209,8 +209,8 @@ query${i} {
209
209
  items {
210
210
  sys {
211
211
  id
212
- createdAt
213
- updatedAt
212
+ createdAt: firstPublishedAt
213
+ updatedAt: publishedAt
214
214
  }
215
215
  title
216
216
  slug
@@ -240,8 +240,8 @@ query${g} {
240
240
  items {
241
241
  sys {
242
242
  id
243
- createdAt
244
- updatedAt
243
+ createdAt: firstPublishedAt
244
+ updatedAt: publishedAt
245
245
  }
246
246
  title
247
247
  slug
@@ -277,8 +277,8 @@ query${i} {
277
277
  items {
278
278
  sys {
279
279
  id
280
- createdAt
281
- updatedAt
280
+ createdAt: firstPublishedAt
281
+ updatedAt: publishedAt
282
282
  }
283
283
  title
284
284
  slug
@@ -312,6 +312,7 @@ query${i} {
312
312
  `,{documentationArticleCollection:u}=await m.graphqlQuery(l,{...o}),g=u.items.at(0);if(!g)throw new Q;return g},wt=async({page:e=1,size:t=20,marketCode:r,language:s}={})=>{const a=Math.max(1,Math.floor(e)),o=Math.max(1,Math.floor(t)),n=["$limit: Int!","$skip: Int!"],i={limit:o,skip:(a-1)*o},c=[];r&&(n.push("$marketCode: String!"),i.marketCode=r,c.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),s&&(n.push("$language: String!"),i.language=s,c.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const l=n.length?`(${n.join(", ")})`:"",u=c.length?`(
313
313
  limit: $limit
314
314
  skip: $skip
315
+ order: order_ASC
315
316
  where: {
316
317
  AND: [
317
318
  ${c.join(`
@@ -321,6 +322,7 @@ query${i} {
321
322
  )`:`(
322
323
  limit: $limit
323
324
  skip: $skip
325
+ order: order_ASC
324
326
  )`,g=`
325
327
  query${l} {
326
328
  hyperlinkCollectionCollection${u} {
@@ -340,7 +342,7 @@ query${l} {
340
342
  label
341
343
  url
342
344
  target
343
- includesMarketCode
345
+ marketHandling
344
346
  }
345
347
  }
346
348
  }
@@ -372,4 +374,4 @@ query${l} {
372
374
  }
373
375
  }
374
376
  }
375
- `,{keywordCollectionCollection:f}=await m.graphqlQuery(g,{...i});return{page:a,total:f.total,size:o,items:f.items}};exports.ContentfulSDK=m;exports.getBlogPostDetail=yt;exports.getDocArticleDetail=$t;exports.getDocCategoryDetail=bt;exports.listBannerCollections=pt;exports.listBlogPosts=ht;exports.listBrandCollections=mt;exports.listDocArticles=vt;exports.listDocCategories=dt;exports.listHyperlinkCollections=wt;exports.listKeywordCollections=St;
377
+ `,{keywordCollectionCollection:f}=await m.graphqlQuery(g,{...i});return{page:a,total:f.total,size:o,items:f.items}};exports.ContentfulSDK=m;exports.getBannerCollections=pt;exports.getBlogPostDetail=yt;exports.getBlogPosts=ht;exports.getBrandCollections=mt;exports.getDocArticleDetail=$t;exports.getDocArticles=vt;exports.getDocCategories=dt;exports.getDocCategoryDetail=bt;exports.getHyperlinkCollections=wt;exports.getKeywordCollections=St;
package/dist/index.js CHANGED
@@ -16,10 +16,10 @@ var we = Function.prototype.toString, C = Object.create, Se = Object.prototype.t
16
16
  function Oe() {
17
17
  return new Ce();
18
18
  }
19
- function je() {
19
+ function Ae() {
20
20
  return /* @__PURE__ */ new WeakMap();
21
21
  }
22
- var ke = typeof WeakMap < "u" ? je : Oe;
22
+ var je = typeof WeakMap < "u" ? Ae : Oe;
23
23
  function N(e) {
24
24
  if (!e)
25
25
  return C(null);
@@ -33,14 +33,14 @@ function N(e) {
33
33
  }
34
34
  return C(e);
35
35
  }
36
- function Ae(e) {
36
+ function ke(e) {
37
37
  var t = "";
38
38
  return e.global && (t += "g"), e.ignoreCase && (t += "i"), e.multiline && (t += "m"), e.unicode && (t += "u"), e.sticky && (t += "y"), t;
39
39
  }
40
40
  function Te(e) {
41
41
  return e.flags;
42
42
  }
43
- var _e = /test/g.flags === "g" ? Te : Ae;
43
+ var _e = /test/g.flags === "g" ? Te : ke;
44
44
  function ae(e) {
45
45
  var t = Se.call(e);
46
46
  return t.substring(8, t.length - 1);
@@ -48,11 +48,11 @@ function ae(e) {
48
48
  function qe(e) {
49
49
  return e[Symbol.toStringTag] || ae(e);
50
50
  }
51
- var Pe = typeof Symbol < "u" ? qe : ae, xe = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, se = Object.getOwnPropertyNames, B = Object.getOwnPropertySymbols, ce = Object.prototype, le = ce.hasOwnProperty, De = ce.propertyIsEnumerable, ue = typeof B == "function";
51
+ var Pe = typeof Symbol < "u" ? qe : ae, xe = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, se = Object.getOwnPropertyNames, B = Object.getOwnPropertySymbols, ce = Object.prototype, ue = ce.hasOwnProperty, De = ce.propertyIsEnumerable, le = typeof B == "function";
52
52
  function Ie(e) {
53
53
  return se(e).concat(B(e));
54
54
  }
55
- var Me = ue ? Ie : se;
55
+ var Me = le ? Ie : se;
56
56
  function S(e, t, r) {
57
57
  for (var s = Me(e), a = 0, o = s.length, n = void 0, i = void 0; a < o; ++a)
58
58
  if (n = s[a], !(n === "callee" || n === "caller")) {
@@ -80,44 +80,44 @@ function Ee(e, t) {
80
80
  var r = new t.Constructor();
81
81
  return t.cache.set(e, r), S(e, r, t);
82
82
  }
83
- function fe(e, t) {
83
+ function ge(e, t) {
84
84
  return e.slice(0);
85
85
  }
86
86
  function Le(e, t) {
87
87
  return e.slice(0, e.size, e.type);
88
88
  }
89
89
  function Ne(e, t) {
90
- return new t.Constructor(fe(e.buffer));
90
+ return new t.Constructor(ge(e.buffer));
91
91
  }
92
92
  function Be(e, t) {
93
93
  return new t.Constructor(e.getTime());
94
94
  }
95
- function ge(e, t) {
95
+ function fe(e, t) {
96
96
  var r = new t.Constructor();
97
97
  return t.cache.set(e, r), e.forEach(function(s, a) {
98
98
  r.set(a, t.copier(s, t));
99
99
  }), r;
100
100
  }
101
101
  function Ve(e, t) {
102
- return S(e, ge(e, t), t);
102
+ return S(e, fe(e, t), t);
103
103
  }
104
104
  function Qe(e, t) {
105
105
  var r = N(t.prototype);
106
106
  t.cache.set(e, r);
107
107
  for (var s in e)
108
- le.call(e, s) && (r[s] = t.copier(e[s], t));
108
+ ue.call(e, s) && (r[s] = t.copier(e[s], t));
109
109
  return r;
110
110
  }
111
111
  function Fe(e, t) {
112
112
  var r = N(t.prototype);
113
113
  t.cache.set(e, r);
114
114
  for (var s in e)
115
- le.call(e, s) && (r[s] = t.copier(e[s], t));
115
+ ue.call(e, s) && (r[s] = t.copier(e[s], t));
116
116
  for (var a = B(e), o = 0, n = a.length, i = void 0; o < n; ++o)
117
117
  i = a[o], De.call(e, i) && (r[i] = t.copier(e[i], t));
118
118
  return r;
119
119
  }
120
- var Ge = ue ? Fe : Qe;
120
+ var Ge = le ? Fe : Qe;
121
121
  function Ue(e, t) {
122
122
  var r = N(t.prototype);
123
123
  return t.cache.set(e, r), S(e, r, t);
@@ -145,12 +145,12 @@ var Je = Array.isArray, V = Object.assign, He = Object.getPrototypeOf || (functi
145
145
  return e.__proto__;
146
146
  }), he = {
147
147
  array: ze,
148
- arrayBuffer: fe,
148
+ arrayBuffer: ge,
149
149
  blob: Le,
150
150
  dataView: Ne,
151
151
  date: Be,
152
152
  error: w,
153
- map: ge,
153
+ map: fe,
154
154
  object: Ge,
155
155
  regExp: Ke,
156
156
  set: pe
@@ -208,7 +208,7 @@ function ye(e) {
208
208
  return function(i) {
209
209
  return o(i, {
210
210
  Constructor: void 0,
211
- cache: ke(),
211
+ cache: je(),
212
212
  copier: o,
213
213
  prototype: void 0
214
214
  });
@@ -219,11 +219,11 @@ function Ze(e) {
219
219
  }
220
220
  Ze({});
221
221
  ye({});
222
- var v = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, j = { exports: {} }, F;
222
+ var v = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, A = { exports: {} }, F;
223
223
  function et() {
224
- if (F) return j.exports;
224
+ if (F) return A.exports;
225
225
  F = 1;
226
- var e = j.exports = {}, t, r;
226
+ var e = A.exports = {}, t, r;
227
227
  function s() {
228
228
  throw new Error("setTimeout has not been defined");
229
229
  }
@@ -272,20 +272,20 @@ function et() {
272
272
  }
273
273
  }
274
274
  }
275
- var i = [], c = !1, l, u = -1;
276
- function f() {
277
- !c || !l || (c = !1, l.length ? i = l.concat(i) : u = -1, i.length && g());
278
- }
275
+ var i = [], c = !1, u, l = -1;
279
276
  function g() {
277
+ !c || !u || (c = !1, u.length ? i = u.concat(i) : l = -1, i.length && f());
278
+ }
279
+ function f() {
280
280
  if (!c) {
281
- var p = o(f);
281
+ var p = o(g);
282
282
  c = !0;
283
283
  for (var m = i.length; m; ) {
284
- for (l = i, i = []; ++u < m; )
285
- l && l[u].run();
286
- u = -1, m = i.length;
284
+ for (u = i, i = []; ++l < m; )
285
+ u && u[l].run();
286
+ l = -1, m = i.length;
287
287
  }
288
- l = null, c = !1, n(p);
288
+ u = null, c = !1, n(p);
289
289
  }
290
290
  }
291
291
  e.nextTick = function(p) {
@@ -293,7 +293,7 @@ function et() {
293
293
  if (arguments.length > 1)
294
294
  for (var b = 1; b < arguments.length; b++)
295
295
  m[b - 1] = arguments[b];
296
- i.push(new y(p, m)), i.length === 1 && !c && o(g);
296
+ i.push(new y(p, m)), i.length === 1 && !c && o(f);
297
297
  };
298
298
  function y(p, m) {
299
299
  this.fun = p, this.array = m;
@@ -313,22 +313,22 @@ function et() {
313
313
  throw new Error("process.chdir is not supported");
314
314
  }, e.umask = function() {
315
315
  return 0;
316
- }, j.exports;
316
+ }, A.exports;
317
317
  }
318
318
  et();
319
- var k, G;
319
+ var j, G;
320
320
  function tt() {
321
- if (G) return k;
321
+ if (G) return j;
322
322
  G = 1;
323
323
  var e = typeof v == "object" && v && v.Object === Object && v;
324
- return k = e, k;
324
+ return j = e, j;
325
325
  }
326
- var A, U;
326
+ var k, U;
327
327
  function rt() {
328
- if (U) return A;
328
+ if (U) return k;
329
329
  U = 1;
330
330
  var e = tt(), t = typeof self == "object" && self && self.Object === Object && self, r = e || t || Function("return this")();
331
- return A = r, A;
331
+ return k = r, k;
332
332
  }
333
333
  var T, K;
334
334
  function me() {
@@ -346,11 +346,11 @@ function nt() {
346
346
  var i = r.call(n, a), c = n[a];
347
347
  try {
348
348
  n[a] = void 0;
349
- var l = !0;
349
+ var u = !0;
350
350
  } catch {
351
351
  }
352
- var u = s.call(n);
353
- return l && (i ? n[a] = c : delete n[a]), u;
352
+ var l = s.call(n);
353
+ return u && (i ? n[a] = c : delete n[a]), l;
354
354
  }
355
355
  return _ = o, _;
356
356
  }
@@ -420,29 +420,29 @@ function ct() {
420
420
  return M = t, M;
421
421
  }
422
422
  var z, re;
423
- function lt() {
423
+ function ut() {
424
424
  if (re) return z;
425
425
  re = 1;
426
426
  var e = de(), t = ct(), r = be(), s = "[object Object]", a = Function.prototype, o = Object.prototype, n = a.toString, i = o.hasOwnProperty, c = n.call(Object);
427
- function l(u) {
428
- if (!r(u) || e(u) != s)
427
+ function u(l) {
428
+ if (!r(l) || e(l) != s)
429
429
  return !1;
430
- var f = t(u);
431
- if (f === null)
430
+ var g = t(l);
431
+ if (g === null)
432
432
  return !0;
433
- var g = i.call(f, "constructor") && f.constructor;
434
- return typeof g == "function" && g instanceof g && n.call(g) == c;
433
+ var f = i.call(g, "constructor") && g.constructor;
434
+ return typeof f == "function" && f instanceof f && n.call(f) == c;
435
435
  }
436
- return z = l, z;
436
+ return z = u, z;
437
437
  }
438
- lt();
438
+ ut();
439
439
  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 }, $e = { 0: 8203, 1: 8204, 2: 8205, 3: 65279 };
440
440
  new Array(4).fill(String.fromCodePoint($e[0])).join("");
441
441
  Object.fromEntries(Object.entries($e).map((e) => e.reverse()));
442
442
  Object.fromEntries(Object.entries(ve).map((e) => e.reverse()));
443
443
  `${Object.values(ve).map((e) => `\\u{${e.toString(16)}}`).join("")}`;
444
444
  var E, ne;
445
- function ut() {
445
+ function lt() {
446
446
  if (ne) return E;
447
447
  ne = 1;
448
448
  var e = Object.prototype.hasOwnProperty, t = Object.prototype.toString;
@@ -459,10 +459,10 @@ function ut() {
459
459
  }, E;
460
460
  }
461
461
  var L, ie;
462
- function ft() {
462
+ function gt() {
463
463
  if (ie) return L;
464
464
  ie = 1;
465
- var e = ut();
465
+ var e = lt();
466
466
  L = t;
467
467
  function t(r, s, a) {
468
468
  if (arguments.length === 3)
@@ -514,8 +514,8 @@ function ft() {
514
514
  var i = Object.prototype.toString.call(n);
515
515
  return i === "[object Object]" || i === "[object Array]";
516
516
  }, (function n(i) {
517
- e(i, function(c, l) {
518
- o.push(String(l)), a(c) ? n(c) : s(c, t.compile(o)), o.pop();
517
+ e(i, function(c, u) {
518
+ o.push(String(u)), a(c) ? n(c) : s(c, t.compile(o)), o.pop();
519
519
  });
520
520
  })(r);
521
521
  }, t.has = function(r, s) {
@@ -539,9 +539,9 @@ function ft() {
539
539
  return r.length === 0 ? "" : "/" + r.map(t.escape).join("/");
540
540
  }, L;
541
541
  }
542
- ft();
542
+ gt();
543
543
  var $ = { exports: {} }, oe;
544
- function gt() {
544
+ function ft() {
545
545
  return oe || (oe = 1, (function(e, t) {
546
546
  t = e.exports = r, t.getSerialize = s;
547
547
  function r(a, o, n, i) {
@@ -549,19 +549,19 @@ function gt() {
549
549
  }
550
550
  function s(a, o) {
551
551
  var n = [], i = [];
552
- return o == null && (o = function(c, l) {
553
- return n[0] === l ? "[Circular ~]" : "[Circular ~." + i.slice(0, n.indexOf(l)).join(".") + "]";
554
- }), function(c, l) {
552
+ return o == null && (o = function(c, u) {
553
+ return n[0] === u ? "[Circular ~]" : "[Circular ~." + i.slice(0, n.indexOf(u)).join(".") + "]";
554
+ }), function(c, u) {
555
555
  if (n.length > 0) {
556
- var u = n.indexOf(this);
557
- ~u ? n.splice(u + 1) : n.push(this), ~u ? i.splice(u, 1 / 0, c) : i.push(c), ~n.indexOf(l) && (l = o.call(this, c, l));
558
- } else n.push(l);
559
- return a == null ? l : a.call(this, c, l);
556
+ var l = n.indexOf(this);
557
+ ~l ? n.splice(l + 1) : n.push(this), ~l ? i.splice(l, 1 / 0, c) : i.push(c), ~n.indexOf(u) && (u = o.call(this, c, u));
558
+ } else n.push(u);
559
+ return a == null ? u : a.call(this, c, u);
560
560
  };
561
561
  }
562
562
  })($, $.exports)), $.exports;
563
563
  }
564
- gt();
564
+ ft();
565
565
  class d {
566
566
  static _clientParams;
567
567
  // static getter
@@ -615,28 +615,28 @@ const pt = async ({
615
615
  "$slot: String!",
616
616
  "$limit: Int!",
617
617
  "$skip: Int!"
618
- ], l = {
618
+ ], u = {
619
619
  slot: e,
620
620
  limit: i,
621
621
  skip: (n - 1) * i
622
- }, u = ["{ slot: $slot }"];
623
- s && (c.push("$platform: String!"), l.platform = s, u.push("{ platform_contains_some: [$platform] }")), a && (c.push("$marketCode: String!"), l.marketCode = a, u.push(
622
+ }, l = ["{ slot: $slot }"];
623
+ s && (c.push("$platform: String!"), u.platform = s, l.push("{ platform_contains_some: [$platform] }")), a && (c.push("$marketCode: String!"), u.marketCode = a, l.push(
624
624
  "{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }"
625
- )), o && (c.push("$language: String!"), l.language = o, u.push(
625
+ )), o && (c.push("$language: String!"), u.language = o, l.push(
626
626
  "{ OR: [{ language_exists: false }, { language: { code: $language } }] }"
627
627
  ));
628
- const f = `(${c.join(", ")})`, g = `(
628
+ const g = `(${c.join(", ")})`, f = `(
629
629
  limit: $limit
630
630
  skip: $skip
631
631
  where: {
632
632
  AND: [
633
- ${u.join(`
633
+ ${l.join(`
634
634
  `)}
635
635
  ]
636
636
  }
637
637
  )`, y = `
638
- query${f} {
639
- bannerCollectionCollection${g} {
638
+ query${g} {
639
+ bannerCollectionCollection${f} {
640
640
  total
641
641
  items {
642
642
  sys {
@@ -658,7 +658,7 @@ query${f} {
658
658
  label
659
659
  url
660
660
  target
661
- includesMarketCode
661
+ marketHandling
662
662
  }
663
663
  media {
664
664
  url
@@ -672,7 +672,7 @@ query${f} {
672
672
  }
673
673
  }
674
674
  `, { bannerCollectionCollection: h } = await d.graphqlQuery(y, {
675
- ...l
675
+ ...u
676
676
  });
677
677
  return {
678
678
  page: n,
@@ -698,29 +698,29 @@ const ht = async ({
698
698
  const a = Math.max(1, Math.floor(r)), o = Math.max(1, Math.floor(s)), n = ["$limit: Int!", "$skip: Int!"], i = {
699
699
  limit: o,
700
700
  skip: (a - 1) * o
701
- }, c = ["limit: $limit", "skip: $skip"], l = [];
702
- e && (n.push("$marketCode: String!"), i.marketCode = e, l.push(
701
+ }, c = ["limit: $limit", "skip: $skip"], u = [];
702
+ e && (n.push("$marketCode: String!"), i.marketCode = e, u.push(
703
703
  "{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }"
704
- )), t && (n.push("$language: String!"), i.language = t, l.push(
704
+ )), t && (n.push("$language: String!"), i.language = t, u.push(
705
705
  "{ OR: [{ language_exists: false }, { language: { code: $language } }] }"
706
- )), l.length && c.push(`where: {
706
+ )), u.length && c.push(`where: {
707
707
  AND: [
708
- ${l.join(`
708
+ ${u.join(`
709
709
  `)}
710
710
  ]
711
711
  }`);
712
- const u = n.length ? `(${n.join(", ")})` : "", f = c.length ? `(
712
+ const l = n.length ? `(${n.join(", ")})` : "", g = c.length ? `(
713
713
  ${c.join(`
714
714
  `)}
715
- )` : "", g = `
716
- query${u} {
717
- blogPostCollection${f} {
715
+ )` : "", f = `
716
+ query${l} {
717
+ blogPostCollection${g} {
718
718
  total
719
719
  items {
720
720
  sys {
721
721
  id
722
- createdAt
723
- updatedAt
722
+ createdAt: firstPublishedAt
723
+ updatedAt: publishedAt
724
724
  }
725
725
  title
726
726
  shortDescription
@@ -738,7 +738,7 @@ query${u} {
738
738
  }
739
739
  }
740
740
  }
741
- `, { blogPostCollection: y } = await d.graphqlQuery(g, {
741
+ `, { blogPostCollection: y } = await d.graphqlQuery(f, {
742
742
  ...i
743
743
  });
744
744
  return {
@@ -773,14 +773,14 @@ query${u} {
773
773
  `)}
774
774
  ]
775
775
  }
776
- )`, l = `
776
+ )`, u = `
777
777
  query${i} {
778
778
  blogPostCollection${c} {
779
779
  items {
780
780
  sys {
781
781
  id
782
- createdAt
783
- updatedAt
782
+ createdAt: firstPublishedAt
783
+ updatedAt: publishedAt
784
784
  }
785
785
  title
786
786
  shortDescription
@@ -816,12 +816,12 @@ query${i} {
816
816
  }
817
817
  }
818
818
  }
819
- `, { blogPostCollection: u } = await d.graphqlQuery(l, {
819
+ `, { blogPostCollection: l } = await d.graphqlQuery(u, {
820
820
  ...o
821
- }), f = u.items.at(0);
822
- if (!f)
821
+ }), g = l.items.at(0);
822
+ if (!g)
823
823
  throw new Q();
824
- return f;
824
+ return g;
825
825
  }, mt = async ({
826
826
  page: e = 1,
827
827
  size: t = 20,
@@ -837,7 +837,7 @@ query${i} {
837
837
  )), s && (n.push("$language: String!"), i.language = s, c.push(
838
838
  "{ OR: [{ language_exists: false }, { language: { code: $language } }] }"
839
839
  ));
840
- const l = `(${n.join(", ")})`, u = c.length ? `(
840
+ const u = `(${n.join(", ")})`, l = c.length ? `(
841
841
  limit: $limit
842
842
  skip: $skip
843
843
  where: {
@@ -849,9 +849,9 @@ query${i} {
849
849
  )` : `(
850
850
  limit: $limit
851
851
  skip: $skip
852
- )`, f = `
853
- query${l} {
854
- brandCollectionCollection${u} {
852
+ )`, g = `
853
+ query${u} {
854
+ brandCollectionCollection${l} {
855
855
  total
856
856
  items {
857
857
  sys {
@@ -871,14 +871,14 @@ query${l} {
871
871
  }
872
872
  }
873
873
  }
874
- `, { brandCollectionCollection: g } = await d.graphqlQuery(f, {
874
+ `, { brandCollectionCollection: f } = await d.graphqlQuery(g, {
875
875
  ...i
876
876
  });
877
877
  return {
878
878
  page: a,
879
- total: g.total,
879
+ total: f.total,
880
880
  size: o,
881
- items: g.items
881
+ items: f.items
882
882
  };
883
883
  }, dt = async ({
884
884
  marketCode: e,
@@ -889,29 +889,29 @@ query${l} {
889
889
  const a = Math.max(1, Math.floor(r)), o = Math.max(1, Math.floor(s)), n = ["$limit: Int!", "$skip: Int!"], i = {
890
890
  limit: o,
891
891
  skip: (a - 1) * o
892
- }, c = ["limit: $limit", "skip: $skip"], l = [];
893
- e && (n.push("$marketCode: String!"), i.marketCode = e, l.push(
892
+ }, c = ["limit: $limit", "skip: $skip"], u = [];
893
+ e && (n.push("$marketCode: String!"), i.marketCode = e, u.push(
894
894
  "{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }"
895
- )), t && (n.push("$language: String!"), i.language = t, l.push(
895
+ )), t && (n.push("$language: String!"), i.language = t, u.push(
896
896
  "{ OR: [{ language_exists: false }, { language: { code: $language } }] }"
897
- )), l.length && c.push(`where: {
897
+ )), u.length && c.push(`where: {
898
898
  AND: [
899
- ${l.join(`
899
+ ${u.join(`
900
900
  `)}
901
901
  ]
902
902
  }`);
903
- const u = n.length ? `(${n.join(", ")})` : "", f = c.length ? `(
903
+ const l = n.length ? `(${n.join(", ")})` : "", g = c.length ? `(
904
904
  ${c.join(`
905
905
  `)}
906
- )` : "", g = `
907
- query${u} {
908
- documentationCategoryCollection${f} {
906
+ )` : "", f = `
907
+ query${l} {
908
+ documentationCategoryCollection${g} {
909
909
  total
910
910
  items {
911
911
  sys {
912
912
  id
913
- createdAt
914
- updatedAt
913
+ createdAt: firstPublishedAt
914
+ updatedAt: publishedAt
915
915
  }
916
916
  title
917
917
  slug
@@ -926,7 +926,7 @@ query${u} {
926
926
  }
927
927
  }
928
928
  }
929
- `, { documentationCategoryCollection: y } = await d.graphqlQuery(g, {
929
+ `, { documentationCategoryCollection: y } = await d.graphqlQuery(f, {
930
930
  ...i
931
931
  });
932
932
  return {
@@ -961,14 +961,14 @@ query${u} {
961
961
  `)}
962
962
  ]
963
963
  }
964
- )`, l = `
964
+ )`, u = `
965
965
  query${i} {
966
966
  documentationCategoryCollection${c} {
967
967
  items {
968
968
  sys {
969
969
  id
970
- createdAt
971
- updatedAt
970
+ createdAt: firstPublishedAt
971
+ updatedAt: publishedAt
972
972
  }
973
973
  title
974
974
  slug
@@ -983,12 +983,12 @@ query${i} {
983
983
  }
984
984
  }
985
985
  }
986
- `, { documentationCategoryCollection: u } = await d.graphqlQuery(l, {
986
+ `, { documentationCategoryCollection: l } = await d.graphqlQuery(u, {
987
987
  ...o
988
- }), f = u.items.at(0);
989
- if (!f)
988
+ }), g = l.items.at(0);
989
+ if (!g)
990
990
  throw new Q();
991
- return f;
991
+ return g;
992
992
  }, vt = async ({
993
993
  marketCode: e,
994
994
  language: t,
@@ -999,29 +999,29 @@ query${i} {
999
999
  const o = Math.max(1, Math.floor(s)), n = Math.max(1, Math.floor(a)), i = ["$limit: Int!", "$skip: Int!"], c = {
1000
1000
  limit: n,
1001
1001
  skip: (o - 1) * n
1002
- }, l = ["limit: $limit", "skip: $skip"], u = [];
1003
- e && (i.push("$marketCode: String!"), c.marketCode = e, u.push(
1002
+ }, u = ["limit: $limit", "skip: $skip"], l = [];
1003
+ e && (i.push("$marketCode: String!"), c.marketCode = e, l.push(
1004
1004
  "{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }"
1005
- )), t && (i.push("$language: String!"), c.language = t, u.push(
1005
+ )), t && (i.push("$language: String!"), c.language = t, l.push(
1006
1006
  "{ OR: [{ language_exists: false }, { language: { code: $language } }] }"
1007
- )), r && (i.push("$categorySlug: String!"), c.categorySlug = r, u.push("{ category: { slug: $categorySlug } }")), u.length && l.push(`where: {
1007
+ )), r && (i.push("$categorySlug: String!"), c.categorySlug = r, l.push("{ category: { slug: $categorySlug } }")), l.length && u.push(`where: {
1008
1008
  AND: [
1009
- ${u.join(`
1009
+ ${l.join(`
1010
1010
  `)}
1011
1011
  ]
1012
1012
  }`);
1013
- const f = i.length ? `(${i.join(", ")})` : "", g = l.length ? `(
1014
- ${l.join(`
1013
+ const g = i.length ? `(${i.join(", ")})` : "", f = u.length ? `(
1014
+ ${u.join(`
1015
1015
  `)}
1016
1016
  )` : "", y = `
1017
- query${f} {
1018
- documentationArticleCollection${g} {
1017
+ query${g} {
1018
+ documentationArticleCollection${f} {
1019
1019
  total
1020
1020
  items {
1021
1021
  sys {
1022
1022
  id
1023
- createdAt
1024
- updatedAt
1023
+ createdAt: firstPublishedAt
1024
+ updatedAt: publishedAt
1025
1025
  }
1026
1026
  title
1027
1027
  slug
@@ -1078,14 +1078,14 @@ query${f} {
1078
1078
  `)}
1079
1079
  ]
1080
1080
  }
1081
- )`, l = `
1081
+ )`, u = `
1082
1082
  query${i} {
1083
1083
  documentationArticleCollection${c} {
1084
1084
  items {
1085
1085
  sys {
1086
1086
  id
1087
- createdAt
1088
- updatedAt
1087
+ createdAt: firstPublishedAt
1088
+ updatedAt: publishedAt
1089
1089
  }
1090
1090
  title
1091
1091
  slug
@@ -1116,12 +1116,12 @@ query${i} {
1116
1116
  }
1117
1117
  }
1118
1118
  }
1119
- `, { documentationArticleCollection: u } = await d.graphqlQuery(l, {
1119
+ `, { documentationArticleCollection: l } = await d.graphqlQuery(u, {
1120
1120
  ...o
1121
- }), f = u.items.at(0);
1122
- if (!f)
1121
+ }), g = l.items.at(0);
1122
+ if (!g)
1123
1123
  throw new Q();
1124
- return f;
1124
+ return g;
1125
1125
  }, wt = async ({
1126
1126
  page: e = 1,
1127
1127
  size: t = 20,
@@ -1137,9 +1137,10 @@ query${i} {
1137
1137
  )), s && (n.push("$language: String!"), i.language = s, c.push(
1138
1138
  "{ OR: [{ language_exists: false }, { language: { code: $language } }] }"
1139
1139
  ));
1140
- const l = n.length ? `(${n.join(", ")})` : "", u = c.length ? `(
1140
+ const u = n.length ? `(${n.join(", ")})` : "", l = c.length ? `(
1141
1141
  limit: $limit
1142
1142
  skip: $skip
1143
+ order: order_ASC
1143
1144
  where: {
1144
1145
  AND: [
1145
1146
  ${c.join(`
@@ -1149,9 +1150,10 @@ query${i} {
1149
1150
  )` : `(
1150
1151
  limit: $limit
1151
1152
  skip: $skip
1152
- )`, f = `
1153
- query${l} {
1154
- hyperlinkCollectionCollection${u} {
1153
+ order: order_ASC
1154
+ )`, g = `
1155
+ query${u} {
1156
+ hyperlinkCollectionCollection${l} {
1155
1157
  total
1156
1158
  items {
1157
1159
  sys {
@@ -1168,23 +1170,23 @@ query${l} {
1168
1170
  label
1169
1171
  url
1170
1172
  target
1171
- includesMarketCode
1173
+ marketHandling
1172
1174
  }
1173
1175
  }
1174
1176
  }
1175
1177
  }
1176
1178
  }
1177
- `, { hyperlinkCollectionCollection: g } = await d.graphqlQuery(
1178
- f,
1179
+ `, { hyperlinkCollectionCollection: f } = await d.graphqlQuery(
1180
+ g,
1179
1181
  {
1180
1182
  ...i
1181
1183
  }
1182
1184
  );
1183
1185
  return {
1184
1186
  page: a,
1185
- total: g.total,
1187
+ total: f.total,
1186
1188
  size: o,
1187
- items: g.items
1189
+ items: f.items
1188
1190
  };
1189
1191
  }, St = async ({
1190
1192
  page: e = 1,
@@ -1201,7 +1203,7 @@ query${l} {
1201
1203
  )), s && (n.push("$language: String!"), i.language = s, c.push(
1202
1204
  "{ OR: [{ language_exists: false }, { language: { code: $language } }] }"
1203
1205
  ));
1204
- const l = `(${n.join(", ")})`, u = c.length ? `(
1206
+ const u = `(${n.join(", ")})`, l = c.length ? `(
1205
1207
  limit: $limit
1206
1208
  skip: $skip
1207
1209
  where: {
@@ -1213,9 +1215,9 @@ query${l} {
1213
1215
  )` : `(
1214
1216
  limit: $limit
1215
1217
  skip: $skip
1216
- )`, f = `
1217
- query${l} {
1218
- keywordCollectionCollection${u} {
1218
+ )`, g = `
1219
+ query${u} {
1220
+ keywordCollectionCollection${l} {
1219
1221
  total
1220
1222
  items {
1221
1223
  sys {
@@ -1227,26 +1229,26 @@ query${l} {
1227
1229
  }
1228
1230
  }
1229
1231
  }
1230
- `, { keywordCollectionCollection: g } = await d.graphqlQuery(f, {
1232
+ `, { keywordCollectionCollection: f } = await d.graphqlQuery(g, {
1231
1233
  ...i
1232
1234
  });
1233
1235
  return {
1234
1236
  page: a,
1235
- total: g.total,
1237
+ total: f.total,
1236
1238
  size: o,
1237
- items: g.items
1239
+ items: f.items
1238
1240
  };
1239
1241
  };
1240
1242
  export {
1241
1243
  d as ContentfulSDK,
1244
+ pt as getBannerCollections,
1242
1245
  yt as getBlogPostDetail,
1246
+ ht as getBlogPosts,
1247
+ mt as getBrandCollections,
1243
1248
  $t as getDocArticleDetail,
1249
+ vt as getDocArticles,
1250
+ dt as getDocCategories,
1244
1251
  bt as getDocCategoryDetail,
1245
- pt as listBannerCollections,
1246
- ht as listBlogPosts,
1247
- mt as listBrandCollections,
1248
- vt as listDocArticles,
1249
- dt as listDocCategories,
1250
- wt as listHyperlinkCollections,
1251
- St as listKeywordCollections
1252
+ wt as getHyperlinkCollections,
1253
+ St as getKeywordCollections
1252
1254
  };
@@ -91,7 +91,7 @@ export interface TypeHyperlinkFields {
91
91
  label: EntryFieldTypes.Symbol;
92
92
  url: EntryFieldTypes.Symbol;
93
93
  target: EntryFieldTypes.Symbol<"_blank" | "_self">;
94
- includesMarketCode: EntryFieldTypes.Boolean;
94
+ marketHandling: EntryFieldTypes.Symbol<"auto" | "manual">;
95
95
  }
96
96
  export type TypeHyperlinkSkeleton = EntrySkeletonType<TypeHyperlinkFields, "hyperlink">;
97
97
  export type TypeHyperlink<Modifiers extends ChainModifiers, Locales extends LocaleCode = LocaleCode> = Entry<TypeHyperlinkSkeleton, Modifiers, Locales>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janbox/contentful-marketplace-sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",