@distilled.cloud/resend 1.0.0-rc.18 → 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{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 l,errors$Locked as u,errors$NotFound as d,errors$ServiceUnavailable as ee,errors$TooManyRequests as f,errors$Unauthorized as p,errors$UnprocessableEntity as m,protocol_rest$RawResponse as h,protocol_rest$RawResponseRoot as g,protocol_rest$SensitiveValue as _,protocol_rest$makeRestProtocol as te,protocol_rest$rawResponseRootSymbol as ne,protocol_rest$rawResponseSymbol as re,protocol_rest$sensitiveValueSymbol as ie,schema_lite$Array as ae,schema_lite$Boolean as v,schema_lite$NullOr as y,schema_lite$Number as b,schema_lite$Record as x,schema_lite$String as S,schema_lite$Struct 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$named as A,api$op as j,api$opPaginated as M,category$withParseError as N,category$withServerError as P,pagination$getItems as F,pagination$getPath as I,retry$capped as L,retry$jittered as R,retry$makeDefault as z,retry$throttlingFactory as B,retry$throttlingOptions as V,retry$transientFactory as H,retry$transientOptions as U,schema_lite_typed$String as W,schema_lite_typed$TaggedError as G,schema_lite_typed$Unknown as K,schema_lite_typed$optional as q,trait$Body as J,trait$FormDataFile as oe,trait$Header as se,trait$Http as ce,trait$HttpBody as le,trait$KeyDictionary as ue,trait$Label as de,trait$Query as fe,trait$ResponseCode as pe,trait$UnionCases as me,trait$applyErrorMatchers as he,trait$bodySymbol as ge,trait$errorMatchersSymbol as _e,trait$formDataFileSymbol as ve,trait$getErrorMatchers as ye,trait$headerSymbol as be,trait$httpBodySymbol as xe,trait$httpSymbol as Se,trait$keyDictionarySymbol as Ce,trait$labelSymbol as we,trait$querySymbol as Te,trait$responseCodeSymbol as Ee,trait$unionCasesSymbol as De}from"@distilled.cloud/core/_bundle/base";import*as Y from"effect/Context";import*as X from"effect/Effect";import*as Z from"effect/Layer";import*as Q from"effect/Redacted";import*as $ from"effect/Stream";const Oe=`https://api.resend.com`;var Credentials=class extends (/*@__PURE__*/ Y.Service()(`ResendCredentials`)){};const fromApiKey=e=>Z.succeed(Credentials,X.succeed({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl??`https://api.resend.com`}));const ke=/*@__PURE__*/ Z.succeed(Credentials,/*@__PURE__*/ X.gen(function*(){const e=process.env.RESEND_API_KEY;if(!e)return yield*new r({message:`RESEND_API_KEY environment variable is required`});return{apiKey:Q.make(e),apiBaseUrl:process.env.RESEND_API_BASE_URL??`https://api.resend.com`}}));var UnknownResendError=class extends (/*@__PURE__*/ G()(`UnknownResendError`,{code:/*@__PURE__*/ q(W),message:/*@__PURE__*/ q(W),body:K}).pipe(P)){};var ResendParseError=class extends (/*@__PURE__*/ G()(`ResendParseError`,{body:K,cause:K}).pipe(N)){};const paginateResend=(e,t,n)=>{const r=n.inputToken;if(!r)return $.die(/* @__PURE__ */ new Error(`Resend cursor pagination requires inputToken`));const i=n.hasNextPage??`has_more`;const a=n.items??`data`;const o=typeof t[r]===`string`?t[r]:void 0;return $.unfold({cursor:o,done:false},n=>X.gen(function*(){if(n.done)return void 0;const o=yield*e({...t,...n.cursor?{[r]:n.cursor}:{}});const s=F(o,a).at(-1);const c=typeof s?.id===`string`?s.id:void 0;const l=I(o,i)===true;const u=n.cursor!==void 0&&c===n.cursor;return[o,{cursor:c,done:!l||c===void 0||u}]}))};const Ae=/*@__PURE__*/ te({credentials:/*@__PURE__*/ X.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${Q.value(e.apiKey)}`}),errorEnvelope:e=>{if(e===null||typeof e!==`object`)return void 0;const t=e;const n=typeof t.name===`string`?t.name:typeof t.code===`string`?t.code:void 0;const r=typeof t.message===`string`?t.message:void 0;if(n===void 0&&r===void 0)return void 0;return{code:n,message:r}},unknownError:({code:e,message:t,body:n})=>new UnknownResendError({code:typeof e===`string`?e:e!==void 0?String(e):void 0,message:t,body:n}),parseError:({body:e,cause:t})=>new ResendParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ Y.Service()(`ResendRetry`)){};const policy=e=>X.provide(Z.succeed(Retry,e));const je=/*@__PURE__*/ X.provide(/*@__PURE__*/ Z.succeed(Retry,{while:()=>false}));const Me=/*@__PURE__*/ policy(B);const Ne=/*@__PURE__*/ policy(H);export{ae as Xb,v as Yb,O as a,k as c,Credentials as credentials$Credentials,ke as credentials$CredentialsFromEnv,Oe as credentials$DEFAULT_API_BASE_URL,fromApiKey as credentials$fromApiKey,y as ec,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,l as errors$InternalServerError,u as errors$Locked,d as errors$NotFound,ResendParseError as errors$ResendParseError,ee as errors$ServiceUnavailable,f as errors$TooManyRequests,p as errors$Unauthorized,UnknownResendError as errors$UnknownResendError,m as errors$UnprocessableEntity,b as fc,x as gc,S as ic,A as j,C as jc,j as l,M as m,w as oc,paginateResend as pagination$paginateResend,Ae as protocol$ResendProtocol,T as qc,Retry as retry$Retry,L as retry$capped,R as retry$jittered,z as retry$makeDefault,je as retry$none,policy as retry$policy,Me as retry$throttling,B as retry$throttlingFactory,V as retry$throttlingOptions,Ne as retry$transient,H as retry$transientFactory,U as retry$transientOptions,J as traits$Body,oe as traits$FormDataFile,se as traits$Header,ce as traits$Http,le as traits$HttpBody,ue as traits$KeyDictionary,de as traits$Label,fe as traits$Query,h as traits$RawResponse,g as traits$RawResponseRoot,pe as traits$ResponseCode,_ as traits$SensitiveValue,me as traits$UnionCases,he as traits$applyErrorMatchers,ge as traits$bodySymbol,_e as traits$errorMatchersSymbol,ve as traits$formDataFileSymbol,ye as traits$getErrorMatchers,be as traits$headerSymbol,xe as traits$httpBodySymbol,Se as traits$httpSymbol,Ce as traits$keyDictionarySymbol,we as traits$labelSymbol,Te as traits$querySymbol,ne as traits$rawResponseRootSymbol,re as traits$rawResponseSymbol,Ee as traits$responseCodeSymbol,ie as traits$sensitiveValueSymbol,De as traits$unionCasesSymbol,E as vc,D as wc};
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 l,errors$Locked as u,errors$NotFound as d,errors$ServiceUnavailable as f,errors$TooManyRequests as p,errors$Unauthorized as m,errors$UnprocessableEntity as h,protocol_rest$RawResponse as g,protocol_rest$RawResponseRoot as ee,protocol_rest$SensitiveValue as te,protocol_rest$makeRestProtocol as ne,protocol_rest$rawResponseRootSymbol as re,protocol_rest$rawResponseSymbol as ie,protocol_rest$sensitiveValueSymbol as ae,schema_lite$Array as _,schema_lite$Boolean as v,schema_lite$NullOr as y,schema_lite$Number as b,schema_lite$Record as x,schema_lite$String as S,schema_lite$Struct 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$named as A,api$op as j,api$opPaginated as M,category$withParseError as N,category$withServerError as P,pagination$getItems as F,pagination$getPath as I,pagination$missingPaginationConfig as L,retry$capped as R,retry$jittered as z,retry$makeDefault as B,retry$throttlingFactory as V,retry$throttlingOptions as H,retry$transientFactory as U,retry$transientOptions as W,schema_lite_typed$String as G,schema_lite_typed$TaggedError as K,schema_lite_typed$Unknown as q,schema_lite_typed$optional as J,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 Y from"effect/Context";import*as X from"effect/Effect";import*as Z from"effect/Layer";import*as Q from"effect/Redacted";import*as ke from"effect/Stream";const Ae=`https://api.resend.com`;var Credentials=class extends (/*@__PURE__*/ Y.Service()(`ResendCredentials`)){};const fromApiKey=e=>Z.succeed(Credentials,X.succeed({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl??`https://api.resend.com`}));const $=/*@__PURE__*/ Z.succeed(Credentials,/*@__PURE__*/ X.gen(function*(){const e=process.env.RESEND_API_KEY;if(!e)return yield*new r({message:`RESEND_API_KEY environment variable is required`});return{apiKey:Q.make(e),apiBaseUrl:process.env.RESEND_API_BASE_URL??`https://api.resend.com`}}));var UnknownResendError=class extends (/*@__PURE__*/ K()(`UnknownResendError`,{code:/*@__PURE__*/ J(G),message:/*@__PURE__*/ J(G),body:q}).pipe(P)){};var ResendParseError=class extends (/*@__PURE__*/ K()(`ResendParseError`,{body:q,cause:q}).pipe(N)){};const paginateResend=(e,t,n)=>{const r=n.inputToken;if(!r)return L(`Resend cursor pagination requires inputToken`);const i=n.hasNextPage??`has_more`;const a=n.items??`data`;const o=typeof t[r]===`string`?t[r]:void 0;return ke.unfold({cursor:o,done:false},n=>X.gen(function*(){if(n.done)return void 0;const o=yield*e({...t,...n.cursor?{[r]:n.cursor}:{}});const s=F(o,a).at(-1);const c=typeof s?.id===`string`?s.id:void 0;const l=I(o,i)===true;const u=n.cursor!==void 0&&c===n.cursor;return[o,{cursor:c,done:!l||c===void 0||u}]}))};const je=/*@__PURE__*/ ne({credentials:/*@__PURE__*/ X.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${Q.value(e.apiKey)}`}),errorEnvelope:e=>{if(e===null||typeof e!==`object`)return void 0;const t=e;const n=typeof t.name===`string`?t.name:typeof t.code===`string`?t.code:void 0;const r=typeof t.message===`string`?t.message:void 0;if(n===void 0&&r===void 0)return void 0;return{code:n,message:r}},unknownError:({code:e,message:t,body:n})=>new UnknownResendError({code:typeof e===`string`?e:e!==void 0?String(e):void 0,message:t,body:n}),parseError:({body:e,cause:t})=>new ResendParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ Y.Service()(`ResendRetry`)){};const policy=e=>X.provide(Z.succeed(Retry,e));const Me=/*@__PURE__*/ X.provide(/*@__PURE__*/ Z.succeed(Retry,{while:()=>false}));const Ne=/*@__PURE__*/ policy(V);const Pe=/*@__PURE__*/ policy(U);export{E as Ac,D as Bc,O as a,_ as bc,k as c,v as cc,Credentials as credentials$Credentials,$ as credentials$CredentialsFromEnv,Ae as credentials$DEFAULT_API_BASE_URL,fromApiKey as credentials$fromApiKey,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,l as errors$InternalServerError,u as errors$Locked,d as errors$NotFound,ResendParseError as errors$ResendParseError,f as errors$ServiceUnavailable,p as errors$TooManyRequests,m as errors$Unauthorized,UnknownResendError as errors$UnknownResendError,h as errors$UnprocessableEntity,y as jc,A as k,b as kc,x as lc,j as m,M as n,S as nc,C as oc,paginateResend as pagination$paginateResend,je as protocol$ResendProtocol,Retry as retry$Retry,R as retry$capped,z as retry$jittered,B as retry$makeDefault,Me as retry$none,policy as retry$policy,Ne as retry$throttling,V as retry$throttlingFactory,H as retry$throttlingOptions,Pe as retry$transient,U as retry$transientFactory,W as retry$transientOptions,w as tc,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,g as traits$RawResponse,ee as traits$RawResponseRoot,me as traits$ResponseCode,te 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,re as traits$rawResponseRootSymbol,ie as traits$rawResponseSymbol,De as traits$responseCodeSymbol,ae as traits$sensitiveValueSymbol,Oe as traits$unionCasesSymbol,T as vc};
2
2
  //# sourceMappingURL=sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","names":["Schema.String","Schema.Unknown","Category.withServerError","Category.withParseError","Pagination.getItems","Pagination.getPath","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","Unknown","at","optional","suspend","D","call","named","op","opPaginated","withParseError","withServerError","getItems","getPath","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","Stream","DEFAULT_API_BASE_URL","config","CredentialsFromEnv","apiKey","inputToken","pagination","hasNextPath","itemsPath","startCursor","input","state","response","operation","last","nextCursor","hasNext","stuckCursor","ResendProtocol","resolve","creds","body","rec","code","message","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/pagination.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"isEAaA,MAAawF,GAAuB,yBAOpC,IAAa,YAAb,eACwB,gBAAQ,QAAyD,CAAC,CACtF,mBACF,EAAA,AAAE,CAAC,EAGL,MAAa,WAAc,GAIzBH,EAAM,QACJ,YACAD,EAAO,QAAQ,CACb,OAAQK,EAAO,OACf,WAAYA,EAAO,YAAA,wBACrB,CAAC,CACH,EAGF,MAAaC,GAA6D,gBAAM,QAC9E,YACc,gBAAO,IAAI,WAAa,CACpC,MAAMC,EAAS,QAAQ,IAAI,eAE3B,GAAI,CAACA,EACH,OAAO,MAAO,IAAIlF,EAAY,CAC5B,QAAS,iDACX,CAAC,EAGH,MAAO,CACL,OAAQ6E,EAAS,KAAKK,CAAM,EAC5B,WAAY,QAAQ,IAAI,qBAAA,wBAC1B,CACF,CAAC,CACH,ECtBA,IAAa,mBAAb,eACwB,gBAAuC,CAAC,CAAC,qBAAsB,CACnF,KAAoB,gBAAgB3F,CAAa,EACjD,QAAuB,gBAAgBA,CAAa,EACpD,KAAMC,CACR,CAAC,CAAC,CAAC,KAAKC,CAAwB,EAAA,AAAE,CAAC,EAGrC,IAAa,iBAAb,eACwB,gBAAqC,CAAC,CAAC,mBAAoB,CAC/E,KAAMD,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKE,CAAuB,EAAA,AAAE,CAAC,EC3BpC,MAAa,gBAAiD,EAAW,EAAO,IAAe,CAC7F,MAAMyF,EAAaC,EAAW,WAC9B,GAAI,CAACD,EACH,OAAOL,EAAO,oBAAI,IAAI,MAAM,8CAA8C,CAAC,EAE7E,MAAMO,EAAcD,EA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,CAAE,OAAM,SAAQ,CACzB,EACA,cAAe,CAAE,OAAM,UAAS,UAC9B,IAAI,mBAAmB,CACrB,KAAM,OAAOD,IAAS,SAAWA,EAAOA,IAAS,IAAA,GAAY,OAAOA,CAAI,EAAI,IAAA,GAC5E,UACA,MACF,CAAC,EACH,YAAa,CAAE,OAAM,WAAY,IAAI,iBAAiB,CAAE,OAAM,OAAM,CAAC,CACvE,CAAC,ECrCD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,aAAa,EAAA,AAAE,CAAC,EAG1F,MAAa,OAAU,GACrB1B,EAAO,QAAQC,EAAM,QAAQ,MAAO2B,CAAgB,CAAC,EAGvD,MAAaC,GAAqB,gBAAO,QACzB,gBAAM,QAAQ,MAAO,CAAE,UAAa,KAAM,CAAC,CAC3D,EAGA,MAAaC,GAA2B,qBAAO9D,CAAiB,EAGhE,MAAa+D,GAA0B,qBAAO7D,CAAgB"}
1
+ {"version":3,"file":"sdk.js","names":["Schema.String","Schema.Unknown","Category.withServerError","Category.withParseError","Pagination.missingPaginationConfig","Pagination.getItems","Pagination.getPath","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","Unknown","at","optional","suspend","D","call","named","op","opPaginated","withParseError","withServerError","getItems","getPath","missingPaginationConfig","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","Stream","DEFAULT_API_BASE_URL","config","CredentialsFromEnv","apiKey","inputToken","pagination","hasNextPath","itemsPath","startCursor","input","state","response","operation","last","nextCursor","hasNext","stuckCursor","ResendProtocol","resolve","creds","body","rec","code","message","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/pagination.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"2uEAaA,MAAa0F,GAAuB,yBAOpC,IAAa,YAAb,eACwB,gBAAQ,QAAyD,CAAC,CACtF,mBACF,EAAA,AAAE,CAAC,EAGL,MAAa,WAAc,GAIzBH,EAAM,QACJ,YACAD,EAAO,QAAQ,CACb,OAAQK,EAAO,OACf,WAAYA,EAAO,YAAA,wBACrB,CAAC,CACH,EAGF,MAAaC,EAA6D,gBAAM,QAC9E,YACc,gBAAO,IAAI,WAAa,CACpC,MAAMC,EAAS,QAAQ,IAAI,eAE3B,GAAI,CAACA,EACH,OAAO,MAAO,IAAInF,EAAY,CAC5B,QAAS,iDACX,CAAC,EAGH,MAAO,CACL,OAAQ8E,EAAS,KAAKK,CAAM,EAC5B,WAAY,QAAQ,IAAI,qBAAA,wBAC1B,CACF,CAAC,CACH,ECtBA,IAAa,mBAAb,eACwB,gBAAuC,CAAC,CAAC,qBAAsB,CACnF,KAAoB,gBAAgB7F,CAAa,EACjD,QAAuB,gBAAgBA,CAAa,EACpD,KAAMC,CACR,CAAC,CAAC,CAAC,KAAKC,CAAwB,EAAA,AAAE,CAAC,EAGrC,IAAa,iBAAb,eACwB,gBAAqC,CAAC,CAAC,mBAAoB,CAC/E,KAAMD,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKE,CAAuB,EAAA,AAAE,CAAC,EC3BpC,MAAa,gBAAiD,EAAW,EAAO,IAAe,CAC7F,MAAM2F,EAAaC,EAAW,WAC9B,GAAI,CAACD,EACH,OAAO1F,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IAAY,IAAA,GAAW,OAAO,IAAA,GACxD,MAAO,CAAE,OAAM,SAAQ,CACzB,EACA,cAAe,CAAE,OAAM,UAAS,UAC9B,IAAI,mBAAmB,CACrB,KAAM,OAAOD,IAAS,SAAWA,EAAOA,IAAS,IAAA,GAAY,OAAOA,CAAI,EAAI,IAAA,GAC5E,UACA,MACF,CAAC,EACH,YAAa,CAAE,OAAM,WAAY,IAAI,iBAAiB,CAAE,OAAM,OAAM,CAAC,CACvE,CAAC,ECvCD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,aAAa,EAAA,AAAE,CAAC,EAG1F,MAAa,OAAU,GACrB1B,EAAO,QAAQC,EAAM,QAAQ,MAAO2B,CAAgB,CAAC,EAGvD,MAAaC,GAAqB,gBAAO,QACzB,gBAAM,QAAQ,MAAO,CAAE,UAAa,KAAM,CAAC,CAC3D,EAGA,MAAaC,GAA2B,qBAAO9D,CAAiB,EAGhE,MAAa+D,GAA0B,qBAAO7D,CAAgB"}
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 { UnknownResendError, ResendParseError } from "./errors.ts";
11
12
  * ResendOpContext>` explicitly so the compiler never infers these back out of
12
13
  * the schema generics.
13
14
  */
14
- export type ResendOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownResendError | ConfigError | HttpClientError.HttpClientError | ResendParseError | InvalidInput;
15
+ export type ResendOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownResendError | ConfigError | HttpClientError.HttpClientError | ResendParseError | InvalidInput | SdkError;
15
16
  /** Context (requirements) shared by every generated Resend operation. */
16
17
  export type ResendOpContext = Credentials | HttpClient.HttpClient;
17
18
  export declare const ResendProtocol: 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,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,kBAAkB,GAClB,WAAW,GACX,eAAe,CAAC,eAAe,GAC/B,gBAAgB,GAChB,YAAY,CAAC;AAEjB,yEAAyE;AACzE,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAElE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CA2BnD,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,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