@uniformdev/context 12.2.1-alpha.125 → 12.2.1-alpha.131
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/dist/api/api.d.ts +2 -5
- package/dist/api/api.mjs +1 -1
- package/dist/chunk-TRWANXVF.mjs +1 -0
- package/dist/chunk-WLJXJJSU.mjs +2 -0
- package/dist/cli/cli.js +20 -25
- package/dist/cli/cli.mjs +20 -25
- package/dist/index.esm.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +11 -10
- package/dist/chunk-5ZM3QNMG.mjs +0 -2
- package/dist/chunk-POAQ5JTB.mjs +0 -1
package/dist/api/api.d.ts
CHANGED
@@ -1380,17 +1380,14 @@ declare type QuirkDeleteParameters = QuirkDelete['requestBody']['content']['appl
|
|
1380
1380
|
declare type SignalGet = paths['/api/v2/signal']['get'];
|
1381
1381
|
declare type SignalGetParameters = SignalGet['parameters']['query'];
|
1382
1382
|
declare type SignalGetResponse = SignalGet['responses']['200']['content']['application/json'];
|
1383
|
-
declare type
|
1383
|
+
declare type SignalWithId = components$1['schemas']['SignalWithId'];
|
1384
1384
|
declare type RootSignalCriteriaGroup = components['schemas']['RootSignalCriteriaGroup'];
|
1385
|
-
declare type SignalCriteriaGroup = components['schemas']['SignalCriteriaGroup'];
|
1386
1385
|
declare type CookieCriteria = components['schemas']['CookieCriteria'];
|
1387
1386
|
declare type QueryStringCriteria = components['schemas']['QueryStringCriteria'];
|
1388
1387
|
declare type QuirkCriteria = components['schemas']['QuirkCriteria'];
|
1389
1388
|
declare type EventCriteria = components['schemas']['EventCriteria'];
|
1390
1389
|
declare type CurrentPageCriteria = components['schemas']['CurrentPageCriteria'];
|
1391
1390
|
declare type PageViewCountCriteria = components['schemas']['PageViewCountCriteria'];
|
1392
|
-
declare type SignalCriteria = components['schemas']['SignalCriteria'];
|
1393
|
-
declare type StringMatch = components['schemas']['StringMatch'];
|
1394
1391
|
declare type SignalPut = paths['/api/v2/signal']['put'];
|
1395
1392
|
declare type SignalPutParameters = SignalPut['requestBody']['content']['application/json'];
|
1396
1393
|
declare type SignalDelete = paths['/api/v2/signal']['delete'];
|
@@ -1507,4 +1504,4 @@ declare class ContextClient {
|
|
1507
1504
|
readonly signals: SignalClient;
|
1508
1505
|
}
|
1509
1506
|
|
1510
|
-
export { Aggregate, AggregateClient, AggregateDeleteParameters, AggregateGetParameters, AggregateGetResponse, AggregatePutParameters, ApiClientError, ClientOptions, ContextClient, CookieCriteria, CurrentPageCriteria, DimensionClient, DimensionDefinition, DimensionGetParameters, DimensionGetResponse, EnrichmentCategory, EnrichmentCategoryWithValues, EnrichmentClient, EnrichmentDeleteParameters, EnrichmentGetParameters, EnrichmentGetResponse, EnrichmentPutParameters, EnrichmentValue, EnrichmentValueDeleteParameters, EnrichmentValuePutParameters, EventCriteria, ExceptProject, LimitPolicy, ManifestClient, ManifestGetParameters, ManifestGetResponse, PageViewCountCriteria, QueryStringCriteria, Quirk, QuirkClient, QuirkCriteria, QuirkDeleteParameters, QuirkGetParameters, QuirkGetResponse, QuirkPutParameters, RootSignalCriteriaGroup,
|
1507
|
+
export { Aggregate, AggregateClient, AggregateDeleteParameters, AggregateGetParameters, AggregateGetResponse, AggregatePutParameters, ApiClientError, ClientOptions, ContextClient, CookieCriteria, CurrentPageCriteria, DimensionClient, DimensionDefinition, DimensionGetParameters, DimensionGetResponse, EnrichmentCategory, EnrichmentCategoryWithValues, EnrichmentClient, EnrichmentDeleteParameters, EnrichmentGetParameters, EnrichmentGetResponse, EnrichmentPutParameters, EnrichmentValue, EnrichmentValueDeleteParameters, EnrichmentValuePutParameters, EventCriteria, ExceptProject, LimitPolicy, ManifestClient, ManifestGetParameters, ManifestGetResponse, PageViewCountCriteria, QueryStringCriteria, Quirk, QuirkClient, QuirkCriteria, QuirkDeleteParameters, QuirkGetParameters, QuirkGetResponse, QuirkPutParameters, RootSignalCriteriaGroup, SignalClient, SignalDeleteParameters, SignalGetParameters, SignalGetResponse, SignalPutParameters, SignalWithId, nullLimitPolicy };
|
package/dist/api/api.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{a as
|
1
|
+
import{a as D,b as N,c as o,d as I}from"../chunk-WLJXJJSU.mjs";import{b as n,c as r,d as i}from"../chunk-TRWANXVF.mjs";var m,g=class extends o{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,s=this.createUrl(r(g,m),{...t,projectId:e});return await this.apiClient(s)}async upsert(t){let e=this.createUrl(r(g,m));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async remove(t){let e=this.createUrl(r(g,m));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}},x=g;m=new WeakMap,i(x,m,"/api/v2/aggregate");var E,G=class extends o{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,s=this.createUrl(r(G,E),{...t,projectId:e});return await this.apiClient(s)}},C=G;E=new WeakMap,i(C,E,"/api/v2/dimension");var l,f,a=class extends o{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,s=this.createUrl(r(a,l),{...t,projectId:e});return await this.apiClient(s)}async upsertCategory(t){let e=this.createUrl(r(a,l));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async removeCategory(t){let e=this.createUrl(r(a,l));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async upsertValue(t){let e=this.createUrl(r(a,f));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async removeValue(t){let e=this.createUrl(r(a,f));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}},u=a;l=new WeakMap,f=new WeakMap,i(u,l,"/api/v1/enrichments"),i(u,f,"/api/v1/enrichment-values");var h,d=class extends o{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,s=this.createUrl(r(d,h),{...t,projectId:e});return await this.apiClient(s)}async upsert(t){let e=this.createUrl(r(d,h));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async remove(t){let e=this.createUrl(r(d,h));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}},j=d;h=new WeakMap,i(j,h,"/api/v2/quirk");var P,y=class extends o{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,s=this.createUrl(r(y,P),{...t,projectId:e});return await this.apiClient(s)}async upsert(t){let e=this.createUrl(r(y,P));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async remove(t){let e=this.createUrl(r(y,P));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}},U=y;P=new WeakMap,i(U,P,"/api/v2/signal");var O=class{constructor(t){n(this,"enrichments");n(this,"aggregates");n(this,"dimensions");n(this,"manifest");n(this,"quirks");n(this,"signals");this.enrichments=new u(t),this.aggregates=new x(t),this.dimensions=new C(t),this.manifest=new I(t),this.quirks=new j(t),this.signals=new U(t)}};export{x as AggregateClient,N as ApiClientError,O as ContextClient,C as DimensionClient,u as EnrichmentClient,I as ManifestClient,j as QuirkClient,U as SignalClient,D as nullLimitPolicy};
|
@@ -0,0 +1 @@
|
|
1
|
+
var f=Object.defineProperty;var g=(a,b,c)=>b in a?f(a,b,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[b]=c;var h=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(b,c)=>(typeof require!="undefined"?require:b)[c]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+a+'" is not supported')});var i=(a,b,c)=>(g(a,typeof b!="symbol"?b+"":b,c),c),d=(a,b,c)=>{if(!b.has(a))throw TypeError("Cannot "+c)};var j=(a,b,c)=>(d(a,b,"read from private field"),c?c.call(a):b.get(a)),k=(a,b,c)=>{if(b.has(a))throw TypeError("Cannot add the same private member more than once");b instanceof WeakSet?b.add(a):b.set(a,c)},l=(a,b,c,e)=>(d(a,b,"write to private field"),e?e.call(a,c):b.set(a,c),c);var m=(a,b,c)=>(d(a,b,"access private method"),c);export{h as a,i as b,j as c,k as d,l as e,m as f};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{b as f,c as h,d as m}from"./chunk-TRWANXVF.mjs";var b=async y=>await y(),c=class extends Error{constructor(t,e,i,n,r){super(`${t}
|
2
|
+
${n}${r?" "+r:""} (${e} ${i})`);this.errorMessage=t;this.fetchMethod=e;this.fetchUri=i;this.statusCode=n;this.statusText=r;Object.setPrototypeOf(this,c.prototype)}};var l=class{constructor(t){f(this,"options");var e,i,n,r,s,o;if(!t.apiKey&&!t.bearerToken)throw new Error("You must provide an API key or a bearer token");this.options={...t,fetch:(e=t.fetch)!=null?e:fetch,apiHost:(i=t.apiHost)!=null?i:"https://uniform.app",apiKey:(n=t.apiKey)!=null?n:null,projectId:(r=t.projectId)!=null?r:null,bearerToken:(s=t.bearerToken)!=null?s:null,limitPolicy:(o=t.limitPolicy)!=null?o:b}}async apiClient(t,e){return this.options.limitPolicy(async()=>{var r;let i=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`},n=await fetch(t.toString(),{...e,headers:{...e==null?void 0:e.headers,...i}});if(!n.ok){let s="";try{let o=await n.text();try{let a=JSON.parse(o);a.errorMessage?s=Array.isArray(a.errorMessage)?a.errorMessage.join(", "):a.errorMessage:s=o}catch(a){s=o}}catch(o){s="General error"}throw new c(s,(r=e==null?void 0:e.method)!=null?r:"GET",t.toString(),n.status)}return(e==null?void 0:e.expectNoContent)?null:await n.json()})}createUrl(t,e){let i=new URL(`${this.options.apiHost}${t}`);return Object.entries(e!=null?e:{}).forEach(([n,r])=>{var s;typeof r!==void 0&&r!==null&&i.searchParams.append(n,(s=r==null?void 0:r.toString())!=null?s:"")}),i}};var p,u=class extends l{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,i=this.createUrl(h(u,p),{...t,projectId:e});return await this.apiClient(i)}},x=u;p=new WeakMap,m(x,p,"/api/v2/manifest");export{b as a,c as b,l as c,x as d};
|