@distilled.cloud/render 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.
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/errors.d.ts +5 -8
- package/lib/errors.d.ts.map +1 -1
- package/lib/pagination.js +1 -1
- package/lib/pagination.js.map +1 -1
- package/lib/protocol.d.ts +2 -1
- package/lib/protocol.d.ts.map +1 -1
- package/lib/services/render.d.ts +1892 -1019
- package/lib/services/render.d.ts.map +1 -1
- package/lib/services/render.js +318 -280
- package/lib/services/render.js.map +1 -1
- package/lib/services.lazy/render.js +2 -2
- package/package.json +5 -5
- package/src/errors.ts +5 -5
- package/src/pagination.ts +1 -1
- package/src/protocol.ts +5 -8
- package/src/services/render.ts +5280 -3164
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
|
|
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.render.com/v1`;var Credentials=class extends (/*@__PURE__*/ X.Service()(`RenderCredentials`)){};const fromApiKey=e=>Q.succeed(Credentials,Z.succeed({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl??`https://api.render.com/v1`}));const Ae=/*@__PURE__*/ Q.succeed(Credentials,/*@__PURE__*/ Z.gen(function*(){const e=process.env.RENDER_API_KEY;if(!e)return yield*new r({message:`RENDER_API_KEY environment variable is required`});return{apiKey:$.make(e),apiBaseUrl:process.env.RENDER_API_BASE_URL??`https://api.render.com/v1`}}));var UnknownRenderError=class extends (/*@__PURE__*/ J()(`UnknownRenderError`,l)){};var RenderParseError=class extends (/*@__PURE__*/ J()(`RenderParseError`,{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)}`,Accept:`application/json`}),unknownError:e=>new UnknownRenderError(v(e)),parseError:({body:e,cause:t})=>new RenderParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ X.Service()(`RenderRetry`)){};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,RenderParseError as errors$RenderParseError,o as errors$ServiceUnavailable,s as errors$TooManyRequests,c as errors$Unauthorized,UnknownRenderError as errors$UnknownRenderError,u as errors$UnprocessableEntity,D as fc,O as hc,P as k,F as l,I as m,k as mc,A as nc,je as protocol$RenderProtocol,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
|
package/lib/_bundle/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","names":["Schema.
|
|
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","RenderProtocol","resolve","creds","info","optionsOrFactory","none","throttling","transient"],"s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AAgB,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 UnknownRenderError_base: Schema.TaggedErrorClass<"UnknownRenderError", {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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 Render error -- returned when nothing else matches the failure. */
|
|
23
20
|
export declare class UnknownRenderError extends /*@__PURE__*/ UnknownRenderError_base {
|
|
24
21
|
}
|
package/lib/errors.d.ts.map
CHANGED
|
@@ -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;
|
|
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,8EAA8E;AAC9E,qBAAa,kBACX,SAAQ,aAAa,CAAC,uBAGrB;CAAG;;;;;;;;;AAEN,kCAAkC;AAClC,qBAAa,gBACX,SAAQ,aAAa,CAAC,qBAGU;CAAG"}
|
package/lib/pagination.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{pagination$getItems as e,pagination$paginateCursor as
|
|
1
|
+
import{pagination$getItems as e,pagination$missingPaginationConfig as t,pagination$paginateCursor as n}from"@distilled.cloud/core/_bundle/base";import*as r from"effect/Effect";import*as i from"effect/Stream";const paginateRender=(n,a,o)=>{const s=o.inputToken;if(!s)return t(`Render cursor pagination requires inputToken`);const c=o.items??`body`;const l=typeof a[s]===`string`?a[s]:void 0;return i.unfold({cursor:l,done:false},t=>r.gen(function*(){if(t.done)return void 0;const r=yield*n({...a,...t.cursor?{[s]:t.cursor}:{}});const i=Array.isArray(r)?r:e(r,c);const o=i.at(-1);const l=typeof o?.cursor===`string`?o.cursor:void 0;const u=t.cursor!==void 0&&l===t.cursor;return[r,{cursor:l,done:i.length===0||l===void 0||u}]}))};export{n as paginateCursor,paginateRender};
|
|
2
2
|
//# sourceMappingURL=pagination.js.map
|
package/lib/pagination.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","names":["Pagination.getItems","getItems","paginateCursor","Effect","Stream","inputToken","pagination","itemsPath","startCursor","input","state","response","operation","items","last","nextCursor","stuckCursor"],"sources":["../src/pagination.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pagination.js","names":["Pagination.missingPaginationConfig","Pagination.getItems","getItems","missingPaginationConfig","paginateCursor","Effect","Stream","inputToken","pagination","itemsPath","startCursor","input","state","response","operation","items","last","nextCursor","stuckCursor"],"sources":["../src/pagination.ts"],"mappings":"gNAmBA,MAAa,gBAAiD,EAAW,EAAO,IAAe,CAC7F,MAAMO,EAAaC,EAAW,WAC9B,GAAI,CAACD,EACH,OAAOP,EAAmC,8CAA8C,EAE1F,MAAMS,EAAYD,EAAW,OAAS,OAGtC,MAAME,EACJ,OAAOC,EAAMJ,KAAgB,SAAYI,EAAMJ,GAAyB,IAAA,GAE1E,OAAOD,EAAO,OAAO,CAAE,OAAQI,EAAa,KAAM,KAAM,EAAa,GACnEL,EAAO,IAAI,WAAa,CACtB,GAAIO,EAAM,KAAM,OAAO,IAAA,GAMvB,MAAMC,EAAW,MAAOC,EAAU,CAHhC,GAAGH,EACH,GAAIC,EAAM,OAAS,EAAGL,GAAaK,EAAM,MAAO,EAAI,CAAC,CAER,CAAC,EAChD,MAAMG,EAAQ,MAAM,QAAQF,CAAQ,EAAIA,EAAWZ,EAAoBY,EAAUJ,CAAS,EAC1F,MAAMO,EAAOD,EAAM,GAAG,CAAA,CAAE,EACxB,MAAME,EAAa,OAAOD,GAAM,SAAW,SAAWA,EAAK,OAAS,IAAA,GACpE,MAAME,EAAcN,EAAM,SAAW,IAAA,IAAaK,IAAeL,EAAM,OAEvE,MAAO,CACLC,EACA,CACE,OAAQI,EACR,KAAMF,EAAM,SAAW,GAAKE,IAAe,IAAA,IAAaC,CAC1D,CACF,CACF,CAAC,CACH,CACF"}
|
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 { UnknownRenderError, RenderParseError } from "./errors.ts";
|
|
|
11
12
|
* RenderOpError, RenderOpContext>` explicitly so the compiler never infers
|
|
12
13
|
* these back out of the schema generics.
|
|
13
14
|
*/
|
|
14
|
-
export type RenderOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownRenderError | ConfigError | HttpClientError.HttpClientError | RenderParseError | InvalidInput;
|
|
15
|
+
export type RenderOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownRenderError | ConfigError | HttpClientError.HttpClientError | RenderParseError | InvalidInput | SdkError;
|
|
15
16
|
/** Context (requirements) shared by every generated Render operation. */
|
|
16
17
|
export type RenderOpContext = Credentials | HttpClient.HttpClient;
|
|
17
18
|
export declare const RenderProtocol: Layer.Layer<API.Protocol>;
|
package/lib/protocol.d.ts.map
CHANGED
|
@@ -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;
|
|
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,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,GACZ,QAAQ,CAAC;AAEb,yEAAyE;AACzE,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAElE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAanD,CAAC"}
|