@janbox/contentful-marketplace-sdk 1.0.3 → 1.0.4
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.
|
@@ -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" | "
|
|
13
|
+
} & Pick<HyperlinkEntry["fields"], "label" | "url" | "target" | "marketHandling">) | null;
|
|
14
14
|
media: {
|
|
15
15
|
url: string;
|
|
16
16
|
width: number | null;
|
|
@@ -8,7 +8,7 @@ export type HyperlinkCollectionGraphQLItem = {
|
|
|
8
8
|
linksCollection: {
|
|
9
9
|
items: Array<{
|
|
10
10
|
sys: GraphQLEntrySys;
|
|
11
|
-
} & Pick<HyperlinkEntry["fields"], "label" | "url" | "target" |
|
|
11
|
+
} & Pick<HyperlinkEntry["fields"], "label" | "url" | "target" | 'marketHandling'>>;
|
|
12
12
|
};
|
|
13
13
|
} & Pick<HyperlinkCollectionEntry["fields"], "name" | "slot" | "order">;
|
|
14
14
|
export type ListHyperlinkCollectionsResponse = {
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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}
|
|
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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var wt=Function.prototype.toString,C=Object.create,St=Object.prototype.toString,Ct=(function(){function t(){this._keys=[],this._values=[]}return t.prototype.has=function(e){return!!~this._keys.indexOf(e)},t.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},t.prototype.set=function(e,r){this._keys.push(e),this._values.push(r)},t})();function Ot(){return new Ct}function At(){return new WeakMap}var jt=typeof WeakMap<"u"?At:Ot;function B(t){if(!t)return C(null);var e=t.constructor;if(e===Object)return t===Object.prototype?{}:C(t);if(e&&~wt.call(e).indexOf("[native code]"))try{return new e}catch{}return C(t)}function kt(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}function Tt(t){return t.flags}var _t=/test/g.flags==="g"?Tt:kt;function at(t){var e=St.call(t);return e.substring(8,e.length-1)}function qt(t){return t[Symbol.toStringTag]||at(t)}var Pt=typeof Symbol<"u"?qt:at,xt=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,st=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols,ct=Object.prototype,lt=ct.hasOwnProperty,Rt=ct.propertyIsEnumerable,ut=typeof N=="function";function It(t){return st(t).concat(N(t))}var Mt=ut?It:st;function S(t,e,r){for(var s=Mt(t),a=0,o=s.length,n=void 0,i=void 0;a<o;++a)if(n=s[a],!(n==="callee"||n==="caller")){if(i=Dt(t,n),!i){e[n]=r.copier(t[n],r);continue}!i.get&&!i.set&&(i.value=r.copier(i.value,r));try{xt(e,n,i)}catch{e[n]=i.value}}return e}function zt(t,e){var r=new e.Constructor;e.cache.set(t,r);for(var s=0,a=t.length;s<a;++s)r[s]=e.copier(t[s],e);return r}function Et(t,e){var r=new e.Constructor;return e.cache.set(t,r),S(t,r,e)}function gt(t,e){return t.slice(0)}function Lt(t,e){return t.slice(0,t.size,t.type)}function Bt(t,e){return new e.Constructor(gt(t.buffer))}function Nt(t,e){return new e.Constructor(t.getTime())}function ft(t,e){var r=new e.Constructor;return e.cache.set(t,r),t.forEach(function(s,a){r.set(a,e.copier(s,e))}),r}function Vt(t,e){return S(t,ft(t,e),e)}function Qt(t,e){var r=B(e.prototype);e.cache.set(t,r);for(var s in t)lt.call(t,s)&&(r[s]=e.copier(t[s],e));return r}function Ft(t,e){var r=B(e.prototype);e.cache.set(t,r);for(var s in t)lt.call(t,s)&&(r[s]=e.copier(t[s],e));for(var a=N(t),o=0,n=a.length,i=void 0;o<n;++o)i=a[o],Rt.call(t,i)&&(r[i]=e.copier(t[i],e));return r}var Gt=ut?Ft:Qt;function Ut(t,e){var r=B(e.prototype);return e.cache.set(t,r),S(t,r,e)}function O(t,e){return new e.Constructor(t.valueOf())}function Kt(t,e){var r=new e.Constructor(t.source,_t(t));return r.lastIndex=t.lastIndex,r}function w(t,e){return t}function pt(t,e){var r=new e.Constructor;return e.cache.set(t,r),t.forEach(function(s){r.add(e.copier(s,e))}),r}function Wt(t,e){return S(t,pt(t,e),e)}var Jt=Array.isArray,V=Object.assign,Ht=Object.getPrototypeOf||(function(t){return t.__proto__}),ht={array:zt,arrayBuffer:gt,blob:Lt,dataView:Bt,date:Nt,error:w,map:ft,object:Gt,regExp:Kt,set:pt},Yt=V({},ht,{array:Et,map:Vt,object:Ut,set:Wt});function Xt(t){return{Arguments:t.object,Array:t.array,ArrayBuffer:t.arrayBuffer,Blob:t.blob,Boolean:O,DataView:t.dataView,Date:t.date,Error:t.error,Float32Array:t.arrayBuffer,Float64Array:t.arrayBuffer,Int8Array:t.arrayBuffer,Int16Array:t.arrayBuffer,Int32Array:t.arrayBuffer,Map:t.map,Number:O,Object:t.object,Promise:w,RegExp:t.regExp,Set:t.set,String:O,WeakMap:w,WeakSet:w,Uint8Array:t.arrayBuffer,Uint8ClampedArray:t.arrayBuffer,Uint16Array:t.arrayBuffer,Uint32Array:t.arrayBuffer,Uint64Array:t.arrayBuffer}}function yt(t){var e=V({},ht,t),r=Xt(e),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=Ht(n),i.Constructor=i.prototype&&i.prototype.constructor,!i.Constructor||i.Constructor===Object)return a(n,i);if(Jt(n))return s(n,i);var c=r[Pt(n)];return c?c(n,i):typeof n.then=="function"?n:a(n,i)}return function(i){return o(i,{Constructor:void 0,cache:jt(),copier:o,prototype:void 0})}}function Zt(t){return yt(V({},Yt,t))}Zt({});yt({});var v=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},A={exports:{}},F;function te(){if(F)return A.exports;F=1;var t=A.exports={},e,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"?e=setTimeout:e=s}catch{e=s}try{typeof clearTimeout=="function"?r=clearTimeout:r=a}catch{r=a}})();function o(p){if(e===setTimeout)return setTimeout(p,0);if((e===s||!e)&&setTimeout)return e=setTimeout,setTimeout(p,0);try{return e(p,0)}catch{try{return e.call(null,p,0)}catch{return e.call(this,p,0)}}}function 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)}}t.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)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function h(){}return t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(p){return[]},t.binding=function(p){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(p){throw new Error("process.chdir is not supported")},t.umask=function(){return 0},A.exports}te();var j,G;function ee(){if(G)return j;G=1;var t=typeof v=="object"&&v&&v.Object===Object&&v;return j=t,j}var k,U;function re(){if(U)return k;U=1;var t=ee(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return k=r,k}var T,K;function mt(){if(K)return T;K=1;var t=re(),e=t.Symbol;return T=e,T}var _,W;function ne(){if(W)return _;W=1;var t=mt(),e=Object.prototype,r=e.hasOwnProperty,s=e.toString,a=t?t.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 ie(){if(J)return q;J=1;var t=Object.prototype,e=t.toString;function r(s){return e.call(s)}return q=r,q}var P,H;function dt(){if(H)return P;H=1;var t=mt(),e=ne(),r=ie(),s="[object Null]",a="[object Undefined]",o=t?t.toStringTag:void 0;function n(i){return i==null?i===void 0?a:s:o&&o in Object(i)?e(i):r(i)}return P=n,P}var x,Y;function oe(){if(Y)return x;Y=1;var t=Array.isArray;return x=t,x}var D,X;function bt(){if(X)return D;X=1;function t(e){return e!=null&&typeof e=="object"}return D=t,D}var R,Z;function ae(){if(Z)return R;Z=1;var t=dt(),e=oe(),r=bt(),s="[object String]";function a(o){return typeof o=="string"||!e(o)&&r(o)&&t(o)==s}return R=a,R}ae();var I,tt;function se(){if(tt)return I;tt=1;function t(e,r){return function(s){return e(r(s))}}return I=t,I}var M,et;function ce(){if(et)return M;et=1;var t=se(),e=t(Object.getPrototypeOf,Object);return M=e,M}var z,rt;function le(){if(rt)return z;rt=1;var t=dt(),e=ce(),r=bt(),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)||t(u)!=s)return!1;var g=e(u);if(g===null)return!0;var f=i.call(g,"constructor")&&g.constructor;return typeof f=="function"&&f instanceof f&&n.call(f)==c}return z=l,z}le();var vt={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},$t={0:8203,1:8204,2:8205,3:65279};new Array(4).fill(String.fromCodePoint($t[0])).join("");Object.fromEntries(Object.entries($t).map(t=>t.reverse()));Object.fromEntries(Object.entries(vt).map(t=>t.reverse()));`${Object.values(vt).map(t=>`\\u{${t.toString(16)}}`).join("")}`;var E,nt;function ue(){if(nt)return E;nt=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString;return E=function(r,s,a){if(e.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)t.call(r,i)&&s.call(a,r[i],i,r)},E}var L,it;function ge(){if(it)return L;it=1;var t=ue();L=e;function e(r,s,a){if(arguments.length===3)return e.set(r,s,a);if(arguments.length===2)return e.get(r,s);var o=e.bind(e,r);for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n].bind(o,r));return o}return e.get=function(r,s){for(var a=Array.isArray(s)?s:e.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},e.set=function(r,s,a){var o=Array.isArray(s)?s:e.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},e.remove=function(r,s){var a=Array.isArray(s)?s:e.parse(s),o=a[a.length-1];if(o===void 0)throw new Error('Invalid JSON pointer for remove: "'+s+'"');var n=e.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]},e.dict=function(r,s){var a={};return e.walk(r,function(o,n){a[n]=o},s),a},e.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){t(i,function(c,l){o.push(String(l)),a(c)?n(c):s(c,e.compile(o)),o.pop()})})(r)},e.has=function(r,s){try{e.get(r,s)}catch{return!1}return!0},e.escape=function(r){return r.toString().replace(/~/g,"~0").replace(/\//g,"~1")},e.unescape=function(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")},e.parse=function(r){if(r==="")return[];if(r.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+r);return r.substring(1).split(/\//).map(e.unescape)},e.compile=function(r){return r.length===0?"":"/"+r.map(e.escape).join("/")},L}ge();var $={exports:{}},ot;function fe(){return ot||(ot=1,(function(t,e){e=t.exports=r,e.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}fe();class m{static _clientParams;static get clientParams(){if(!this._clientParams)throw new Error("Client is not configured");return this._clientParams}static configure(e){this._clientParams={...e,environment:e.environment??"master"}}static async graphqlQuery(e,r={}){const{space: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:e,variables:r})});if(!n.ok){const c=await n.text();throw new Error(`GraphQL request failed: ${n.status} ${n.statusText}
|
|
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 pe=async({slot:t,page:e=1,size:r=20,platform:s,marketCode:a,language:o})=>{const n=Math.max(1,Math.floor(e)),i=Math.max(1,Math.floor(r)),c=["$slot: String!","$limit: Int!","$skip: Int!"],l={slot:t,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
|
|
5
5
|
where: {
|
|
@@ -32,7 +32,7 @@ query${g} {
|
|
|
32
32
|
label
|
|
33
33
|
url
|
|
34
34
|
target
|
|
35
|
-
|
|
35
|
+
marketHandling
|
|
36
36
|
}
|
|
37
37
|
media {
|
|
38
38
|
url
|
|
@@ -45,7 +45,7 @@ query${g} {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
`,{bannerCollectionCollection:h}=await m.graphqlQuery(y,{...l});return{page:n,total:h.total,size:i,items:h.items}};class Q extends Response{constructor(...
|
|
48
|
+
`,{bannerCollectionCollection:h}=await m.graphqlQuery(y,{...l});return{page:n,total:h.total,size:i,items:h.items}};class Q extends Response{constructor(...e){super(e[0]??"Not Found",{status:404,...e[1]})}}const he=async({marketCode:t,language:e,page:r=1,size:s=20}={})=>{const a=Math.max(1,Math.floor(r)),o=Math.max(1,Math.floor(s)),n=["$limit: Int!","$skip: Int!"],i={limit:o,skip:(a-1)*o},c=["limit: $limit","skip: $skip"],l=[];t&&(n.push("$marketCode: String!"),i.marketCode=t,l.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),e&&(n.push("$language: String!"),i.language=e,l.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }")),l.length&&c.push(`where: {
|
|
49
49
|
AND: [
|
|
50
50
|
${l.join(`
|
|
51
51
|
`)}
|
|
@@ -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
|
|
@@ -79,7 +79,7 @@ query${u} {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
`,{blogPostCollection:y}=await m.graphqlQuery(f,{...i});return{page:a,total:y.total,size:o,items:y.items}},
|
|
82
|
+
`,{blogPostCollection:y}=await m.graphqlQuery(f,{...i});return{page:a,total:y.total,size:o,items:y.items}},ye=async({id:t,slug:e,marketCode:r,language:s})=>{const a=[],o={},n=[];if(t)a.push("$id: String!"),o.id=t,n.push("{ sys: { id: $id } }");else if(e)a.push("$slug: String!"),o.slug=e,n.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");r&&(a.push("$marketCode: String!"),o.marketCode=r,n.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),s&&(a.push("$language: String!"),o.language=s,n.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const i=`(${a.join(", ")})`,c=`(
|
|
83
83
|
limit: 1
|
|
84
84
|
where: {
|
|
85
85
|
AND: [
|
|
@@ -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
|
|
@@ -130,7 +130,7 @@ query${i} {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
`,{blogPostCollection:u}=await m.graphqlQuery(l,{...o}),g=u.items.at(0);if(!g)throw new Q;return g},
|
|
133
|
+
`,{blogPostCollection:u}=await m.graphqlQuery(l,{...o}),g=u.items.at(0);if(!g)throw new Q;return g},me=async({page:t=1,size:e=20,marketCode:r,language:s}={})=>{const a=Math.max(1,Math.floor(t)),o=Math.max(1,Math.floor(e)),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.join(", ")})`,u=c.length?`(
|
|
134
134
|
limit: $limit
|
|
135
135
|
skip: $skip
|
|
136
136
|
where: {
|
|
@@ -164,7 +164,7 @@ query${l} {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
`,{brandCollectionCollection:f}=await m.graphqlQuery(g,{...i});return{page:a,total:f.total,size:o,items:f.items}},
|
|
167
|
+
`,{brandCollectionCollection:f}=await m.graphqlQuery(g,{...i});return{page:a,total:f.total,size:o,items:f.items}},de=async({marketCode:t,language:e,page:r=1,size:s=20}={})=>{const a=Math.max(1,Math.floor(r)),o=Math.max(1,Math.floor(s)),n=["$limit: Int!","$skip: Int!"],i={limit:o,skip:(a-1)*o},c=["limit: $limit","skip: $skip"],l=[];t&&(n.push("$marketCode: String!"),i.marketCode=t,l.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),e&&(n.push("$language: String!"),i.language=e,l.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }")),l.length&&c.push(`where: {
|
|
168
168
|
AND: [
|
|
169
169
|
${l.join(`
|
|
170
170
|
`)}
|
|
@@ -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
|
|
@@ -195,7 +195,7 @@ query${u} {
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
`,{documentationCategoryCollection:y}=await m.graphqlQuery(f,{...i});return{page:a,total:y.total,size:o,items:y.items}},
|
|
198
|
+
`,{documentationCategoryCollection:y}=await m.graphqlQuery(f,{...i});return{page:a,total:y.total,size:o,items:y.items}},be=async({id:t,slug:e,marketCode:r,language:s})=>{const a=[],o={},n=[];if(t)a.push("$id: String!"),o.id=t,n.push("{ sys: { id: $id } }");else if(e)a.push("$slug: String!"),o.slug=e,n.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");r&&(a.push("$marketCode: String!"),o.marketCode=r,n.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),s&&(a.push("$language: String!"),o.language=s,n.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const i=`(${a.join(", ")})`,c=`(
|
|
199
199
|
limit: 1
|
|
200
200
|
where: {
|
|
201
201
|
AND: [
|
|
@@ -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
|
|
@@ -225,7 +225,7 @@ query${i} {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
`,{documentationCategoryCollection:u}=await m.graphqlQuery(l,{...o}),g=u.items.at(0);if(!g)throw new Q;return g},
|
|
228
|
+
`,{documentationCategoryCollection:u}=await m.graphqlQuery(l,{...o}),g=u.items.at(0);if(!g)throw new Q;return g},ve=async({marketCode:t,language:e,categorySlug:r,page:s=1,size:a=20}={})=>{const o=Math.max(1,Math.floor(s)),n=Math.max(1,Math.floor(a)),i=["$limit: Int!","$skip: Int!"],c={limit:n,skip:(o-1)*n},l=["limit: $limit","skip: $skip"],u=[];t&&(i.push("$marketCode: String!"),c.marketCode=t,u.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),e&&(i.push("$language: String!"),c.language=e,u.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }")),r&&(i.push("$categorySlug: String!"),c.categorySlug=r,u.push("{ category: { slug: $categorySlug } }")),u.length&&l.push(`where: {
|
|
229
229
|
AND: [
|
|
230
230
|
${u.join(`
|
|
231
231
|
`)}
|
|
@@ -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
|
|
@@ -263,7 +263,7 @@ query${g} {
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
`,{documentationArticleCollection:h}=await m.graphqlQuery(y,{...c});return{page:o,total:h.total,size:n,items:h.items}},$
|
|
266
|
+
`,{documentationArticleCollection:h}=await m.graphqlQuery(y,{...c});return{page:o,total:h.total,size:n,items:h.items}},$e=async({id:t,slug:e,marketCode:r,language:s})=>{const a=[],o={},n=[];if(t)a.push("$id: String!"),o.id=t,n.push("{ sys: { id: $id } }");else if(e)a.push("$slug: String!"),o.slug=e,n.push("{ slug: $slug }");else throw new Error("Either id or slug is required.");r&&(a.push("$marketCode: String!"),o.marketCode=r,n.push("{ OR: [{ market_exists: false }, { market: { code: $marketCode } }] }")),s&&(a.push("$language: String!"),o.language=s,n.push("{ OR: [{ language_exists: false }, { language: { code: $language } }] }"));const i=`(${a.join(", ")})`,c=`(
|
|
267
267
|
limit: 1
|
|
268
268
|
where: {
|
|
269
269
|
AND: [
|
|
@@ -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
|
|
@@ -309,7 +309,7 @@ query${i} {
|
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
`,{documentationArticleCollection:u}=await m.graphqlQuery(l,{...o}),g=u.items.at(0);if(!g)throw new Q;return g},
|
|
312
|
+
`,{documentationArticleCollection:u}=await m.graphqlQuery(l,{...o}),g=u.items.at(0);if(!g)throw new Q;return g},we=async({page:t=1,size:e=20,marketCode:r,language:s}={})=>{const a=Math.max(1,Math.floor(t)),o=Math.max(1,Math.floor(e)),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
315
|
where: {
|
|
@@ -340,13 +340,13 @@ query${l} {
|
|
|
340
340
|
label
|
|
341
341
|
url
|
|
342
342
|
target
|
|
343
|
-
|
|
343
|
+
marketHandling
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
`,{hyperlinkCollectionCollection:f}=await m.graphqlQuery(g,{...i});return{page:a,total:f.total,size:o,items:f.items}},
|
|
349
|
+
`,{hyperlinkCollectionCollection:f}=await m.graphqlQuery(g,{...i});return{page:a,total:f.total,size:o,items:f.items}},Se=async({page:t=1,size:e=20,marketCode:r,language:s}={})=>{const a=Math.max(1,Math.floor(t)),o=Math.max(1,Math.floor(e)),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.join(", ")})`,u=c.length?`(
|
|
350
350
|
limit: $limit
|
|
351
351
|
skip: $skip
|
|
352
352
|
where: {
|
|
@@ -372,4 +372,4 @@ query${l} {
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
`,{keywordCollectionCollection:f}=await m.graphqlQuery(g,{...i});return{page:a,total:f.total,size:o,items:f.items}};exports.ContentfulSDK=m;exports.getBlogPostDetail=
|
|
375
|
+
`,{keywordCollectionCollection:f}=await m.graphqlQuery(g,{...i});return{page:a,total:f.total,size:o,items:f.items}};exports.ContentfulSDK=m;exports.getBlogPostDetail=ye;exports.getDocArticleDetail=$e;exports.getDocCategoryDetail=be;exports.listBannerCollections=pe;exports.listBlogPosts=he;exports.listBrandCollections=me;exports.listDocArticles=ve;exports.listDocCategories=de;exports.listHyperlinkCollections=we;exports.listKeywordCollections=Se;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var we = Function.prototype.toString,
|
|
1
|
+
var we = Function.prototype.toString, O = Object.create, Se = Object.prototype.toString, Oe = (
|
|
2
2
|
/** @class */
|
|
3
3
|
(function() {
|
|
4
4
|
function e() {
|
|
@@ -13,34 +13,34 @@ var we = Function.prototype.toString, C = Object.create, Se = Object.prototype.t
|
|
|
13
13
|
}, e;
|
|
14
14
|
})()
|
|
15
15
|
);
|
|
16
|
-
function
|
|
17
|
-
return new
|
|
16
|
+
function Ce() {
|
|
17
|
+
return new Oe();
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Ae() {
|
|
20
20
|
return /* @__PURE__ */ new WeakMap();
|
|
21
21
|
}
|
|
22
|
-
var
|
|
22
|
+
var je = typeof WeakMap < "u" ? Ae : Ce;
|
|
23
23
|
function N(e) {
|
|
24
24
|
if (!e)
|
|
25
|
-
return
|
|
25
|
+
return O(null);
|
|
26
26
|
var t = e.constructor;
|
|
27
27
|
if (t === Object)
|
|
28
|
-
return e === Object.prototype ? {} :
|
|
28
|
+
return e === Object.prototype ? {} : O(e);
|
|
29
29
|
if (t && ~we.call(t).indexOf("[native code]"))
|
|
30
30
|
try {
|
|
31
31
|
return new t();
|
|
32
32
|
} catch {
|
|
33
33
|
}
|
|
34
|
-
return
|
|
34
|
+
return O(e);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
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 :
|
|
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);
|
|
@@ -122,7 +122,7 @@ function Ue(e, t) {
|
|
|
122
122
|
var r = N(t.prototype);
|
|
123
123
|
return t.cache.set(e, r), S(e, r, t);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function C(e, t) {
|
|
126
126
|
return new t.Constructor(e.valueOf());
|
|
127
127
|
}
|
|
128
128
|
function Ke(e, t) {
|
|
@@ -166,7 +166,7 @@ function Xe(e) {
|
|
|
166
166
|
Array: e.array,
|
|
167
167
|
ArrayBuffer: e.arrayBuffer,
|
|
168
168
|
Blob: e.blob,
|
|
169
|
-
Boolean:
|
|
169
|
+
Boolean: C,
|
|
170
170
|
DataView: e.dataView,
|
|
171
171
|
Date: e.date,
|
|
172
172
|
Error: e.error,
|
|
@@ -176,12 +176,12 @@ function Xe(e) {
|
|
|
176
176
|
Int16Array: e.arrayBuffer,
|
|
177
177
|
Int32Array: e.arrayBuffer,
|
|
178
178
|
Map: e.map,
|
|
179
|
-
Number:
|
|
179
|
+
Number: C,
|
|
180
180
|
Object: e.object,
|
|
181
181
|
Promise: w,
|
|
182
182
|
RegExp: e.regExp,
|
|
183
183
|
Set: e.set,
|
|
184
|
-
String:
|
|
184
|
+
String: C,
|
|
185
185
|
WeakMap: w,
|
|
186
186
|
WeakSet: w,
|
|
187
187
|
Uint8Array: e.arrayBuffer,
|
|
@@ -208,7 +208,7 @@ function ye(e) {
|
|
|
208
208
|
return function(i) {
|
|
209
209
|
return o(i, {
|
|
210
210
|
Constructor: void 0,
|
|
211
|
-
cache:
|
|
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 : {},
|
|
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
|
|
224
|
+
if (F) return A.exports;
|
|
225
225
|
F = 1;
|
|
226
|
-
var e =
|
|
226
|
+
var e = A.exports = {}, t, r;
|
|
227
227
|
function s() {
|
|
228
228
|
throw new Error("setTimeout has not been defined");
|
|
229
229
|
}
|
|
@@ -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
|
-
},
|
|
316
|
+
}, A.exports;
|
|
317
317
|
}
|
|
318
318
|
et();
|
|
319
|
-
var
|
|
319
|
+
var j, G;
|
|
320
320
|
function tt() {
|
|
321
|
-
if (G) return
|
|
321
|
+
if (G) return j;
|
|
322
322
|
G = 1;
|
|
323
323
|
var e = typeof v == "object" && v && v.Object === Object && v;
|
|
324
|
-
return
|
|
324
|
+
return j = e, j;
|
|
325
325
|
}
|
|
326
|
-
var
|
|
326
|
+
var k, U;
|
|
327
327
|
function rt() {
|
|
328
|
-
if (U) return
|
|
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
|
|
331
|
+
return k = r, k;
|
|
332
332
|
}
|
|
333
333
|
var T, K;
|
|
334
334
|
function me() {
|
|
@@ -658,7 +658,7 @@ query${f} {
|
|
|
658
658
|
label
|
|
659
659
|
url
|
|
660
660
|
target
|
|
661
|
-
|
|
661
|
+
marketHandling
|
|
662
662
|
}
|
|
663
663
|
media {
|
|
664
664
|
url
|
|
@@ -719,8 +719,8 @@ query${u} {
|
|
|
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
|
|
@@ -779,8 +779,8 @@ query${i} {
|
|
|
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
|
|
@@ -910,8 +910,8 @@ query${u} {
|
|
|
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
|
|
@@ -967,8 +967,8 @@ query${i} {
|
|
|
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
|
|
@@ -1020,8 +1020,8 @@ query${f} {
|
|
|
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
|
|
@@ -1084,8 +1084,8 @@ query${i} {
|
|
|
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
|
|
@@ -1168,7 +1168,7 @@ query${l} {
|
|
|
1168
1168
|
label
|
|
1169
1169
|
url
|
|
1170
1170
|
target
|
|
1171
|
-
|
|
1171
|
+
marketHandling
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
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>;
|