@distilled.cloud/porkbun 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{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 ee,errors$HTTP_STATUS_MAP as te,errors$InternalServerError as ne,errors$Locked as re,errors$NotFound as ie,errors$ServiceUnavailable as s,errors$TooManyRequests as c,errors$Unauthorized 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 _,schema_lite$Array as v,schema_lite$Boolean as y,schema_lite$NullOr as b,schema_lite$Number as x,schema_lite$Record as S,schema_lite$String as C,schema_lite$Struct as w,schema_lite$TaggedError as T,schema_lite$Unknown as E,schema_lite$at as D,schema_lite$optional as O,schema_lite$suspend as k}from"@distilled.cloud/core/_bundle/rest";import{api$D as A,api$call as j,api$error as M,api$named as N,api$newError as P,api$op as F,category$withAuthError as I,category$withBadRequestError as L,category$withConflictError as R,category$withParseError as z,category$withServerError 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 ae,trait$Body as q,trait$FormDataFile as J,trait$Header as oe,trait$Http as se,trait$HttpBody as ce,trait$KeyDictionary as le,trait$Label as ue,trait$Query as de,trait$ResponseCode as fe,trait$UnionCases as pe,trait$applyErrorMatchers as me,trait$bodySymbol as he,trait$errorMatchersSymbol as ge,trait$formDataFileSymbol as _e,trait$getErrorMatchers as ve,trait$headerSymbol as ye,trait$httpBodySymbol as be,trait$httpSymbol as xe,trait$keyDictionarySymbol as Se,trait$labelSymbol as Ce,trait$querySymbol as we,trait$responseCodeSymbol as Te,trait$unionCasesSymbol as Ee}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"@distilled.cloud/core/schema-lite-typed";const De=`https://api.porkbun.com/api/json/v3`;var Credentials=class extends (/*@__PURE__*/ Y.Service()(`PorkbunCredentials`)){};const formatHeaders=e=>({"X-API-Key":Q.value(e.apiKey),"X-Secret-API-Key":Q.value(e.secretApiKey)});const fromApiKey=e=>Z.succeed(Credentials,X.succeed({apiKey:e.apiKey,secretApiKey:e.secretApiKey,apiBaseUrl:e.apiBaseUrl??`https://api.porkbun.com/api/json/v3`}));const Oe=/*@__PURE__*/ Z.succeed(Credentials,/*@__PURE__*/ X.gen(function*(){const e=process.env.PORKBUN_API_KEY;const t=process.env.PORKBUN_SECRET_API_KEY;if(!e||!t)return yield*new r({message:`PORKBUN_API_KEY and PORKBUN_SECRET_API_KEY environment variables are required`});return{apiKey:Q.make(e),secretApiKey:Q.make(t),apiBaseUrl:process.env.PORKBUN_API_BASE_URL??`https://api.porkbun.com/api/json/v3`}}).pipe(X.orDie));var UnknownPorkbunError=class extends (/*@__PURE__*/ $.TaggedError()(`UnknownPorkbunError`,{code:/*@__PURE__*/ $.optional($.String),message:/*@__PURE__*/ $.optional($.String),body:$.Unknown}).pipe(B)){};var PorkbunParseError=class extends (/*@__PURE__*/ $.TaggedError()(`PorkbunParseError`,{body:$.Unknown,cause:$.Unknown}).pipe(z)){};const errorEnvelope=e=>{if(e===null||typeof e!==`object`)return void 0;const t=e;const n=t.code;const r=t.message;if(typeof n!==`string`&&typeof r!==`string`)return void 0;return{code:typeof n===`string`?n:void 0,message:typeof r===`string`?r:void 0}};const ke=/*@__PURE__*/ m({credentials:/*@__PURE__*/ X.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>formatHeaders(e),errorEnvelope,unknownError:({code:e,message:t,body:n})=>new UnknownPorkbunError({code:typeof e===`string`?e:e!==void 0?String(e):void 0,message:t,body:n}),parseError:({body:e,cause:t})=>new PorkbunParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ Y.Service()(`PorkbunRetry`)){};const policy=e=>X.provide(Z.succeed(Retry,e));const Ae=/*@__PURE__*/ X.provide(/*@__PURE__*/ Z.succeed(Retry,{while:()=>false}));const je=/*@__PURE__*/ policy(W);const Me=/*@__PURE__*/ policy(K);export{P as _,S as a,L as b,T as c,Credentials as credentials$Credentials,Oe as credentials$CredentialsFromEnv,De as credentials$DEFAULT_API_BASE_URL,formatHeaders as credentials$formatHeaders,fromApiKey as credentials$fromApiKey,O as d,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,ee as errors$GatewayTimeout,te as errors$HTTP_STATUS_MAP,ne as errors$InternalServerError,re as errors$Locked,ie as errors$NotFound,PorkbunParseError as errors$PorkbunParseError,s as errors$ServiceUnavailable,c as errors$TooManyRequests,l as errors$Unauthorized,UnknownPorkbunError as errors$UnknownPorkbunError,u as errors$UnprocessableEntity,k as f,N as g,M as h,x as i,E as l,j as m,y as n,C as o,A as p,ke as protocol$PorkbunProtocol,b as r,Retry as retry$Retry,V as retry$capped,H as retry$jittered,U as retry$makeDefault,Ae as retry$none,policy as retry$policy,je as retry$throttling,W as retry$throttlingFactory,G as retry$throttlingOptions,Me as retry$transient,K as retry$transientFactory,ae as retry$transientOptions,w as s,v as t,q as traits$Body,J as traits$FormDataFile,oe as traits$Header,se as traits$Http,ce as traits$HttpBody,le as traits$KeyDictionary,ue as traits$Label,de as traits$Query,d as traits$RawResponse,f as traits$RawResponseRoot,fe as traits$ResponseCode,p as traits$SensitiveValue,pe as traits$UnionCases,me as traits$applyErrorMatchers,he as traits$bodySymbol,ge as traits$errorMatchersSymbol,_e as traits$formDataFileSymbol,ve as traits$getErrorMatchers,ye as traits$headerSymbol,be as traits$httpBodySymbol,xe as traits$httpSymbol,Se as traits$keyDictionarySymbol,Ce as traits$labelSymbol,we as traits$querySymbol,h as traits$rawResponseRootSymbol,g as traits$rawResponseSymbol,Te as traits$responseCodeSymbol,_ as traits$sensitiveValueSymbol,Ee as traits$unionCasesSymbol,D as u,F as v,R as x,I as y};
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.porkbun.com/api/json/v3`;var Credentials=class extends (/*@__PURE__*/ X.Service()(`PorkbunCredentials`)){};const formatHeaders=e=>({"X-API-Key":$.value(e.apiKey),"X-Secret-API-Key":$.value(e.secretApiKey)});const fromApiKey=e=>Q.succeed(Credentials,Z.succeed({apiKey:e.apiKey,secretApiKey:e.secretApiKey,apiBaseUrl:e.apiBaseUrl??`https://api.porkbun.com/api/json/v3`}));const je=/*@__PURE__*/ Q.succeed(Credentials,/*@__PURE__*/ Z.gen(function*(){const e=process.env.PORKBUN_API_KEY;const t=process.env.PORKBUN_SECRET_API_KEY;if(!e||!t)return yield*new r({message:`PORKBUN_API_KEY and PORKBUN_SECRET_API_KEY environment variables are required`});return{apiKey:$.make(e),secretApiKey:$.make(t),apiBaseUrl:process.env.PORKBUN_API_BASE_URL??`https://api.porkbun.com/api/json/v3`}}));var UnknownPorkbunError=class extends (/*@__PURE__*/ q()(`UnknownPorkbunError`,{code:/*@__PURE__*/ Y(K),message:/*@__PURE__*/ Y(K),body:J}).pipe(R)){};var PorkbunParseError=class extends (/*@__PURE__*/ q()(`PorkbunParseError`,{body:J,cause:J}).pipe(L)){};const errorEnvelope=e=>{if(e===null||typeof e!==`object`)return void 0;const t=e;const n=t.code;const r=t.message;if(typeof n!==`string`&&typeof r!==`string`)return void 0;return{code:typeof n===`string`?n:void 0,message:typeof r===`string`?r:void 0}};const Me=/*@__PURE__*/ f({credentials:/*@__PURE__*/ Z.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>formatHeaders(e),errorEnvelope,unknownError:({code:e,message:t,body:n})=>new UnknownPorkbunError({code:typeof e===`string`?e:e!==void 0?String(e):void 0,message:t,body:n}),parseError:({body:e,cause:t})=>new PorkbunParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ X.Service()(`PorkbunRetry`)){};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{I as Ba,g as Mb,_ as Nb,v as Ub,y as Vb,b as Wb,x as Yb,S as Zb,O as a,C as ac,k as c,Credentials as credentials$Credentials,je as credentials$CredentialsFromEnv,Ae as credentials$DEFAULT_API_BASE_URL,formatHeaders as credentials$formatHeaders,fromApiKey as credentials$fromApiKey,w as dc,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,PorkbunParseError as errors$PorkbunParseError,re as errors$ServiceUnavailable,ie as errors$TooManyRequests,ae as errors$Unauthorized,UnknownPorkbunError as errors$UnknownPorkbunError,oe as errors$UnprocessableEntity,T as fc,j as k,E as kc,M as l,D as lc,N as m,Me as protocol$PorkbunProtocol,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 xa,F as ya};
2
2
  //# sourceMappingURL=sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","names":["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","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","Schema","DEFAULT_API_BASE_URL","config","CredentialsFromEnv","apiKey","secretApiKey","body","obj","code","message","PorkbunProtocol","resolve","creds","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"grEAeA,MAAamF,GAAuB,sCAQpC,IAAa,YAA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AI,OAAOC,IAAS,UAAY,OAAOC,IAAY,SAAU,OAAO,IAAA,GACpE,MAAO,CACL,KAAM,OAAOD,IAAS,SAAWA,EAAO,IAAA,GACxC,QAAS,OAAOC,IAAY,SAAWA,EAAU,IAAA,EACnD,CACF,EAEA,MAAaC,GAA2D,gBAAyB,CAG/F,YAA2B,gBAAO,QAAQ,YAAc,GAAYC,CAAO,EAC3E,QAAU,GAAUC,EAAM,WAC1B,QAAU,GAAU,cAAcA,CAAK,EACvC,cACA,cAAe,CAAE,OAAM,UAAS,UAC9B,IAAI,oBAAoB,CACtB,KAAM,OAAOJ,IAAS,SAAWA,EAAOA,IAAS,IAAA,GAAY,OAAOA,CAAI,EAAI,IAAA,GAC5E,UACA,MACF,CAAC,EACH,YAAa,CAAE,OAAM,WAAY,IAAI,kBAAkB,CAAE,OAAM,OAAM,CAAC,CACxE,CAAC,ECtCD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,cAAc,EAAA,AAAE,CAAC,EAG3F,MAAa,OAAU,GACrBX,EAAO,QAAQC,EAAM,QAAQ,MAAOe,CAAgB,CAAC,EAGvD,MAAaC,GAAqB,gBAAO,QACzB,gBAAM,QAAQ,MAAO,CAAE,UAAa,KAAM,CAAC,CAC3D,EAGA,MAAaC,GAA2B,qBAAO9C,CAAiB,EAGhE,MAAa+C,GAA0B,qBAAO7C,CAAgB"}
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","secretApiKey","body","obj","code","message","PorkbunProtocol","resolve","creds","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"yvEAeA,MAAawF,GAAuB,sCAQpC,IAAa,YAAb,eACwB,gBAAQ,QAAyD,CAAC,CACtF,oBACF,EAAA,AAAE,CAAC,EAGL,MAAa,cAAiB,IAA4C,CACxE,YAAaD,EAAS,MAAME,EAAO,MAAM,EACzC,mBAAoBF,EAAS,MAAME,EAAO,YAAY,CACxD,GAGA,MAAa,WAAc,GAKzBH,EAAM,QACJ,YACAD,EAAO,QAAQ,CACb,OAAQI,EAAO,OACf,aAAcA,EAAO,aACrB,WAAYA,EAAO,YAAA,qCACrB,CAAC,CACH,EAMF,MAAaC,GAA6D,gBAAM,QAC9E,YACc,gBAAO,IAAI,WAAa,CACpC,MAAMC,EAAS,QAAQ,IAAI,gBAC3B,MAAMC,EAAe,QAAQ,IAAI,uBAEjC,GAAI,CAACD,GAAU,CAACC,EACd,OAAO,MAAO,IAAIrF,EAAY,CAC5B,QAAS,+EACX,CAAC,EAGH,MAAO,CACL,OAAQgF,EAAS,KAAKI,CAAM,EAC5B,aAAcJ,EAAS,KAAKK,CAAY,EACxC,WAAY,QAAQ,IAAI,sBAAA,qCAC1B,CACF,CAAC,CACH,ECtCA,IAAa,oBAAb,eACwB,gBAAwC,CAAC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,MAAaC,GAA2B,qBAAOjD,CAAiB,EAGhE,MAAakD,GAA0B,qBAAOhD,CAAgB"}
@@ -1,3 +1,4 @@
1
+ import { ConfigError } from "@distilled.cloud/core/errors";
1
2
  /**
2
3
  * Porkbun credentials -- hand-written.
3
4
  *
@@ -17,7 +18,7 @@ export interface Config {
17
18
  readonly secretApiKey: Redacted.Redacted<string>;
18
19
  readonly apiBaseUrl: string;
19
20
  }
20
- declare const Credentials_base: Context.ServiceClass<Credentials, "PorkbunCredentials", Effect.Effect<Config, never, never>>;
21
+ declare const Credentials_base: Context.ServiceClass<Credentials, "PorkbunCredentials", Effect.Effect<Config, ConfigError, never>>;
21
22
  export declare class Credentials extends /*@__PURE__*/ Credentials_base {
22
23
  }
