@distilled.cloud/porkbun 1.0.0-rc.20 → 1.0.0-rc.21
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/README.md +0 -1
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/credentials.d.ts +6 -3
- package/lib/credentials.d.ts.map +1 -1
- package/lib/errors.d.ts +7 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.lazy.js.map +1 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/protocol.d.ts +9 -12
- package/lib/protocol.d.ts.map +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/porkbun.d.ts +660 -14
- package/lib/services/porkbun.d.ts.map +1 -1
- package/lib/services/porkbun.js +254 -227
- package/lib/services/porkbun.js.map +1 -1
- package/lib/services.lazy/porkbun.js +2 -2
- package/lib/traits.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/credentials.ts +23 -17
- package/src/errors.ts +9 -1
- package/src/protocol.ts +13 -23
- package/src/services/porkbun.ts +4837 -2975
package/README.md
CHANGED
package/lib/_bundle/sdk.js
CHANGED
|
@@ -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
|
|
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 ee,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 oe,errors$TooManyRequests as o,errors$Unauthorized as s,errors$UnknownErrorFields as c,errors$UnprocessableEntity as l,protocol_rest$RawResponse as u,protocol_rest$RawResponseRoot as d,protocol_rest$SensitiveValue as f,protocol_rest$rawResponseRootSymbol as p,protocol_rest$rawResponseSymbol as m,protocol_rest$restProtocol as h,protocol_rest$sensitiveValueSymbol as g,protocol_rest$unknownErrorProps 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$Union 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 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.effect(Credentials,/*@__PURE__*/ Z.map(/*@__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`}}),e=>Z.succeed(e)));var UnknownPorkbunError=class extends (/*@__PURE__*/ J()(`UnknownPorkbunError`,c)){};var PorkbunParseError=class extends (/*@__PURE__*/ J()(`PorkbunParseError`,{body:Y,cause:Y}).pipe(B)){};const Me=e;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 Ne=/*@__PURE__*/ h({credentials:/*@__PURE__*/ Z.flatten(Credentials),baseUrl:e=>e.apiBaseUrl,headers:e=>formatHeaders(e),errorEnvelope,unknownError:e=>new UnknownPorkbunError(_(e)),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 Pe=/*@__PURE__*/ Z.provide(/*@__PURE__*/ Q.succeed(Retry,{while:()=>false}));const Fe=/*@__PURE__*/ policy(W);const Ie=/*@__PURE__*/ policy(K);export{z as Ca,v as Zb,y as _b,j as a,M as b,Credentials as credentials$Credentials,je as credentials$CredentialsFromEnv,Ae as credentials$DEFAULT_API_BASE_URL,formatHeaders as credentials$formatHeaders,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,ee 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,PorkbunParseError as errors$PorkbunParseError,Me as errors$PorkbunServiceErrors,oe as errors$ServiceUnavailable,o as errors$TooManyRequests,s as errors$Unauthorized,UnknownPorkbunError as errors$UnknownPorkbunError,l as errors$UnprocessableEntity,N as f,b as hc,x as ic,S as jc,P as l,C as lc,F as m,w as mc,I as n,T as oc,Ne as protocol$PorkbunProtocol,E as qc,D as rc,Retry as retry$Retry,V as retry$capped,H as retry$jittered,U as retry$makeDefault,Pe as retry$none,policy as retry$policy,Fe as retry$throttling,W as retry$throttlingFactory,G as retry$throttlingOptions,Ie as retry$transient,K as retry$transientFactory,q as retry$transientOptions,O as tc,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,u as traits$RawResponse,d as traits$RawResponseRoot,he as traits$ResponseCode,f 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,g as traits$sensitiveValueSymbol,ke as traits$unionCasesSymbol,L as ya,k as yc,R as za,A as zc};
|
|
2
2
|
//# sourceMappingURL=sdk.js.map
|
package/lib/_bundle/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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","
|
|
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","rawResponseRootSymbol","rawResponseSymbol","restProtocol","sensitiveValueSymbol","unknownErrorProps","Array","Boolean","NullOr","Number","Record","String","Struct","TaggedError","Union","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","secretApiKey","PorkbunServiceErrors","body","obj","code","message","PorkbunProtocol","creds","info","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"ovEAeA,MAAasF,GAAuB,sCAQpC,IAAa,YAAb,eACwB,gBAAQ,QAA4C,CAAC,CACzE,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,EASF,MAAaC,GAA0E,gBAAM,OAC3F,YACc,gBAAO,IACL,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,EACA,GAAWP,EAAO,QAAQI,CAAM,CACnC,CACF,EC3CA,IAAa,oBAAb,eACwB,gBAAwC,CAAC,CAC7D,sBACAtE,CACF,EAAA,AAAE,CAAC,EAGL,IAAa,kBAAb,eACwB,gBAAsC,CAAC,CAAC,oBAAqB,CACjF,KAAMjB,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKC,CAAuB,EAAA,AAAE,CAAC,EAOpC,MAAa0F,GAAuBzF,ECTpC,MAAM,cAAiB,GAAiD,CACtE,GAAI0F,IAAS,MAAQ,OAAOA,IAAS,SAAU,OAAO,IAAA,GACtD,MAAMC,EAAMD,EACZ,MAAME,EAAOD,EAAI,KACjB,MAAME,EAAUF,EAAI,QACpB,GAAI,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,GAAgC,gBAAa,CAGxD,YAA2B,gBAAO,QAAQ,WAAW,EACrD,QAAU,GAAUC,EAAM,WAC1B,QAAU,GAAU,cAAcA,CAAK,EACvC,cACA,aAAe,GAAS,IAAI,oBAAoBvE,EAAkBwE,CAAI,CAAC,EACvE,YAAa,CAAE,OAAM,WAAY,IAAI,kBAAkB,CAAE,OAAM,OAAM,CAAC,CACxE,CAAC,EC9BD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,cAAc,EAAA,AAAE,CAAC,EAG3F,MAAa,OAAU,GACrBf,EAAO,QAAQC,EAAM,QAAQ,MAAOe,CAAgB,CAAC,EAGvD,MAAaC,GAAqB,gBAAO,QACzB,gBAAM,QAAQ,MAAO,CAAE,UAAa,KAAM,CAAC,CAC3D,EAGA,MAAaC,GAA2B,qBAAOhD,CAAiB,EAGhE,MAAaiD,GAA0B,qBAAO/C,CAAgB"}
|
package/lib/credentials.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ConfigError } from "@distilled.cloud/core/errors";
|
|
|
5
5
|
* Porkbun authenticates with a public API key and a secret API key, sent as
|
|
6
6
|
* `X-API-Key` / `X-Secret-API-Key` (header auth; the JSON-body form is
|
|
7
7
|
* equivalent). The `Credentials` service holds an *effect* that resolves the
|
|
8
|
-
* current credentials on every request (the protocol
|
|
8
|
+
* current credentials on every request (the protocol resolves it per
|
|
9
9
|
* request on the calling fiber).
|
|
10
10
|
*/
|
|
11
11
|
import * as Context from "effect/Context";
|
|
@@ -18,7 +18,7 @@ export interface Config {
|
|
|
18
18
|
readonly secretApiKey: Redacted.Redacted<string>;
|
|
19
19
|
readonly apiBaseUrl: string;
|
|
20
20
|
}
|
|
21
|
-
declare const Credentials_base: Context.ServiceClass<Credentials, "PorkbunCredentials", Effect.Effect<Config,
|
|
21
|
+
declare const Credentials_base: Context.ServiceClass<Credentials, "PorkbunCredentials", Effect.Effect<Config, never, never>>;
|
|
22
22
|
export declare class Credentials extends /*@__PURE__*/ Credentials_base {
|
|
23
23
|
}
|
|
24
24
|
/** Auth headers for a resolved credentials config. */
|
|
@@ -32,7 +32,10 @@ export declare const fromApiKey: (config: {
|
|
|
32
32
|
/**
|
|
33
33
|
* Reads PORKBUN_API_KEY and PORKBUN_SECRET_API_KEY (required) and
|
|
34
34
|
* PORKBUN_API_BASE_URL (optional).
|
|
35
|
+
*
|
|
36
|
+
* Its configuration is read and checked once, when the layer is built: a
|
|
37
|
+
* problem there fails the layer with `ConfigError`.
|
|
35
38
|
*/
|
|
36
|
-
export declare const CredentialsFromEnv: Layer.Layer<Credentials>;
|
|
39
|
+
export declare const CredentialsFromEnv: Layer.Layer<Credentials, ConfigError>;
|
|
37
40
|
export {};
|
|
38
41
|
//# sourceMappingURL=credentials.d.ts.map
|
package/lib/credentials.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D;;;;;;;;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;IACjC,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,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAQxB,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAqBpE,CAAC"}
|
package/lib/errors.d.ts
CHANGED
|
@@ -30,4 +30,11 @@ declare const PorkbunParseError_base: Schema.TaggedErrorClass<"PorkbunParseError
|
|
|
30
30
|
/** Schema parse error wrapper. */
|
|
31
31
|
export declare class PorkbunParseError extends /*@__PURE__*/ PorkbunParseError_base {
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* The errors declared on the Porkbun service: any operation can return them,
|
|
35
|
+
* and every generated operation lists them as its `serviceErrors`. Today that
|
|
36
|
+
* is each of core's status classes (401, 403, 404, 429, the 5xx ...).
|
|
37
|
+
*/
|
|
38
|
+
export declare const PorkbunServiceErrors: readonly [typeof import("@distilled.cloud/core/errors").Unauthorized, typeof import("@distilled.cloud/core/errors").Forbidden, typeof import("@distilled.cloud/core/errors").NotFound, typeof import("@distilled.cloud/core/errors").BadRequest, typeof import("@distilled.cloud/core/errors").Conflict, typeof import("@distilled.cloud/core/errors").UnprocessableEntity, typeof import("@distilled.cloud/core/errors").TooManyRequests, typeof import("@distilled.cloud/core/errors").Locked, typeof import("@distilled.cloud/core/errors").InternalServerError, typeof import("@distilled.cloud/core/errors").BadGateway, typeof import("@distilled.cloud/core/errors").ServiceUnavailable, typeof import("@distilled.cloud/core/errors").GatewayTimeout];
|
|
39
|
+
export type PorkbunServiceError = InstanceType<(typeof PorkbunServiceErrors)[number]>;
|
|
33
40
|
//# sourceMappingURL=errors.d.ts.map
|
package/lib/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","
|
|
1
|
+
{"version":3,"file":"errors.d.ts","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,+EAA+E;AAC/E,qBAAa,mBACX,SAAQ,aAAa,CAAC,wBAGrB;CAAG;;;;;;;;;AAEN,kCAAkC;AAClC,qBAAa,iBACX,SAAQ,aAAa,CAAC,sBAGU;CAAG;AAErC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,+tBAAa,CAAC;AAC/C,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { errors$API_ERRORS as API_ERRORS, errors$BadGateway as BadGateway, errors$BadRequest as BadRequest, errors$ConfigError as ConfigError, errors$Conflict as Conflict, errors$DEFAULT_ERRORS as DEFAULT_ERRORS, errors$Forbidden as Forbidden, errors$GatewayTimeout as GatewayTimeout, errors$HTTP_STATUS_MAP as HTTP_STATUS_MAP, errors$InternalServerError as InternalServerError, errors$Locked as Locked, errors$NotFound as NotFound, errors$PorkbunParseError as PorkbunParseError, errors$ServiceUnavailable as ServiceUnavailable, errors$TooManyRequests as TooManyRequests, errors$Unauthorized as Unauthorized, errors$UnknownPorkbunError as UnknownPorkbunError, errors$UnprocessableEntity as UnprocessableEntity } from "./_bundle/sdk.js";
|
|
1
|
+
export { errors$API_ERRORS as API_ERRORS, errors$BadGateway as BadGateway, errors$BadRequest as BadRequest, errors$ConfigError as ConfigError, errors$Conflict as Conflict, errors$DEFAULT_ERRORS as DEFAULT_ERRORS, errors$Forbidden as Forbidden, errors$GatewayTimeout as GatewayTimeout, errors$HTTP_STATUS_MAP as HTTP_STATUS_MAP, errors$InternalServerError as InternalServerError, errors$Locked as Locked, errors$NotFound as NotFound, errors$PorkbunParseError as PorkbunParseError, errors$PorkbunServiceErrors as PorkbunServiceErrors, errors$ServiceUnavailable as ServiceUnavailable, errors$TooManyRequests as TooManyRequests, errors$Unauthorized as Unauthorized, errors$UnknownPorkbunError as UnknownPorkbunError, errors$UnprocessableEntity as UnprocessableEntity } from "./_bundle/sdk.js";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAKhD,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC"}
|
package/lib/index.lazy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAA8C,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,4EAA4E;AAC5E,qEAAqE;AACrE,wEAAwE;AACxE,yBAAyB;AACzB,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC"}
|
package/lib/pagination.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC"}
|
package/lib/protocol.d.ts
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { API_ERRORS, ConfigError, InvalidInput } from "@distilled.cloud/core/errors";
|
|
3
|
-
import type { SdkError } from "@distilled.cloud/core/sdk-error";
|
|
1
|
+
import type { ErrorOf } from "@distilled.cloud/core/protocol";
|
|
4
2
|
import type * as HttpClient from "effect/http/HttpClient";
|
|
5
|
-
import type * as HttpClientError from "effect/http/HttpClientError";
|
|
6
|
-
import type * as Layer from "effect/Layer";
|
|
7
3
|
import { Credentials } from "./credentials.ts";
|
|
8
|
-
import { UnknownPorkbunError, PorkbunParseError } from "./errors.ts";
|
|
4
|
+
import { UnknownPorkbunError, PorkbunParseError, type PorkbunServiceError } from "./errors.ts";
|
|
9
5
|
/**
|
|
10
|
-
*
|
|
11
|
-
* service
|
|
12
|
-
*
|
|
13
|
-
*
|
|
6
|
+
* What every generated Porkbun operation fails with besides its own errors:
|
|
7
|
+
* the service's errors, the protocol's, and what resolving the credentials
|
|
8
|
+
* fails with. Generated service files annotate operations with
|
|
9
|
+
* `API.OperationMethod<I, O, PorkbunOpError, PorkbunOpContext>` explicitly so
|
|
10
|
+
* the compiler never infers these back out of the schema generics.
|
|
14
11
|
*/
|
|
15
|
-
export type PorkbunOpError =
|
|
12
|
+
export type PorkbunOpError = PorkbunServiceError | ErrorOf<typeof PorkbunProtocol>;
|
|
16
13
|
/** Context (requirements) shared by every generated Porkbun operation. */
|
|
17
14
|
export type PorkbunOpContext = Credentials | HttpClient.HttpClient;
|
|
18
|
-
export declare const PorkbunProtocol:
|
|
15
|
+
export declare const PorkbunProtocol: import("@distilled.cloud/core/protocol").Protocol<PorkbunParseError | UnknownPorkbunError | import("@distilled.cloud/core/protocol-rest").RestProtocolError, Credentials>;
|
|
19
16
|
//# sourceMappingURL=protocol.d.ts.map
|
package/lib/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAwB9D,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE/F;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG,OAAO,CAAC,OAAO,eAAe,CAAC,CAAC;AAEnF,0EAA0E;AAC1E,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAiBnE,eAAO,MAAM,eAAe,2KAS1B,CAAC"}
|
package/lib/retry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.d.ts","
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAuC,MAAM,6BAA6B,CAAC;AAC/F;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;;AAErC,uEAAuE;AACvE,qBAAa,KAAM,SAAQ,aAAa,CAAC,UAAgD;CAAG;AAE5F,yEAAyE;AACzE,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,sCAAsC;AACtC,eAAO,MAAM,IAAI,mFAEhB,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,UAAU,mFAA0C,CAAC;AAElE,oFAAoF;AACpF,eAAO,MAAM,SAAS,mFAAyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../src/services/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC"}
|