@uniformdev/context 12.2.1-alpha.123 → 12.2.1-alpha.129

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 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 Signal = components$1['schemas']['SignalWithId'];
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, Signal, SignalClient, SignalCriteria, SignalCriteriaGroup, SignalDeleteParameters, SignalGetParameters, SignalGetResponse, SignalPutParameters, StringMatch, nullLimitPolicy };
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 N,b as S,c as s,d as O}from"../chunk-5ZM3QNMG.mjs";import{d as a,e as r,f as o,i}from"../chunk-POAQ5JTB.mjs";i();i();var l,u=class extends s{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,n=this.createUrl(r(u,l),{...t,projectId:e});return await this.apiClient(n)}async upsert(t){let e=this.createUrl(r(u,l));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async remove(t){let e=this.createUrl(r(u,l));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}},C=u;l=new WeakMap,o(C,l,"/api/v2/aggregate");i();i();var j,I=class extends s{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,n=this.createUrl(r(I,j),{...t,projectId:e});return await this.apiClient(n)}},E=I;j=new WeakMap,o(E,j,"/api/v2/dimension");i();var h,d,c=class extends s{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,n=this.createUrl(r(c,h),{...t,projectId:e});return await this.apiClient(n)}async upsertCategory(t){let e=this.createUrl(r(c,h));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async removeCategory(t){let e=this.createUrl(r(c,h));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async upsertValue(t){let e=this.createUrl(r(c,d));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async removeValue(t){let e=this.createUrl(r(c,d));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}},f=c;h=new WeakMap,d=new WeakMap,o(f,h,"/api/v1/enrichments"),o(f,d,"/api/v1/enrichment-values");i();var P,y=class extends s{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,n=this.createUrl(r(y,P),{...t,projectId:e});return await this.apiClient(n)}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,o(U,P,"/api/v2/quirk");i();var g,x=class extends s{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,n=this.createUrl(r(x,g),{...t,projectId:e});return await this.apiClient(n)}async upsert(t){let e=this.createUrl(r(x,g));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async remove(t){let e=this.createUrl(r(x,g));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}},G=x;g=new WeakMap,o(G,g,"/api/v2/signal");var w=class{constructor(t){a(this,"enrichments");a(this,"aggregates");a(this,"dimensions");a(this,"manifest");a(this,"quirks");a(this,"signals");this.enrichments=new f(t),this.aggregates=new C(t),this.dimensions=new E(t),this.manifest=new O(t),this.quirks=new U(t),this.signals=new G(t)}};export{C as AggregateClient,S as ApiClientError,w as ContextClient,E as DimensionClient,f as EnrichmentClient,O as ManifestClient,U as QuirkClient,G as SignalClient,N as nullLimitPolicy};
1
+ import{a as N,b as S,c as s,d as O}from"../chunk-L5LAGROL.mjs";import{d as a,e as r,f as o,i}from"../chunk-KZPEO35A.mjs";i();i();var l,u=class extends s{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,n=this.createUrl(r(u,l),{...t,projectId:e});return await this.apiClient(n)}async upsert(t){let e=this.createUrl(r(u,l));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async remove(t){let e=this.createUrl(r(u,l));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}},C=u;l=new WeakMap,o(C,l,"/api/v2/aggregate");i();i();var j,I=class extends s{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,n=this.createUrl(r(I,j),{...t,projectId:e});return await this.apiClient(n)}},E=I;j=new WeakMap,o(E,j,"/api/v2/dimension");i();var h,d,c=class extends s{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,n=this.createUrl(r(c,h),{...t,projectId:e});return await this.apiClient(n)}async upsertCategory(t){let e=this.createUrl(r(c,h));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async removeCategory(t){let e=this.createUrl(r(c,h));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async upsertValue(t){let e=this.createUrl(r(c,d));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async removeValue(t){let e=this.createUrl(r(c,d));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}},f=c;h=new WeakMap,d=new WeakMap,o(f,h,"/api/v1/enrichments"),o(f,d,"/api/v1/enrichment-values");i();var P,y=class extends s{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,n=this.createUrl(r(y,P),{...t,projectId:e});return await this.apiClient(n)}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,o(U,P,"/api/v2/quirk");i();var g,x=class extends s{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,n=this.createUrl(r(x,g),{...t,projectId:e});return await this.apiClient(n)}async upsert(t){let e=this.createUrl(r(x,g));await this.apiClient(e,{method:"PUT",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}async remove(t){let e=this.createUrl(r(x,g));await this.apiClient(e,{method:"DELETE",body:JSON.stringify({...t,projectId:this.options.projectId}),expectNoContent:!0})}},G=x;g=new WeakMap,o(G,g,"/api/v2/signal");var w=class{constructor(t){a(this,"enrichments");a(this,"aggregates");a(this,"dimensions");a(this,"manifest");a(this,"quirks");a(this,"signals");this.enrichments=new f(t),this.aggregates=new C(t),this.dimensions=new E(t),this.manifest=new O(t),this.quirks=new U(t),this.signals=new G(t)}};export{C as AggregateClient,S as ApiClientError,w as ContextClient,E as DimensionClient,f as EnrichmentClient,O as ManifestClient,U as QuirkClient,G as SignalClient,N as nullLimitPolicy};
File without changes
@@ -1,2 +1,2 @@
1
- import{d as h,e as m,f as d,i as a}from"./chunk-POAQ5JTB.mjs";a();var x=async f=>await f(),p=class extends Error{constructor(t,e,i,n,r){super(`${t}
1
+ import{d as h,e as m,f as d,i as a}from"./chunk-KZPEO35A.mjs";a();var x=async f=>await f(),p=class extends Error{constructor(t,e,i,n,r){super(`${t}
2
2
  ${n}${r?" "+r:""} (${e} ${i})`);this.errorMessage=t;this.fetchMethod=e;this.fetchUri=i;this.statusCode=n;this.statusText=r;Object.setPrototypeOf(this,p.prototype)}};a();a();var u=class{constructor(t){h(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:x}}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 c=JSON.parse(o);c.errorMessage?s=Array.isArray(c.errorMessage)?c.errorMessage.join(", "):c.errorMessage:s=o}catch(c){s=o}}catch(o){s="General error"}throw new p(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 l,y=class extends u{constructor(t){super(t)}async get(t){let{projectId:e}=this.options,i=this.createUrl(m(y,l),{...t,projectId:e});return await this.apiClient(i)}},P=y;l=new WeakMap,d(P,l,"/api/v2/manifest");export{x as a,p as b,u as c,P as d};