@distilled.cloud/xata 1.0.0-rc.18 → 1.0.0-rc.20

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.
@@ -1,2 +1,2 @@
1
- import{errors$API_ERRORS as e,errors$BadGateway as t,errors$BadRequest as n,errors$ConfigError as r,errors$Conflict as i,errors$DEFAULT_ERRORS as a,errors$Forbidden as o,errors$GatewayTimeout as s,errors$HTTP_STATUS_MAP as c,errors$InternalServerError as ee,errors$Locked as te,errors$NotFound as ne,errors$ServiceUnavailable as re,errors$TooManyRequests as ie,errors$Unauthorized as ae,errors$UnprocessableEntity as oe,protocol_rest$RawResponse as l,protocol_rest$RawResponseRoot as u,protocol_rest$SensitiveValue as d,protocol_rest$makeRestProtocol as f,protocol_rest$rawResponseRootSymbol as p,protocol_rest$rawResponseSymbol as m,protocol_rest$sensitiveValueSymbol as h,schema_lite$Array as g,schema_lite$Boolean as _,schema_lite$NullOr as v,schema_lite$Number as y,schema_lite$Record as b,schema_lite$String as x,schema_lite$Struct as S,schema_lite$TaggedError as C,schema_lite$Unknown as w,schema_lite$at as T,schema_lite$optional as E,schema_lite$suspend as D}from"@distilled.cloud/core/_bundle/rest";import{api$D as O,api$call as k,api$error as A,api$named as j,api$newError as M,api$op as N,category$withAuthError as P,category$withBadRequestError as F,category$withConflictError as I,category$withParseError as L,category$withServerError as R,retry$capped as z,retry$jittered as B,retry$makeDefault as V,retry$throttlingFactory as H,retry$throttlingOptions as U,retry$transientFactory as W,retry$transientOptions as G,schema_lite_typed$String as K,schema_lite_typed$TaggedError as q,schema_lite_typed$Unknown as J,schema_lite_typed$optional as Y,trait$Body as se,trait$FormDataFile as ce,trait$Header as le,trait$Http as ue,trait$HttpBody as de,trait$KeyDictionary as fe,trait$Label as pe,trait$Query as me,trait$ResponseCode as he,trait$UnionCases as ge,trait$applyErrorMatchers as _e,trait$bodySymbol as ve,trait$errorMatchersSymbol as ye,trait$formDataFileSymbol as be,trait$getErrorMatchers as xe,trait$headerSymbol as Se,trait$httpBodySymbol as Ce,trait$httpSymbol as we,trait$keyDictionarySymbol as Te,trait$labelSymbol as Ee,trait$querySymbol as De,trait$responseCodeSymbol as Oe,trait$unionCasesSymbol as ke}from"@distilled.cloud/core/_bundle/base";import*as X from"effect/Context";import*as Z from"effect/Effect";import*as Q from"effect/Layer";import*as $ from"effect/Redacted";const Ae=`https://api.xata.tech`;var Credentials=class extends (/*@__PURE__*/ X.Service()(`XataCredentials`)){};const fromApiKey=e=>Q.succeed(Credentials,Z.succeed({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl??`https://api.xata.tech`}));const je=/*@__PURE__*/ Q.succeed(Credentials,/*@__PURE__*/ Z.gen(function*(){const e=process.env.XATA_API_KEY;if(!e)return yield*new r({message:`XATA_API_KEY environment variable is required`});return{apiKey:$.make(e),apiBaseUrl:process.env.XATA_API_BASE_URL??`https://api.xata.tech`}}));var UnknownXataError=class extends (/*@__PURE__*/ q()(`UnknownXataError`,{code:/*@__PURE__*/ Y(K),message:/*@__PURE__*/ Y(K),body:J}).pipe(R)){};var XataParseError=class extends (/*@__PURE__*/ q()(`XataParseError`,{body:J,cause:J}).pipe(L)){};const Me=/*@__PURE__*/ f({credentials:/*@__PURE__*/ Z.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${$.value(e.apiKey)}`}),unknownError:({code:e,message:t,body:n})=>new UnknownXataError({code:typeof e===`string`?e:e!==void 0?String(e):void 0,message:t,body:n}),parseError:({body:e,cause:t})=>new XataParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ X.Service()(`XataRetry`)){};const policy=e=>Z.provide(Q.succeed(Retry,e));const Ne=/*@__PURE__*/ Z.provide(/*@__PURE__*/ Q.succeed(Retry,{while:()=>false}));const Pe=/*@__PURE__*/ policy(H);const Fe=/*@__PURE__*/ policy(W);export{g as Jb,_ as Kb,v as Rb,y as Sb,b as Tb,x as Vb,S as Wb,C as Yb,O as a,w as ac,k as c,T as cc,Credentials as credentials$Credentials,je as credentials$CredentialsFromEnv,Ae as credentials$DEFAULT_API_BASE_URL,fromApiKey as credentials$fromApiKey,A as e,e as errors$API_ERRORS,t as errors$BadGateway,n as errors$BadRequest,r as errors$ConfigError,i as errors$Conflict,a as errors$DEFAULT_ERRORS,o as errors$Forbidden,s as errors$GatewayTimeout,c as errors$HTTP_STATUS_MAP,ee as errors$InternalServerError,te as errors$Locked,ne as errors$NotFound,re as errors$ServiceUnavailable,ie as errors$TooManyRequests,ae as errors$Unauthorized,UnknownXataError as errors$UnknownXataError,oe as errors$UnprocessableEntity,XataParseError as errors$XataParseError,E as hc,D as ic,j,M as k,N as l,Me as protocol$XataProtocol,Retry as retry$Retry,z as retry$capped,B as retry$jittered,V as retry$makeDefault,Ne as retry$none,policy as retry$policy,Pe as retry$throttling,H as retry$throttlingFactory,U as retry$throttlingOptions,Fe as retry$transient,W as retry$transientFactory,G as retry$transientOptions,se as traits$Body,ce as traits$FormDataFile,le as traits$Header,ue as traits$Http,de as traits$HttpBody,fe as traits$KeyDictionary,pe as traits$Label,me as traits$Query,l as traits$RawResponse,u as traits$RawResponseRoot,he as traits$ResponseCode,d as traits$SensitiveValue,ge as traits$UnionCases,_e as traits$applyErrorMatchers,ve as traits$bodySymbol,ye as traits$errorMatchersSymbol,be as traits$formDataFileSymbol,xe as traits$getErrorMatchers,Se as traits$headerSymbol,Ce as traits$httpBodySymbol,we as traits$httpSymbol,Te as traits$keyDictionarySymbol,Ee as traits$labelSymbol,De as traits$querySymbol,p as traits$rawResponseRootSymbol,m as traits$rawResponseSymbol,Oe as traits$responseCodeSymbol,h as traits$sensitiveValueSymbol,ke as traits$unionCasesSymbol,P as va,F as wa,I as za};
1
+ import{errors$API_ERRORS as e,errors$BadGateway as t,errors$BadRequest as n,errors$ConfigError as r,errors$Conflict as i,errors$DEFAULT_ERRORS as ee,errors$Forbidden as a,errors$GatewayTimeout as te,errors$HTTP_STATUS_MAP as ne,errors$InternalServerError as re,errors$Locked as ie,errors$NotFound as ae,errors$ServiceUnavailable as o,errors$TooManyRequests as s,errors$Unauthorized as c,errors$UnknownErrorFields as l,errors$UnprocessableEntity as u,protocol_rest$RawResponse as d,protocol_rest$RawResponseRoot as f,protocol_rest$SensitiveValue as p,protocol_rest$makeRestProtocol as m,protocol_rest$rawResponseRootSymbol as h,protocol_rest$rawResponseSymbol as g,protocol_rest$sensitiveValueSymbol as _,protocol_rest$unknownErrorProps as v,schema_lite$Array as y,schema_lite$Boolean as b,schema_lite$NullOr as x,schema_lite$Number as S,schema_lite$Record as C,schema_lite$String as w,schema_lite$Struct as T,schema_lite$TaggedError as E,schema_lite$Unknown as D,schema_lite$at as O,schema_lite$optional as k,schema_lite$suspend as A}from"@distilled.cloud/core/_bundle/rest";import{api$D as j,api$call as M,api$error as N,api$named as P,api$newError as F,api$op as I,category$withAuthError as L,category$withBadRequestError as R,category$withConflictError as z,category$withParseError as B,retry$capped as V,retry$jittered as H,retry$makeDefault as U,retry$throttlingFactory as W,retry$throttlingOptions as G,retry$transientFactory as K,retry$transientOptions as q,schema_lite_typed$TaggedError as J,schema_lite_typed$Unknown as Y,trait$Body as oe,trait$FormDataFile as se,trait$Header as ce,trait$Http as le,trait$HttpBody as ue,trait$KeyDictionary as de,trait$Label as fe,trait$Query as pe,trait$ResponseCode as me,trait$UnionCases as he,trait$applyErrorMatchers as ge,trait$bodySymbol as _e,trait$errorMatchersSymbol as ve,trait$formDataFileSymbol as ye,trait$getErrorMatchers as be,trait$headerSymbol as xe,trait$httpBodySymbol as Se,trait$httpSymbol as Ce,trait$keyDictionarySymbol as we,trait$labelSymbol as Te,trait$querySymbol as Ee,trait$responseCodeSymbol as De,trait$unionCasesSymbol as Oe}from"@distilled.cloud/core/_bundle/base";import*as X from"effect/Context";import*as Z from"effect/Effect";import*as Q from"effect/Layer";import*as $ from"effect/Redacted";const ke=`https://api.xata.tech`;var Credentials=class extends (/*@__PURE__*/ X.Service()(`XataCredentials`)){};const fromApiKey=e=>Q.succeed(Credentials,Z.succeed({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl??`https://api.xata.tech`}));const Ae=/*@__PURE__*/ Q.succeed(Credentials,/*@__PURE__*/ Z.gen(function*(){const e=process.env.XATA_API_KEY;if(!e)return yield*new r({message:`XATA_API_KEY environment variable is required`});return{apiKey:$.make(e),apiBaseUrl:process.env.XATA_API_BASE_URL??`https://api.xata.tech`}}));var UnknownXataError=class extends (/*@__PURE__*/ J()(`UnknownXataError`,l)){};var XataParseError=class extends (/*@__PURE__*/ J()(`XataParseError`,{body:Y,cause:Y}).pipe(B)){};const je=/*@__PURE__*/ m({credentials:/*@__PURE__*/ Z.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${$.value(e.apiKey)}`}),unknownError:e=>new UnknownXataError(v(e)),parseError:({body:e,cause:t})=>new XataParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ X.Service()(`XataRetry`)){};const policy=e=>Z.provide(Q.succeed(Retry,e));const Me=/*@__PURE__*/ Z.provide(/*@__PURE__*/ Q.succeed(Retry,{while:()=>false}));const Ne=/*@__PURE__*/ policy(W);const Pe=/*@__PURE__*/ policy(K);export{z as Ba,y as Ob,b as Pb,x as Wb,S as Xb,C as Yb,w as _b,j as a,T as ac,M as c,E as cc,Credentials as credentials$Credentials,Ae as credentials$CredentialsFromEnv,ke as credentials$DEFAULT_API_BASE_URL,fromApiKey as credentials$fromApiKey,N as e,e as errors$API_ERRORS,t as errors$BadGateway,n as errors$BadRequest,r as errors$ConfigError,i as errors$Conflict,ee as errors$DEFAULT_ERRORS,a as errors$Forbidden,te as errors$GatewayTimeout,ne as errors$HTTP_STATUS_MAP,re as errors$InternalServerError,ie as errors$Locked,ae as errors$NotFound,o as errors$ServiceUnavailable,s as errors$TooManyRequests,c as errors$Unauthorized,UnknownXataError as errors$UnknownXataError,u as errors$UnprocessableEntity,XataParseError as errors$XataParseError,D as fc,O as hc,P as k,F as l,I as m,k as mc,A as nc,je as protocol$XataProtocol,Retry as retry$Retry,V as retry$capped,H as retry$jittered,U as retry$makeDefault,Me as retry$none,policy as retry$policy,Ne as retry$throttling,W as retry$throttlingFactory,G as retry$throttlingOptions,Pe as retry$transient,K as retry$transientFactory,q as retry$transientOptions,oe as traits$Body,se as traits$FormDataFile,ce as traits$Header,le as traits$Http,ue as traits$HttpBody,de as traits$KeyDictionary,fe as traits$Label,pe as traits$Query,d as traits$RawResponse,f as traits$RawResponseRoot,me as traits$ResponseCode,p as traits$SensitiveValue,he as traits$UnionCases,ge as traits$applyErrorMatchers,_e as traits$bodySymbol,ve as traits$errorMatchersSymbol,ye as traits$formDataFileSymbol,be as traits$getErrorMatchers,xe as traits$headerSymbol,Se as traits$httpBodySymbol,Ce as traits$httpSymbol,we as traits$keyDictionarySymbol,Te as traits$labelSymbol,Ee as traits$querySymbol,h as traits$rawResponseRootSymbol,g as traits$rawResponseSymbol,De as traits$responseCodeSymbol,_ as traits$sensitiveValueSymbol,Oe as traits$unionCasesSymbol,L as xa,R as ya};
2
2
  //# sourceMappingURL=sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","names":["Schema.String","Schema.Unknown","Category.withServerError","Category.withParseError","API_ERRORS","BadGateway","BadRequest","ConfigError","Conflict","DEFAULT_ERRORS","Forbidden","GatewayTimeout","HTTP_STATUS_MAP","InternalServerError","Locked","NotFound","ServiceUnavailable","TooManyRequests","Unauthorized","UnprocessableEntity","RawResponse","RawResponseRoot","SensitiveValue","makeRestProtocol","rawResponseRootSymbol","rawResponseSymbol","sensitiveValueSymbol","Array","Boolean","NullOr","Number","Record","String$1","Struct","TaggedError","Unknown","at","optional","suspend","D","call","error","named","newError","op","withAuthError","withBadRequestError","withConflictError","withParseError","withServerError","capped","jittered","makeDefault","throttlingFactory","throttlingOptions","transientFactory","transientOptions","String$2","TaggedError$1","Unknown$1","optional$1","Body","FormDataFile","Header","Http","HttpBody","KeyDictionary","Label","Query","ResponseCode","UnionCases","applyErrorMatchers","bodySymbol","errorMatchersSymbol","formDataFileSymbol","getErrorMatchers","headerSymbol","httpBodySymbol","httpSymbol","keyDictionarySymbol","labelSymbol","querySymbol","responseCodeSymbol","unionCasesSymbol","Context","Effect","Layer","Redacted","DEFAULT_API_BASE_URL","config","CredentialsFromEnv","apiKey","XataProtocol","resolve","creds","code","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"yvEAcA,MAAawF,GAAuB,wBAOpC,IAAa,YAAb,eACwB,gBAAQ,QAAyD,CAAC,CACtF,iBACF,EAAA,AAAE,CAAC,EAGL,MAAa,WAAc,GAIzBF,EAAM,QACJ,YACAD,EAAO,QAAQ,CACb,OAAQI,EAAO,OACf,WAAYA,EAAO,YAAA,uBACrB,CAAC,CACH,EAGF,MAAaC,GAA6D,gBAAM,QAC9E,YACc,gBAAO,IAAI,WAAa,CACpC,MAAMC,EAAS,QAAQ,IAAI,aAE3B,GAAI,CAACA,EACH,OAAO,MAAO,IAAIpF,EAAY,CAC5B,QAAS,+CACX,CAAC,EAGH,MAAO,CACL,OAAQgF,EAAS,KAAKI,CAAM,EAC5B,WAAY,QAAQ,IAAI,mBAAA,uBAC1B,CACF,CAAC,CACH,ECvBA,IAAa,iBAAb,eACwB,gBAAqC,CAAC,CAAC,mBAAoB,CAC/E,KAAoB,gBAAgB3F,CAAa,EACjD,QAAuB,gBAAgBA,CAAa,EACpD,KAAMC,CACR,CAAC,CAAC,CAAC,KAAKC,CAAwB,EAAA,AAAE,CAAC,EAGrC,IAAa,eAAb,eACwB,gBAAmC,CAAC,CAAC,iBAAkB,CAC3E,KAAMD,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKE,CAAuB,EAAA,AAAE,CAAC,ECDpC,MAAayF,GAAwD,gBAAyB,CAG5F,YAA2B,gBAAO,QAAQ,YAAc,GAAYC,CAAO,EAC3E,QAAU,GAAUC,EAAM,WAC1B,QAAU,IAAW,CACnB,cAAe,UAAUP,EAAS,MAAMO,EAAM,MAAM,GACtD,GAGA,cAAe,CAAE,OAAM,UAAS,UAC9B,IAAI,iBAAiB,CACnB,KAAM,OAAOC,IAAS,SAAWA,EAAOA,IAAS,IAAA,GAAY,OAAOA,CAAI,EAAI,IAAA,GAC5E,UACA,MACF,CAAC,EACH,YAAa,CAAE,OAAM,WAAY,IAAI,eAAe,CAAE,OAAM,OAAM,CAAC,CACrE,CAAC,EC3BD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,WAAW,EAAA,AAAE,CAAC,EAGxF,MAAa,OAAU,GACrBV,EAAO,QAAQC,EAAM,QAAQ,MAAOU,CAAgB,CAAC,EAGvD,MAAaC,GAAqB,gBAAO,QACzB,gBAAM,QAAQ,MAAO,CAAE,UAAa,KAAM,CAAC,CAC3D,EAGA,MAAaC,GAA2B,qBAAO7C,CAAiB,EAGhE,MAAa8C,GAA0B,qBAAO5C,CAAgB"}
1
+ {"version":3,"file":"sdk.js","names":["Schema.Unknown","Category.withParseError","API_ERRORS","BadGateway","BadRequest","ConfigError","Conflict","DEFAULT_ERRORS","Forbidden","GatewayTimeout","HTTP_STATUS_MAP","InternalServerError","Locked","NotFound","ServiceUnavailable","TooManyRequests","Unauthorized","UnknownErrorFields","UnprocessableEntity","RawResponse","RawResponseRoot","SensitiveValue","makeRestProtocol","rawResponseRootSymbol","rawResponseSymbol","sensitiveValueSymbol","unknownErrorProps","Array","Boolean","NullOr","Number","Record","String","Struct","TaggedError","Unknown","at","optional","suspend","D","call","error","named","newError","op","withAuthError","withBadRequestError","withConflictError","withParseError","capped","jittered","makeDefault","throttlingFactory","throttlingOptions","transientFactory","transientOptions","TaggedError$1","Unknown$1","Body","FormDataFile","Header","Http","HttpBody","KeyDictionary","Label","Query","ResponseCode","UnionCases","applyErrorMatchers","bodySymbol","errorMatchersSymbol","formDataFileSymbol","getErrorMatchers","headerSymbol","httpBodySymbol","httpSymbol","keyDictionarySymbol","labelSymbol","querySymbol","responseCodeSymbol","unionCasesSymbol","Context","Effect","Layer","Redacted","DEFAULT_API_BASE_URL","config","CredentialsFromEnv","apiKey","XataProtocol","resolve","creds","info","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"guEAcA,MAAaqF,GAAuB,wBAOpC,IAAa,YAAb,eACwB,gBAAQ,QAAyD,CAAC,CACtF,iBACF,EAAA,AAAE,CAAC,EAGL,MAAa,WAAc,GAIzBF,EAAM,QACJ,YACAD,EAAO,QAAQ,CACb,OAAQI,EAAO,OACf,WAAYA,EAAO,YAAA,uBACrB,CAAC,CACH,EAGF,MAAaC,GAA6D,gBAAM,QAC9E,YACc,gBAAO,IAAI,WAAa,CACpC,MAAMC,EAAS,QAAQ,IAAI,aAE3B,GAAI,CAACA,EACH,OAAO,MAAO,IAAInF,EAAY,CAC5B,QAAS,+CACX,CAAC,EAGH,MAAO,CACL,OAAQ+E,EAAS,KAAKI,CAAM,EAC5B,WAAY,QAAQ,IAAI,mBAAA,uBAC1B,CACF,CAAC,CACH,ECtBA,IAAa,iBAAb,eACwB,gBAAqC,CAAC,CAC1D,mBACAvE,CACF,EAAA,AAAE,CAAC,EAGL,IAAa,eAAb,eACwB,gBAAmC,CAAC,CAAC,iBAAkB,CAC3E,KAAMjB,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKC,CAAuB,EAAA,AAAE,CAAC,ECCpC,MAAawF,GAAwD,gBAAyB,CAG5F,YAA2B,gBAAO,QAAQ,YAAc,GAAYC,CAAO,EAC3E,QAAU,GAAUC,EAAM,WAC1B,QAAU,IAAW,CACnB,cAAe,UAAUP,EAAS,MAAMO,EAAM,MAAM,GACtD,GAGA,aAAe,GAAS,IAAI,iBAAiBjE,EAAkBkE,CAAI,CAAC,EACpE,YAAa,CAAE,OAAM,WAAY,IAAI,eAAe,CAAE,OAAM,OAAM,CAAC,CACrE,CAAC,ECxBD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,WAAW,EAAA,AAAE,CAAC,EAGxF,MAAa,OAAU,GACrBV,EAAO,QAAQC,EAAM,QAAQ,MAAOU,CAAgB,CAAC,EAGvD,MAAaC,GAAqB,gBAAO,QACzB,gBAAM,QAAQ,MAAO,CAAE,UAAa,KAAM,CAAC,CAC3D,EAGA,MAAaC,GAA2B,qBAAO3C,CAAiB,EAGhE,MAAa4C,GAA0B,qBAAO1C,CAAgB"}
package/lib/errors.d.ts CHANGED
@@ -11,14 +11,11 @@ export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeou
11
11
  export type { DefaultErrors } from "@distilled.cloud/core/errors";
12
12
  import * as Schema from "@distilled.cloud/core/schema-lite-typed";
13
13
  declare const UnknownXataError_base: Schema.TaggedErrorClass<"UnknownXataError", {
14
- readonly code: import("effect/Schema").optional<import("effect/Schema").String>;
15
- readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
16
- readonly body: import("effect/Schema").Unknown;
17
- }> & (new (...args: any[]) => {
18
- "@distilled.cloud/error/categories": {
19
- ServerError: true;
20
- };
21
- });
14
+ status: import("effect/Schema").Number;
15
+ code: import("effect/Schema").optional<import("effect/Schema").String>;
16
+ message: import("effect/Schema").optional<import("effect/Schema").String>;
17
+ body: import("effect/Schema").Unknown;
18
+ }>;
22
19
  /** Unknown Xata error -- returned when nothing else matches the failure. */
23
20
  export declare class UnknownXataError extends /*@__PURE__*/ UnknownXataError_base {
24
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAGlE,OAAO,KAAK,MAAM,MAAM,yCAAyC,CAAC;;;;;;;;;;AAElE,4EAA4E;AAC5E,qBAAa,gBACX,SAAQ,aAAa,CAAC,qBAIW;CAAG;;;;;;;;;AAEtC,kCAAkC;AAClC,qBAAa,cACX,SAAQ,aAAa,CAAC,mBAGU;CAAG"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAIlE,OAAO,KAAK,MAAM,MAAM,yCAAyC,CAAC;;;;;;;AAElE,4EAA4E;AAC5E,qBAAa,gBACX,SAAQ,aAAa,CAAC,qBAGrB;CAAG;;;;;;;;;AAEN,kCAAkC;AAClC,qBAAa,cACX,SAAQ,aAAa,CAAC,mBAGU;CAAG"}
package/lib/protocol.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type * as API from "@distilled.cloud/core/api";
2
2
  import type { API_ERRORS, ConfigError, InvalidInput } from "@distilled.cloud/core/errors";
3
+ import type { SdkError } from "@distilled.cloud/core/sdk-error";
3
4
  import type * as HttpClient from "effect/http/HttpClient";
4
5
  import type * as HttpClientError from "effect/http/HttpClientError";
5
6
  import type * as Layer from "effect/Layer";
@@ -11,7 +12,7 @@ import { UnknownXataError, XataParseError } from "./errors.ts";
11
12
  * XataOpContext>` explicitly so the compiler never infers these back out of
12
13
  * the schema generics.
13
14
  */
14
- export type XataOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownXataError | ConfigError | HttpClientError.HttpClientError | XataParseError | InvalidInput;
15
+ export type XataOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownXataError | ConfigError | HttpClientError.HttpClientError | XataParseError | InvalidInput | SdkError;
15
16
  /** Context (requirements) shared by every generated Xata operation. */
16
17
  export type XataOpContext = Credentials | HttpClient.HttpClient;
17
18
  export declare const XataProtocol: Layer.Layer<API.Protocol>;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAmB1F,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GACnB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,gBAAgB,GAChB,WAAW,GACX,eAAe,CAAC,eAAe,GAC/B,cAAc,GACd,YAAY,CAAC;AAEjB,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAEhE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAiBjD,CAAC"}
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAkBhE,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GACnB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,gBAAgB,GAChB,WAAW,GACX,eAAe,CAAC,eAAe,GAC/B,cAAc,GACd,YAAY,GACZ,QAAQ,CAAC;AAEb,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAEhE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAYjD,CAAC"}