@uniformdev/optimize-common
Advanced tools
Comparing version 12.2.1-alpha.107 to 12.2.1-alpha.121
@@ -1,2 +0,2 @@ | ||
var y=(r=>(r[r.Antimatter=0]="Antimatter",r[r.Tangential=5]="Tangential",r[r.Weak=25]="Weak",r[r.Normal=50]="Normal",r[r.Strong=75]="Strong",r[r.Strongest=100]="Strongest",r[r.Boost=1e3]="Boost",r))(y||{});function C(n){return(n==null?void 0:n.intents)?Object.keys(n==null?void 0:n.intents).reduce((e,t)=>{let i=n.intents[t];return(i==null?void 0:i.noBeh)||(e[t]=i),e},{}):{}}function V(n){return(n==null?void 0:n.intents)?Object.keys(n==null?void 0:n.intents).reduce((e,t)=>{let i=n.intents[t];return(i==null?void 0:i.noPn)||(e[t]=i),e},{}):{}}import h from"p-throttle";import x from"p-retry";function f({throttle:n={interval:1e3,limit:10},retry:e={retries:1,factor:1.66}}){let t=n?h(n):null;return function(a){let o=async()=>await a();if(t&&(o=t(o)),e){let s=o;o=()=>x(s,e)}return o()}}var u=class extends Error{constructor(e,t,i,a,o){super(`${e} | ||
${a}${o?" "+o:""} (${t} ${i})`);this.errorMessage=e;this.fetchMethod=t;this.fetchUri=i;this.statusCode=a;this.statusText=o;Object.setPrototypeOf(this,u.prototype)}};var m=class{constructor(e){var t,i,a,o,s,r;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");this.options={...e,fetch:(t=e.fetch)!=null?t:fetch,apiHost:(i=e.apiHost)!=null?i:"https://uniform.app",apiKey:(a=e.apiKey)!=null?a:null,projectId:(o=e.projectId)!=null?o:null,bearerToken:(s=e.bearerToken)!=null?s:null,limitPolicy:(r=e.limitPolicy)!=null?r:f({})}}async apiClient(e,t){return this.options.limitPolicy(async()=>{var o;let i=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},a=await fetch(e.toString(),{...t,headers:{...t==null?void 0:t.headers,...i}});if(!a.ok){let s="";try{let r=await a.text();try{let g=JSON.parse(r);g.errorMessage?s=Array.isArray(g.errorMessage)?g.errorMessage.join(", "):g.errorMessage:s=r}catch(g){s=r}}catch(r){s="General error"}throw new u(s,(o=t==null?void 0:t.method)!=null?o:"GET",e.toString(),a.status)}return(t==null?void 0:t.expectNoContent)?null:await a.json()})}createUrl(e,t){let i=new URL(`${this.options.apiHost}${e}`);return Object.entries(t!=null?t:{}).forEach(([a,o])=>{var s;typeof o!==void 0&&o!==null&&i.searchParams.append(a,(s=o==null?void 0:o.toString())!=null?s:"")}),i}};var d=class extends m{constructor(e){super(e)}async getEnrichments(e){let{projectId:t}=this.options,i=this.createUrl("/api/v1/enrichments",{...e,projectId:t});return await this.apiClient(i)}async upsertEnrichmentCategory(e){let t=this.createUrl("/api/v1/enrichments");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentCategory(e){let t=this.createUrl("/api/v1/enrichments");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertEnrichmentValue(e){let t=this.createUrl("/api/v1/enrichment-values");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentValue(e){let t=this.createUrl("/api/v1/enrichment-values");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};var p=(r=>(r.Cookie="CK",r.Event="EVT",r.Behavior="BEH",r.LandingPage="LP",r.PageViewCount="PVW",r.PageVisited="PVI",r.QueryString="QS",r))(p||{}),S=(i=>(i.OncePerVisit="visit",i.Once="once",i.Always="always",i))(S||{}),P=(t=>(t.Visit="visit",t.Visitor="visitor",t))(P||{});function N(n){return n.type==p.Cookie}function G(n){return n.type==p.Event}function z(n){return n.type==p.Behavior}function X(n){return n.type==p.LandingPage}function ee(n){return n.type==p.PageViewCount}function re(n){return n.type==p.PageVisited}function pe(n){return n.type==p.QueryString}function le(n,e){var a,o,s,r;let t=n,i=e==null?void 0:e.expr;switch(((a=e==null?void 0:e.cs)!=null?a:!1)||([t,i]=E(t,i)),(o=e==null?void 0:e.type)!=null?o:"exact"){case"exact":return t===i;case"notexact":return t!==i;case"contains":return i&&(s=t==null?void 0:t.includes(i))!=null?s:!1;case"notcontains":return i?!((r=t==null?void 0:t.includes(i))!=null?r:!0):!0;case"exists":return n!==null&&typeof n!="undefined";case"notexists":return n===null||typeof n=="undefined";default:return console.warn(`Unknown string match type ${e.type} will be ignored.`),!1}}function E(...n){return n.map(e=>e==null?void 0:e.toUpperCase())}export{d as EnrichmentClient,y as IntentTagStrength,P as Scope,S as SignalFrequency,p as SignalType,C as getBehaviorIntents,V as getPersonalizationIntents,z as isBehaviorSignal,N as isCookieSignal,G as isEventSignal,X as isLandingPageSignal,ee as isPageViewCountSignal,re as isPageVisitedSignal,pe as isQueryStringSignal,le as isStringMatch}; | ||
var g=(i=>(i[i.Antimatter=0]="Antimatter",i[i.Tangential=5]="Tangential",i[i.Weak=25]="Weak",i[i.Normal=50]="Normal",i[i.Strong=75]="Strong",i[i.Strongest=100]="Strongest",i[i.Boost=1e3]="Boost",i))(g||{});function C(r){return(r==null?void 0:r.intents)?Object.keys(r==null?void 0:r.intents).reduce((e,t)=>{let n=r.intents[t];return(n==null?void 0:n.noBeh)||(e[t]=n),e},{}):{}}function b(r){return(r==null?void 0:r.intents)?Object.keys(r==null?void 0:r.intents).reduce((e,t)=>{let n=r.intents[t];return(n==null?void 0:n.noPn)||(e[t]=n),e},{}):{}}import y from"p-throttle";import x from"p-retry";function f({throttle:r={interval:1e3,limit:10},retry:e={retries:1,factor:1.66}}){let t=r?y(r):null;return function(a){let o=async()=>await a();if(t&&(o=t(o)),e){let s=o;o=()=>x(s,e)}return o()}}var u=class extends Error{constructor(e,t,n,a,o){super(`${e} | ||
${a}${o?" "+o:""} (${t} ${n})`);this.errorMessage=e;this.fetchMethod=t;this.fetchUri=n;this.statusCode=a;this.statusText=o;Object.setPrototypeOf(this,u.prototype)}};var m=class{constructor(e){var t,n,a,o,s,i;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");this.options={...e,fetch:(t=e.fetch)!=null?t:fetch,apiHost:(n=e.apiHost)!=null?n:"https://uniform.app",apiKey:(a=e.apiKey)!=null?a:null,projectId:(o=e.projectId)!=null?o:null,bearerToken:(s=e.bearerToken)!=null?s:null,limitPolicy:(i=e.limitPolicy)!=null?i:f({})}}async apiClient(e,t){return this.options.limitPolicy(async()=>{var o;let n=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},a=await fetch(e.toString(),{...t,headers:{...t==null?void 0:t.headers,...n}});if(!a.ok){let s="";try{let i=await a.text();try{let l=JSON.parse(i);l.errorMessage?s=Array.isArray(l.errorMessage)?l.errorMessage.join(", "):l.errorMessage:s=i}catch(l){s=i}}catch(i){s="General error"}throw new u(s,(o=t==null?void 0:t.method)!=null?o:"GET",e.toString(),a.status)}return(t==null?void 0:t.expectNoContent)?null:await a.json()})}createUrl(e,t){let n=new URL(`${this.options.apiHost}${e}`);return Object.entries(t!=null?t:{}).forEach(([a,o])=>{var s;typeof o!==void 0&&o!==null&&n.searchParams.append(a,(s=o==null?void 0:o.toString())!=null?s:"")}),n}};var h=class extends m{constructor(e){super(e)}async getEnrichments(e){let{projectId:t}=this.options,n=this.createUrl("/api/v1/enrichments",{...e,projectId:t});return await this.apiClient(n)}async upsertEnrichmentCategory(e){let t=this.createUrl("/api/v1/enrichments");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentCategory(e){let t=this.createUrl("/api/v1/enrichments");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertEnrichmentValue(e){let t=this.createUrl("/api/v1/enrichment-values");await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentValue(e){let t=this.createUrl("/api/v1/enrichment-values");await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};var d=(i=>(i.Cookie="CK",i.Event="EVT",i.Behavior="BEH",i.LandingPage="LP",i.PageViewCount="PVW",i.PageVisited="PVI",i.QueryString="QS",i))(d||{}),P=(n=>(n.OncePerVisit="visit",n.Once="once",n.Always="always",n))(P||{}),S=(t=>(t.Visit="visit",t.Visitor="visitor",t))(S||{});function B(r){return r.type=="CK"}function A(r){return r.type=="EVT"}function D(r){return r.type=="BEH"}function H(r){return r.type=="LP"}function Q(r){return r.type=="PVW"}function z(r){return r.type=="PVI"}function F(r){return r.type=="QS"}function X(r,e){var a,o,s,i;let t=r,n=e==null?void 0:e.expr;switch(((a=e==null?void 0:e.cs)!=null?a:!1)||([t,n]=E(t,n)),(o=e==null?void 0:e.type)!=null?o:"exact"){case"exact":return t===n;case"notexact":return t!==n;case"contains":return n&&(s=t==null?void 0:t.includes(n))!=null?s:!1;case"notcontains":return n?!((i=t==null?void 0:t.includes(n))!=null?i:!0):!0;case"exists":return r!==null&&typeof r!="undefined";case"notexists":return r===null||typeof r=="undefined";default:return console.warn(`Unknown string match type ${e.type} will be ignored.`),!1}}function E(...r){return r.map(e=>e==null?void 0:e.toUpperCase())}export{h as EnrichmentClient,g as IntentTagStrength,S as Scope,P as SignalFrequency,d as SignalType,C as getBehaviorIntents,b as getPersonalizationIntents,D as isBehaviorSignal,B as isCookieSignal,A as isEventSignal,H as isLandingPageSignal,Q as isPageViewCountSignal,z as isPageVisitedSignal,F as isQueryStringSignal,X as isStringMatch}; |
@@ -1,2 +0,2 @@ | ||
var V=Object.create;var u=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var f=t=>u(t,"__esModule",{value:!0});var j=(t,e)=>{f(t);for(var n in e)u(t,n,{get:e[n],enumerable:!0})},M=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of w(e))!T.call(t,i)&&i!=="default"&&u(t,i,{get:()=>e[i],enumerable:!(n=b(e,i))||n.enumerable});return t},y=t=>M(f(u(t!=null?V(k(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);j(exports,{EnrichmentClient:()=>P,IntentTagStrength:()=>h,Scope:()=>C,SignalFrequency:()=>E,SignalType:()=>p,getBehaviorIntents:()=>O,getPersonalizationIntents:()=>R,isBehaviorSignal:()=>I,isCookieSignal:()=>v,isEventSignal:()=>L,isLandingPageSignal:()=>U,isPageViewCountSignal:()=>B,isPageVisitedSignal:()=>A,isQueryStringSignal:()=>N,isStringMatch:()=>$});var h=(r=>(r[r.Antimatter=0]="Antimatter",r[r.Tangential=5]="Tangential",r[r.Weak=25]="Weak",r[r.Normal=50]="Normal",r[r.Strong=75]="Strong",r[r.Strongest=100]="Strongest",r[r.Boost=1e3]="Boost",r))(h||{});function O(t){return(t==null?void 0:t.intents)?Object.keys(t==null?void 0:t.intents).reduce((e,n)=>{let i=t.intents[n];return(i==null?void 0:i.noBeh)||(e[n]=i),e},{}):{}}function R(t){return(t==null?void 0:t.intents)?Object.keys(t==null?void 0:t.intents).reduce((e,n)=>{let i=t.intents[n];return(i==null?void 0:i.noPn)||(e[n]=i),e},{}):{}}var x=y(require("p-throttle")),d=y(require("p-retry"));function S({throttle:t={interval:1e3,limit:10},retry:e={retries:1,factor:1.66}}){let n=t?(0,x.default)(t):null;return function(a){let o=async()=>await a();if(n&&(o=n(o)),e){let s=o;o=()=>(0,d.default)(s,e)}return o()}}var g=class extends Error{constructor(e,n,i,a,o){super(`${e} | ||
${a}${o?" "+o:""} (${n} ${i})`);this.errorMessage=e;this.fetchMethod=n;this.fetchUri=i;this.statusCode=a;this.statusText=o;Object.setPrototypeOf(this,g.prototype)}};var m=class{constructor(e){var n,i,a,o,s,r;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");this.options={...e,fetch:(n=e.fetch)!=null?n:fetch,apiHost:(i=e.apiHost)!=null?i:"https://uniform.app",apiKey:(a=e.apiKey)!=null?a:null,projectId:(o=e.projectId)!=null?o:null,bearerToken:(s=e.bearerToken)!=null?s:null,limitPolicy:(r=e.limitPolicy)!=null?r:S({})}}async apiClient(e,n){return this.options.limitPolicy(async()=>{var o;let i=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},a=await fetch(e.toString(),{...n,headers:{...n==null?void 0:n.headers,...i}});if(!a.ok){let s="";try{let r=await a.text();try{let l=JSON.parse(r);l.errorMessage?s=Array.isArray(l.errorMessage)?l.errorMessage.join(", "):l.errorMessage:s=r}catch(l){s=r}}catch(r){s="General error"}throw new g(s,(o=n==null?void 0:n.method)!=null?o:"GET",e.toString(),a.status)}return(n==null?void 0:n.expectNoContent)?null:await a.json()})}createUrl(e,n){let i=new URL(`${this.options.apiHost}${e}`);return Object.entries(n!=null?n:{}).forEach(([a,o])=>{var s;typeof o!==void 0&&o!==null&&i.searchParams.append(a,(s=o==null?void 0:o.toString())!=null?s:"")}),i}};var P=class extends m{constructor(e){super(e)}async getEnrichments(e){let{projectId:n}=this.options,i=this.createUrl("/api/v1/enrichments",{...e,projectId:n});return await this.apiClient(i)}async upsertEnrichmentCategory(e){let n=this.createUrl("/api/v1/enrichments");await this.apiClient(n,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentCategory(e){let n=this.createUrl("/api/v1/enrichments");await this.apiClient(n,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertEnrichmentValue(e){let n=this.createUrl("/api/v1/enrichment-values");await this.apiClient(n,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentValue(e){let n=this.createUrl("/api/v1/enrichment-values");await this.apiClient(n,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};var p=(r=>(r.Cookie="CK",r.Event="EVT",r.Behavior="BEH",r.LandingPage="LP",r.PageViewCount="PVW",r.PageVisited="PVI",r.QueryString="QS",r))(p||{}),E=(i=>(i.OncePerVisit="visit",i.Once="once",i.Always="always",i))(E||{}),C=(n=>(n.Visit="visit",n.Visitor="visitor",n))(C||{});function v(t){return t.type==p.Cookie}function L(t){return t.type==p.Event}function I(t){return t.type==p.Behavior}function U(t){return t.type==p.LandingPage}function B(t){return t.type==p.PageViewCount}function A(t){return t.type==p.PageVisited}function N(t){return t.type==p.QueryString}function $(t,e){var a,o,s,r;let n=t,i=e==null?void 0:e.expr;switch(((a=e==null?void 0:e.cs)!=null?a:!1)||([n,i]=Q(n,i)),(o=e==null?void 0:e.type)!=null?o:"exact"){case"exact":return n===i;case"notexact":return n!==i;case"contains":return i&&(s=n==null?void 0:n.includes(i))!=null?s:!1;case"notcontains":return i?!((r=n==null?void 0:n.includes(i))!=null?r:!0):!0;case"exists":return t!==null&&typeof t!="undefined";case"notexists":return t===null||typeof t=="undefined";default:return console.warn(`Unknown string match type ${e.type} will be ignored.`),!1}}function Q(...t){return t.map(e=>e==null?void 0:e.toUpperCase())}0&&(module.exports={EnrichmentClient,IntentTagStrength,Scope,SignalFrequency,SignalType,getBehaviorIntents,getPersonalizationIntents,isBehaviorSignal,isCookieSignal,isEventSignal,isLandingPageSignal,isPageViewCountSignal,isPageVisitedSignal,isQueryStringSignal,isStringMatch}); | ||
var V=Object.create;var u=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var f=t=>u(t,"__esModule",{value:!0});var T=(t,e)=>{for(var r in e)u(t,r,{get:e[r],enumerable:!0})},g=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of j(e))!O.call(t,s)&&(r||s!=="default")&&u(t,s,{get:()=>e[s],enumerable:!(n=w(e,s))||n.enumerable});return t},y=(t,e)=>g(f(u(t!=null?V(k(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),R=(t=>(e,r)=>t&&t.get(e)||(r=g(f({}),e,1),t&&t.set(e,r),r))(typeof WeakMap!="undefined"?new WeakMap:0);var H={};T(H,{EnrichmentClient:()=>S,IntentTagStrength:()=>x,Scope:()=>b,SignalFrequency:()=>C,SignalType:()=>E,getBehaviorIntents:()=>v,getPersonalizationIntents:()=>L,isBehaviorSignal:()=>I,isCookieSignal:()=>M,isEventSignal:()=>U,isLandingPageSignal:()=>B,isPageViewCountSignal:()=>N,isPageVisitedSignal:()=>A,isQueryStringSignal:()=>$,isStringMatch:()=>D});var x=(i=>(i[i.Antimatter=0]="Antimatter",i[i.Tangential=5]="Tangential",i[i.Weak=25]="Weak",i[i.Normal=50]="Normal",i[i.Strong=75]="Strong",i[i.Strongest=100]="Strongest",i[i.Boost=1e3]="Boost",i))(x||{});function v(t){return(t==null?void 0:t.intents)?Object.keys(t==null?void 0:t.intents).reduce((e,r)=>{let n=t.intents[r];return(n==null?void 0:n.noBeh)||(e[r]=n),e},{}):{}}function L(t){return(t==null?void 0:t.intents)?Object.keys(t==null?void 0:t.intents).reduce((e,r)=>{let n=t.intents[r];return(n==null?void 0:n.noPn)||(e[r]=n),e},{}):{}}var h=y(require("p-throttle")),d=y(require("p-retry"));function P({throttle:t={interval:1e3,limit:10},retry:e={retries:1,factor:1.66}}){let r=t?(0,h.default)(t):null;return function(s){let o=async()=>await s();if(r&&(o=r(o)),e){let a=o;o=()=>(0,d.default)(a,e)}return o()}}var l=class extends Error{constructor(e,r,n,s,o){super(`${e} | ||
${s}${o?" "+o:""} (${r} ${n})`);this.errorMessage=e;this.fetchMethod=r;this.fetchUri=n;this.statusCode=s;this.statusText=o;Object.setPrototypeOf(this,l.prototype)}};var m=class{constructor(e){var r,n,s,o,a,i;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");this.options={...e,fetch:(r=e.fetch)!=null?r:fetch,apiHost:(n=e.apiHost)!=null?n:"https://uniform.app",apiKey:(s=e.apiKey)!=null?s:null,projectId:(o=e.projectId)!=null?o:null,bearerToken:(a=e.bearerToken)!=null?a:null,limitPolicy:(i=e.limitPolicy)!=null?i:P({})}}async apiClient(e,r){return this.options.limitPolicy(async()=>{var o;let n=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},s=await fetch(e.toString(),{...r,headers:{...r==null?void 0:r.headers,...n}});if(!s.ok){let a="";try{let i=await s.text();try{let c=JSON.parse(i);c.errorMessage?a=Array.isArray(c.errorMessage)?c.errorMessage.join(", "):c.errorMessage:a=i}catch(c){a=i}}catch(i){a="General error"}throw new l(a,(o=r==null?void 0:r.method)!=null?o:"GET",e.toString(),s.status)}return(r==null?void 0:r.expectNoContent)?null:await s.json()})}createUrl(e,r){let n=new URL(`${this.options.apiHost}${e}`);return Object.entries(r!=null?r:{}).forEach(([s,o])=>{var a;typeof o!==void 0&&o!==null&&n.searchParams.append(s,(a=o==null?void 0:o.toString())!=null?a:"")}),n}};var S=class extends m{constructor(e){super(e)}async getEnrichments(e){let{projectId:r}=this.options,n=this.createUrl("/api/v1/enrichments",{...e,projectId:r});return await this.apiClient(n)}async upsertEnrichmentCategory(e){let r=this.createUrl("/api/v1/enrichments");await this.apiClient(r,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentCategory(e){let r=this.createUrl("/api/v1/enrichments");await this.apiClient(r,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertEnrichmentValue(e){let r=this.createUrl("/api/v1/enrichment-values");await this.apiClient(r,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeEnrichmentValue(e){let r=this.createUrl("/api/v1/enrichment-values");await this.apiClient(r,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};var E=(i=>(i.Cookie="CK",i.Event="EVT",i.Behavior="BEH",i.LandingPage="LP",i.PageViewCount="PVW",i.PageVisited="PVI",i.QueryString="QS",i))(E||{}),C=(n=>(n.OncePerVisit="visit",n.Once="once",n.Always="always",n))(C||{}),b=(r=>(r.Visit="visit",r.Visitor="visitor",r))(b||{});function M(t){return t.type=="CK"}function U(t){return t.type=="EVT"}function I(t){return t.type=="BEH"}function B(t){return t.type=="LP"}function N(t){return t.type=="PVW"}function A(t){return t.type=="PVI"}function $(t){return t.type=="QS"}function D(t,e){var s,o,a,i;let r=t,n=e==null?void 0:e.expr;switch(((s=e==null?void 0:e.cs)!=null?s:!1)||([r,n]=G(r,n)),(o=e==null?void 0:e.type)!=null?o:"exact"){case"exact":return r===n;case"notexact":return r!==n;case"contains":return n&&(a=r==null?void 0:r.includes(n))!=null?a:!1;case"notcontains":return n?!((i=r==null?void 0:r.includes(n))!=null?i:!0):!0;case"exists":return t!==null&&typeof t!="undefined";case"notexists":return t===null||typeof t=="undefined";default:return console.warn(`Unknown string match type ${e.type} will be ignored.`),!1}}function G(...t){return t.map(e=>e==null?void 0:e.toUpperCase())}module.exports=R(H);0&&(module.exports={EnrichmentClient,IntentTagStrength,Scope,SignalFrequency,SignalType,getBehaviorIntents,getPersonalizationIntents,isBehaviorSignal,isCookieSignal,isEventSignal,isLandingPageSignal,isPageViewCountSignal,isPageVisitedSignal,isQueryStringSignal,isStringMatch}); |
{ | ||
"name": "@uniformdev/optimize-common", | ||
"version": "12.2.1-alpha.107+b30768d5", | ||
"version": "12.2.1-alpha.121+3d33c2be", | ||
"description": "Common functionality and types for Uniform Optimize", | ||
@@ -29,12 +29,12 @@ "license": "SEE LICENSE IN LICENSE.txt", | ||
"devDependencies": { | ||
"@types/jest": "27.0.3", | ||
"@types/node": "16.11.18", | ||
"eslint": "8.4.1", | ||
"eslint-plugin-react": "7.27.1", | ||
"@types/jest": "27.4.0", | ||
"@types/node": "16.11.19", | ||
"eslint": "8.6.0", | ||
"eslint-plugin-react": "7.28.0", | ||
"eslint-plugin-react-hooks": "4.3.0", | ||
"jest": "27.4.5", | ||
"jest": "27.4.7", | ||
"npm-run-all": "4.1.5", | ||
"rimraf": "3.0.2", | ||
"ts-jest": "27.1.1", | ||
"tsup": "5.11.10" | ||
"ts-jest": "27.1.2", | ||
"tsup": "5.11.11" | ||
}, | ||
@@ -51,3 +51,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "b30768d5d58d4c75b390274042724d50c1ee1041" | ||
"gitHead": "3d33c2be484210ce3f056e80176fc6f56b69dabc" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
696
44444