23
24
  /** Auth headers for a resolved credentials config. */
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,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,wCAAwC,CAAC;AAE1E,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WACX,SAAQ,aAAa,CAAC,gBAErB;CAAG;AAEN,sDAAsD;AACtD,eAAO,MAAM,aAAa,WAAY,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAGlE,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,UAAU,WAAY;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YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAQxB,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAkBvD,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * @distilled.cloud/porkbun -- Porkbun SDK for Effect.
3
3
  *
4
- * `./services` is generated by `scripts/generate.ts` from the Smithy model
5
- * in `.generated-specs` (written by `scripts/convert.ts` from the OpenAPI
6
- * spec). 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 OpenAPI spec. Everything else in this
6
+ * 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 { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors";
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 { UnknownPorkbunError, PorkbunParseError } from "./errors.ts";
11
12
  * PorkbunOpError, PorkbunOpContext>` explicitly so the compiler never infers
12
13
  * these back out of the schema generics.
13
14
  */
14
- export type PorkbunOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownPorkbunError | ConfigError | HttpClientError.HttpClientError | PorkbunParseError;
15
+ export type PorkbunOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownPorkbunError | ConfigError | HttpClientError.HttpClientError | PorkbunParseError | InvalidInput | SdkError;
15
16
  /** Context (requirements) shared by every generated Porkbun operation. */
16
17
  export type PorkbunOpContext = Credentials | HttpClient.HttpClient;
17
18
  export declare const PorkbunProtocol: 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,MAAM,8BAA8B,CAAC;AAoB5E,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAA8B,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErE;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACtB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,mBAAmB,GACnB,WAAW,GACX,eAAe,CAAC,eAAe,GAC/B,iBAAiB,CAAC;AAEtB,0EAA0E;AAC1E,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAiBnE,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAcpD,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;AAmBhE,OAAO,K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