@distilled.cloud/turso 1.0.0-rc.17 → 1.0.0-rc.19

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{api$D as e,api$call as t,api$error as n,api$named as r,api$newError as i,api$op as a,category$withAuthError as o,category$withBadRequestError as ee,category$withConflictError as te,category$withParseError as ne,category$withServerError as re,config$String as ie,config$all as ae,retry$capped as s,retry$jittered as c,retry$makeDefault as l,retry$throttlingFactory as u,retry$throttlingOptions as d,retry$transientFactory as f,retry$transientOptions as p,trait$Body as m,trait$FormDataFile as h,trait$Header as g,trait$Http as _,trait$HttpBody as v,trait$KeyDictionary as y,trait$Label as b,trait$Query as x,trait$ResponseCode as S,trait$UnionCases as C,trait$applyErrorMatchers as w,trait$bodySymbol as T,trait$errorMatchersSymbol as E,trait$formDataFileSymbol as D,trait$getErrorMatchers as O,trait$headerSymbol as k,trait$httpBodySymbol as A,trait$httpSymbol as j,trait$keyDictionarySymbol as M,trait$labelSymbol as N,trait$querySymbol as P,trait$responseCodeSymbol as F,trait$unionCasesSymbol as I}from"@distilled.cloud/core/_bundle/base";import{errors$API_ERRORS as L,errors$BadGateway as R,errors$BadRequest as z,errors$ConfigError as B,errors$Conflict as V,errors$DEFAULT_ERRORS as H,errors$Forbidden as U,errors$GatewayTimeout as W,errors$HTTP_STATUS_MAP as G,errors$InternalServerError as K,errors$Locked as oe,errors$NotFound as q,errors$ServiceUnavailable as se,errors$TooManyRequests as ce,errors$Unauthorized as le,errors$UnprocessableEntity as ue,protocol_rest$RawResponse as de,protocol_rest$RawResponseRoot as fe,protocol_rest$SensitiveValue as pe,protocol_rest$makeRestProtocol as me,protocol_rest$rawResponseRootSymbol as he,protocol_rest$rawResponseSymbol as ge,protocol_rest$sensitiveValueSymbol as _e,schema_lite$Array as ve,schema_lite$Boolean as ye,schema_lite$NullOr as be,schema_lite$Number as xe,schema_lite$Record as Se,schema_lite$String as Ce,schema_lite$Struct as we,schema_lite$TaggedError as Te,schema_lite$Unknown as Ee,schema_lite$at as De,schema_lite$optional as Oe,schema_lite$suspend as ke}from"@distilled.cloud/core/_bundle/rest";import*as J from"effect/Context";import*as Y from"effect/Effect";import*as X from"effect/Layer";import*as Z from"effect/Redacted";import*as Q from"@distilled.cloud/core/schema-lite-typed";const $=`https://api.turso.tech`;var Credentials=class extends (/*@__PURE__*/ J.Service()(`TursoCredentials`)){};const Ae=/*@__PURE__*/ ae({apiKey:/*@__PURE__*/ ie(`TURSO_API_KEY`)});const je=/*@__PURE__*/ X.succeed(Credentials,/*@__PURE__*/ Ae.pipe(/*@__PURE__*/ Y.mapError(()=>new B({message:`TURSO_API_KEY environment variable is required`})),/*@__PURE__*/ Y.map(({apiKey:e})=>({apiKey:Z.make(e),apiBaseUrl:$})),Y.orDie));var UnknownTursoError=class extends (/*@__PURE__*/ Q.TaggedError()(`UnknownTursoError`,{code:/*@__PURE__*/ Q.optional(Q.String),message:/*@__PURE__*/ Q.optional(Q.String),body:Q.Unknown}).pipe(re)){};var TursoParseError=class extends (/*@__PURE__*/ Q.TaggedError()(`TursoParseError`,{body:Q.Unknown,cause:Q.Unknown}).pipe(ne)){};const Me=/*@__PURE__*/ me({credentials:/*@__PURE__*/ Y.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${Z.value(e.apiKey)}`}),unknownError:({code:e,message:t,body:n})=>new UnknownTursoError({code:typeof e===`string`?e:e!==void 0?String(e):void 0,message:t,body:n}),parseError:({body:e,cause:t})=>new TursoParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ J.Service()(`TursoRetry`)){};const policy=e=>Y.provide(X.succeed(Retry,e));const Ne=/*@__PURE__*/ Y.provide(/*@__PURE__*/ X.succeed(Retry,{while:()=>false}));const Pe=/*@__PURE__*/ policy(u);const Fe=/*@__PURE__*/ policy(f);export{i as _,Se as a,ee as b,Te as c,Credentials as credentials$Credentials,je as credentials$CredentialsFromEnv,$ as credentials$DEFAULT_API_BASE_URL,Oe as d,L as errors$API_ERRORS,R as errors$BadGateway,z as errors$BadRequest,B as errors$ConfigError,V as errors$Conflict,H as errors$DEFAULT_ERRORS,U as errors$Forbidden,W as errors$GatewayTimeout,G as errors$HTTP_STATUS_MAP,K as errors$InternalServerError,oe as errors$Locked,q as errors$NotFound,se as errors$ServiceUnavailable,ce as errors$TooManyRequests,TursoParseError as errors$TursoParseError,le as errors$Unauthorized,UnknownTursoError as errors$UnknownTursoError,ue as errors$UnprocessableEntity,ke as f,r as g,n as h,xe as i,Ee as l,t as m,ye as n,Ce as o,e as p,Me as protocol$TursoProtocol,be as r,Retry as retry$Retry,s as retry$capped,c as retry$jittered,l as retry$makeDefault,Ne as retry$none,policy as retry$policy,Pe as retry$throttling,u as retry$throttlingFactory,d as retry$throttlingOptions,Fe as retry$transient,f as retry$transientFactory,p as retry$transientOptions,we as s,ve as t,m as traits$Body,h as traits$FormDataFile,g as traits$Header,_ as traits$Http,v as traits$HttpBody,y as traits$KeyDictionary,b as traits$Label,x as traits$Query,de as traits$RawResponse,fe as traits$RawResponseRoot,S as traits$ResponseCode,pe as traits$SensitiveValue,C as traits$UnionCases,w as traits$applyErrorMatchers,T as traits$bodySymbol,E as traits$errorMatchersSymbol,D as traits$formDataFileSymbol,O as traits$getErrorMatchers,k as traits$headerSymbol,A as traits$httpBodySymbol,j as traits$httpSymbol,M as traits$keyDictionarySymbol,N as traits$labelSymbol,P as traits$querySymbol,he as traits$rawResponseRootSymbol,ge as traits$rawResponseSymbol,F as traits$responseCodeSymbol,_e as traits$sensitiveValueSymbol,I as traits$unionCasesSymbol,De as u,a as v,te as x,o as y};
1
+ import{api$D as e,api$call as t,api$error as n,api$named as ee,api$newError as r,api$op as i,category$withAuthError as a,category$withBadRequestError as o,category$withConflictError as s,category$withParseError as c,category$withServerError as l,config$String as te,config$all as ne,retry$capped as re,retry$jittered as ie,retry$makeDefault as ae,retry$throttlingFactory as u,retry$throttlingOptions as d,retry$transientFactory as f,retry$transientOptions as p,schema_lite_typed$String as m,schema_lite_typed$TaggedError as h,schema_lite_typed$Unknown as g,schema_lite_typed$optional as _,trait$Body as v,trait$FormDataFile as y,trait$Header as b,trait$Http as x,trait$HttpBody as S,trait$KeyDictionary as C,trait$Label as w,trait$Query as T,trait$ResponseCode as E,trait$UnionCases as D,trait$applyErrorMatchers as O,trait$bodySymbol as k,trait$errorMatchersSymbol as A,trait$formDataFileSymbol as j,trait$getErrorMatchers as M,trait$headerSymbol as N,trait$httpBodySymbol as P,trait$httpSymbol as F,trait$keyDictionarySymbol as I,trait$labelSymbol as L,trait$querySymbol as R,trait$responseCodeSymbol as z,trait$unionCasesSymbol as B}from"@distilled.cloud/core/_bundle/base";import{errors$API_ERRORS as V,errors$BadGateway as H,errors$BadRequest as U,errors$ConfigError as W,errors$Conflict as G,errors$DEFAULT_ERRORS as K,errors$Forbidden as q,errors$GatewayTimeout as J,errors$HTTP_STATUS_MAP as oe,errors$InternalServerError as se,errors$Locked as ce,errors$NotFound as le,errors$ServiceUnavailable as ue,errors$TooManyRequests as de,errors$Unauthorized as fe,errors$UnprocessableEntity as pe,protocol_rest$RawResponse as me,protocol_rest$RawResponseRoot as he,protocol_rest$SensitiveValue as ge,protocol_rest$makeRestProtocol as _e,protocol_rest$rawResponseRootSymbol as ve,protocol_rest$rawResponseSymbol as ye,protocol_rest$sensitiveValueSymbol as be,schema_lite$Array as xe,schema_lite$Boolean as Se,schema_lite$NullOr as Ce,schema_lite$Number as we,schema_lite$Record as Te,schema_lite$String as Ee,schema_lite$Struct as De,schema_lite$TaggedError as Oe,schema_lite$Unknown as ke,schema_lite$at as Ae,schema_lite$optional as je,schema_lite$suspend as Me}from"@distilled.cloud/core/_bundle/rest";import*as Y from"effect/Context";import*as X from"effect/Effect";import*as Z from"effect/Layer";import*as Q from"effect/Redacted";const $=`https://api.turso.tech`;var Credentials=class extends (/*@__PURE__*/ Y.Service()(`TursoCredentials`)){};const Ne=/*@__PURE__*/ ne({apiKey:/*@__PURE__*/ te(`TURSO_API_KEY`)});const Pe=/*@__PURE__*/ Z.succeed(Credentials,/*@__PURE__*/ Ne.pipe(/*@__PURE__*/ X.mapError(()=>new W({message:`TURSO_API_KEY environment variable is required`})),/*@__PURE__*/ X.map(({apiKey:e})=>({apiKey:Q.make(e),apiBaseUrl:$}))));var UnknownTursoError=class extends (/*@__PURE__*/ h()(`UnknownTursoError`,{code:/*@__PURE__*/ _(m),message:/*@__PURE__*/ _(m),body:g}).pipe(l)){};var TursoParseError=class extends (/*@__PURE__*/ h()(`TursoParseError`,{body:g,cause:g}).pipe(c)){};const Fe=/*@__PURE__*/ _e({credentials:/*@__PURE__*/ X.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${Q.value(e.apiKey)}`}),unknownError:({code:e,message:t,body:n})=>new UnknownTursoError({code:typeof e===`string`?e:e!==void 0?String(e):void 0,message:t,body:n}),parseError:({body:e,cause:t})=>new TursoParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ Y.Service()(`TursoRetry`)){};const policy=e=>X.provide(Z.succeed(Retry,e));const Ie=/*@__PURE__*/ X.provide(/*@__PURE__*/ Z.succeed(Retry,{while:()=>false}));const Le=/*@__PURE__*/ policy(u);const Re=/*@__PURE__*/ policy(f);export{s as Ba,xe as Ub,Se as Vb,e as a,Ce as bc,t as c,we as cc,Credentials as credentials$Credentials,Pe as credentials$CredentialsFromEnv,$ as credentials$DEFAULT_API_BASE_URL,Te as dc,n as e,V as errors$API_ERRORS,H as errors$BadGateway,U as errors$BadRequest,W as errors$ConfigError,G as errors$Conflict,K as errors$DEFAULT_ERRORS,q as errors$Forbidden,J as errors$GatewayTimeout,oe as errors$HTTP_STATUS_MAP,se as errors$InternalServerError,ce as errors$Locked,le as errors$NotFound,ue as errors$ServiceUnavailable,de as errors$TooManyRequests,TursoParseError as errors$TursoParseError,fe as errors$Unauthorized,UnknownTursoError as errors$UnknownTursoError,pe as errors$UnprocessableEntity,Ee as fc,De as gc,Oe as ic,ee as k,r as l,ke as lc,i as m,Ae as nc,Fe as protocol$TursoProtocol,Retry as retry$Retry,re as retry$capped,ie as retry$jittered,ae as retry$makeDefault,Ie as retry$none,policy as retry$policy,Le as retry$throttling,u as retry$throttlingFactory,d as retry$throttlingOptions,Re as retry$transient,f as retry$transientFactory,p as retry$transientOptions,je as sc,Me as tc,v as traits$Body,y as traits$FormDataFile,b as traits$Header,x as traits$Http,S as traits$HttpBody,C as traits$KeyDictionary,w as traits$Label,T as traits$Query,me as traits$RawResponse,he as traits$RawResponseRoot,E as traits$ResponseCode,ge as traits$SensitiveValue,D as traits$UnionCases,O as traits$applyErrorMatchers,k as traits$bodySymbol,A as traits$errorMatchersSymbol,j as traits$formDataFileSymbol,M as traits$getErrorMatchers,N as traits$headerSymbol,P as traits$httpBodySymbol,F as traits$httpSymbol,I as traits$keyDictionarySymbol,L as traits$labelSymbol,R as traits$querySymbol,ve as traits$rawResponseRootSymbol,ye as traits$rawResponseSymbol,z as traits$responseCodeSymbol,be as traits$sensitiveValueSymbol,B as traits$unionCasesSymbol,a as xa,o as ya};
2
2
  //# sourceMappingURL=sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","names":["Category.withServerError","Category.withParseError","D","call","error","named","newError","op","withAuthError","withBadRequestError","withConflictError","withParseError","withServerError","String$2","all$1","capped","jittered","makeDefault","throttlingFactory","throttlingOptions","transientFactory","transientOptions","Body","FormDataFile","Header","Http","HttpBody","KeyDictionary","Label","Query","ResponseCode","UnionCases","applyErrorMatchers","bodySymbol","errorMatchersSymbol","formDataFileSymbol","getErrorMatchers","headerSymbol","httpBodySymbol","httpSymbol","keyDictionarySymbol","labelSymbol","querySymbol","responseCodeSymbol","unionCasesSymbol","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","Context","Effect","Layer","Redacted","Schema","DEFAULT_API_BASE_URL","envConfig","CredentialsFromEnv","apiKey","TursoProtocol","resolve","creds","code","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"stEAeA,MAAaqF,EAAuB,yBAOpC,IAAa,YAAb,eACwB,gBAAQ,QAA4C,CAAC,CAAC,kBAAkB,EAAA,AAAE,CAAC,EAEnG,MAAMC,GAA0B,iBAAiB,CAC/C,OAAsB,iBAAoB,eAAe,CAC3D,CAAC,EAED,MAAaC,GAAmC,gBAAM,QACpD,YACc,iBAAU,KACR,gBAAO,aAEjB,IAAIvC,EAAY,CACd,QAAS,gDACX,CAAC,CACL,EACc,gBAAO,KAAK,CAAE,aAAc,CACxC,OAAQmC,EAAS,KAAKK,CAAM,EAC5B,WAAYH,CACd,EAAE,EACFJ,EAAO,KACT,CACF,ECDA,IAAa,kBAAb,eACwB,gBAAO,YAA+B,CAAC,CAAC,oBAAqB,CACjF,KAAoB,gBAAO,SAASG,EAAO,MAAM,EACjD,QAAuB,gBAAO,SAASA,EAAO,MAAM,EACpD,KAAMA,EAAO,OACf,CAAC,CAAC,CAAC,KAAKpF,EAAwB,EAAA,AAAE,CAAC,EAMrC,IAAa,gBAAb,eACwB,gBAAO,YAA6B,CAAC,CAAC,kBAAmB,CAC7E,KAAMoF,EAAO,QACb,MAAOA,EAAO,OAChB,CAAC,CAAC,CAAC,KAAKnF,EAAuB,EAAA,AAAE,CAAC,ECpBpC,MAAawF,GAAyD,iBAAyB,CAI7F,YAA2B,gBAAO,QAAQ,YAAc,GAAYC,CAAO,EAC3E,QAAU,GAAUC,EAAM,WAC1B,QAAU,IAAW,CACnB,cAAe,UAAUR,EAAS,MAAMQ,EAAM,MAAM,GACtD,GAGA,cAAe,CAAE,OAAM,UAAS,UAC9B,IAAI,kBAAkB,CACpB,KAAM,OAAOC,IAAS,SAAWA,EAAOA,IAAS,IAAA,GAAY,OAAOA,CAAI,EAAI,IAAA,GAC5E,UACA,MACF,CAAC,EACH,YAAa,CAAE,OAAM,WAAY,IAAI,gBAAgB,CAAE,OAAM,OAAM,CAAC,CACtE,CAAC,ECrBD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,YAAY,EAAA,AAAE,CAAC,EAGzF,MAAa,OAAU,GACrBX,EAAO,QAAQC,EAAM,QAAQ,MAAOW,CAAgB,CAAC,EAGvD,MAAaC,GAAqB,gBAAO,QACzB,gBAAM,QAAQ,MAAO,CAAE,UAAa,KAAM,CAAC,CAC3D,EAGA,MAAaC,GAA2B,qBAAO7E,CAAiB,EAGhE,MAAa8E,GAA0B,qBAAO5E,CAAgB"}
1
+ {"version":3,"file":"sdk.js","names":["Schema.String","Schema.Unknown","Category.withServerError","Category.withParseError","D","call","error","named","newError","op","withAuthError","withBadRequestError","withConflictError","withParseError","withServerError","String$3","all$1","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","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","Context","Effect","Layer","Redacted","DEFAULT_API_BASE_URL","envConfig","CredentialsFromEnv","apiKey","TursoProtocol","resolve","creds","code","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"+xEAeA,MAAa0F,EAAuB,yBAOpC,IAAa,YAAb,eACwB,gBAAQ,QAAyD,CAAC,CACtF,kBACF,EAAA,AAAE,CAAC,EAEL,MAAMC,GAA0B,iBAAiB,CAC/C,OAAsB,iBAAoB,eAAe,CAC3D,CAAC,EAED,MAAaC,GAAmC,gBAAM,QACpD,YACc,iBAAU,KACR,gBAAO,aAEjB,IAAItC,EAAY,CACd,QAAS,gDACX,CAAC,CACL,EACc,gBAAO,KAAK,CAAE,aAAc,CACxC,OAAQmC,EAAS,KAAKI,CAAM,EAC5B,WAAYH,CACd,EAAE,CACJ,CACF,ECFA,IAAa,kBAAb,eACwB,gBAAsC,CAAC,CAAC,oBAAqB,CACjF,KAAoB,gBAAgB1F,CAAa,EACjD,QAAuB,gBAAgBA,CAAa,EACpD,KAAMC,CACR,CAAC,CAAC,CAAC,KAAKC,CAAwB,EAAA,AAAE,CAAC,EAMrC,IAAa,gBAAb,eACwB,gBAAoC,CAAC,CAAC,kBAAmB,CAC7E,KAAMD,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKE,CAAuB,EAAA,AAAE,CAAC,ECdpC,MAAa2F,GAAyD,iBAAyB,CAI7F,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,kBAAkB,CACpB,KAAM,OAAOC,IAAS,SAAWA,EAAOA,IAAS,IAAA,GAAY,OAAOA,CAAI,EAAI,IAAA,GAC5E,UACA,MACF,CAAC,EACH,YAAa,CAAE,OAAM,WAAY,IAAI,gBAAgB,CAAE,OAAM,OAAM,CAAC,CACtE,CAAC,EC3BD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,YAAY,EAAA,AAAE,CAAC,EAGzF,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,qBAAOhF,CAAiB,EAGhE,MAAaiF,GAA0B,qBAAO/E,CAAgB"}
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Turso credentials -- hand-written.
3
+ *
4
+ * API-compatible port of the distilled repo's turso credentials module: the
5
+ * `Credentials` service holds an *effect* that resolves the current
6
+ * credentials, so the protocol layer picks up rotations per request. Turso
7
+ * auth is a plain bearer token (`Authorization: Bearer <apiKey>`).
8
+ */
9
+ import { ConfigError } from "@distilled.cloud/core/errors";
1
10
  import * as Context from "effect/Context";
2
11
  import * as Effect from "effect/Effect";
3
12
  import * as Layer from "effect/Layer";
@@ -7,7 +16,7 @@ export interface Config {
7
16
  readonly apiKey: Redacted.Redacted<string>;
8
17
  readonly apiBaseUrl: string;
9
18
  }
10
- declare const Credentials_base: Context.ServiceClass<Credentials, "TursoCredentials", Effect.Effect<Config, never, never>>;
19
+ declare const Credentials_base: Context.ServiceClass<Credentials, "TursoCredentials", Effect.Effect<Config, ConfigError, never>>;
11
20
  export declare class Credentials extends /*@__PURE__*/ Credentials_base {
12
21
  }
13
22
  export declare const CredentialsFromEnv: Layer.Layer<Credentials, never, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAE7D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WACX,SAAQ,aAAa,CAAC,gBAAyE;CAAG;AAMpG,eAAO,MAAM,kBAAkB,wCAe9B,CAAC"}
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAE7D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WACX,SAAQ,aAAa,CAAC,gBAErB;CAAG;AAMN,eAAO,MAAM,kBAAkB,wCAc9B,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * @distilled.cloud/turso -- Turso SDK for Effect.
3
3
  *
4
- * `./services` is generated by `scripts/generate.ts` from the Smithy model in
5
- * `.generated-specs` (converted from the Turso OpenAPI spec by
6
- * `scripts/convert.ts`). Everything else in this folder is hand-written.
4
+ * `./services` is generated by `scripts/generate.ts` from the Smithy model that
5
+ * `scripts/convert.ts` converts from the Turso OpenAPI spec. Everything else in
6
+ * this folder is hand-written.
7
7
  *
8
8
  * @example
9
9
  * ```ts
package/lib/protocol.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type * as API from "@distilled.cloud/core/api";
2
- import type { ConfigError } from "@distilled.cloud/core/errors";
2
+ import type { 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 { type DefaultErrors } from "./errors.ts";
11
12
  * TursoOpContext>` explicitly so the compiler never infers these back out of
12
13
  * the schema generics.
13
14
  */
14
- export type TursoOpError = DefaultErrors | ConfigError | HttpClientError.HttpClientError;
15
+ export type TursoOpError = DefaultErrors | ConfigError | HttpClientError.HttpClientError | InvalidInput | SdkError;
15
16
  /** Context (requirements) shared by every generated Turso operation. */
16
17
  export type TursoOpContext = Credentials | HttpClient.HttpClient;
17
18
  export declare const TursoProtocol: 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,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAmBhE,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,EAAqB,KAAK,aAAa,EAAmB,MAAM,aAAa,CAAC;AAErF;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,CAAC,eAAe,CAAC;AAEzF,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAEjE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAkBlD,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,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE9E,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,EAAqB,KAAK,aAAa,EAAmB,MAAM,aAAa,CAAC;AAErF;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,WAAW,GACX,eAAe,CAAC,eAAe,GAC/B,YAAY,GACZ,QAAQ,CAAC;AAEb,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAEjE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAkBlD,CAAC"}