@distilled.cloud/temporal 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.
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/credentials.d.ts +2 -1
- package/lib/credentials.d.ts.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/protocol.d.ts +3 -2
- package/lib/protocol.d.ts.map +1 -1
- package/lib/services/temporal.d.ts +1961 -1960
- package/lib/services/temporal.d.ts.map +1 -1
- package/lib/services/temporal.js +176 -175
- package/lib/services/temporal.js.map +1 -1
- package/lib/services.lazy/temporal.js +1 -1
- package/package.json +7 -6
- package/src/credentials.ts +2 -2
- package/src/index.ts +3 -3
- package/src/protocol.ts +5 -2
- package/src/services/temporal.ts +2293 -1963
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 o,errors$GatewayTimeout 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 o,errors$GatewayTimeout as s,errors$HTTP_STATUS_MAP as c,errors$InternalServerError as l,errors$Locked as u,errors$NotFound as ee,errors$ServiceUnavailable as te,errors$TooManyRequests as ne,errors$Unauthorized as re,errors$UnprocessableEntity as d,protocol_rest$RawResponse as f,protocol_rest$RawResponseRoot as p,protocol_rest$SensitiveValue as m,protocol_rest$makeRestProtocol as h,protocol_rest$rawResponseRootSymbol as g,protocol_rest$rawResponseSymbol as _,protocol_rest$sensitiveValueSymbol as v,schema_lite$Array as y,schema_lite$Boolean as b,schema_lite$Number as x,schema_lite$Record as S,schema_lite$String as C,schema_lite$Struct as w,schema_lite$StructWithRest 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$named as M,api$op as N,category$withParseError as P,category$withServerError as F,retry$capped as I,retry$jittered as L,retry$makeDefault as R,retry$throttlingFactory as z,retry$throttlingOptions as B,retry$transientFactory as V,retry$transientOptions as H,schema_lite_typed$String as U,schema_lite_typed$TaggedError as W,schema_lite_typed$Unknown as G,schema_lite_typed$optional as K,trait$Body as ie,trait$FormDataFile as q,trait$Header as J,trait$Http as Y,trait$HttpBody as ae,trait$KeyDictionary as oe,trait$Label as se,trait$Query as ce,trait$ResponseCode as le,trait$UnionCases as ue,trait$applyErrorMatchers as de,trait$bodySymbol as fe,trait$errorMatchersSymbol as pe,trait$formDataFileSymbol as me,trait$getErrorMatchers as he,trait$headerSymbol as ge,trait$httpBodySymbol as _e,trait$httpSymbol as ve,trait$keyDictionarySymbol as ye,trait$labelSymbol as be,trait$querySymbol as xe,trait$responseCodeSymbol as Se,trait$unionCasesSymbol as Ce}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 we=`http://localhost:7243`;var Credentials=class extends (/*@__PURE__*/ X.Service()(`TemporalCredentials`)){};const fromApiKey=e=>Q.succeed(Credentials,Z.succeed({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl??`http://localhost:7243`}));const Te=/*@__PURE__*/ Q.succeed(Credentials,/*@__PURE__*/ Z.gen(function*(){const e=process.env.TEMPORAL_API_KEY;if(!e)return yield*new r({message:`TEMPORAL_API_KEY environment variable is required`});return{apiKey:$.make(e),apiBaseUrl:process.env.TEMPORAL_API_BASE_URL??`http://localhost:7243`}}));var UnknownTemporalError=class extends (/*@__PURE__*/ W()(`UnknownTemporalError`,{code:/*@__PURE__*/ K(U),message:/*@__PURE__*/ K(U),body:G}).pipe(F)){};var TemporalParseError=class extends (/*@__PURE__*/ W()(`TemporalParseError`,{body:G,cause:G}).pipe(P)){};const Ee=/*@__PURE__*/ h({credentials:/*@__PURE__*/ Z.flatMap(Credentials,e=>e),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${$.value(e.apiKey)}`}),unknownError:({code:e,message:t,body:n})=>new UnknownTemporalError({code:typeof e===`string`?e:e!==void 0?String(e):void 0,message:t,body:n}),parseError:({body:e,cause:t})=>new TemporalParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ X.Service()(`TemporalRetry`)){};const policy=e=>Z.provide(Q.succeed(Retry,e));const De=/*@__PURE__*/ Z.provide(/*@__PURE__*/ Q.succeed(Retry,{while:()=>false}));const Oe=/*@__PURE__*/ policy(z);const ke=/*@__PURE__*/ policy(V);export{y as Mb,b as Nb,x as Vb,S as Wb,C as Yb,w as Zb,T as _b,A as a,j as c,Credentials as credentials$Credentials,Te as credentials$CredentialsFromEnv,we as credentials$DEFAULT_API_BASE_URL,fromApiKey as credentials$fromApiKey,E as dc,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,ee as errors$NotFound,te as errors$ServiceUnavailable,TemporalParseError as errors$TemporalParseError,ne as errors$TooManyRequests,re as errors$Unauthorized,UnknownTemporalError as errors$UnknownTemporalError,d as errors$UnprocessableEntity,D as fc,M as k,O as kc,k as lc,N as m,Ee as protocol$TemporalProtocol,Retry as retry$Retry,I as retry$capped,L as retry$jittered,R as retry$makeDefault,De as retry$none,policy as retry$policy,Oe as retry$throttling,z as retry$throttlingFactory,B as retry$throttlingOptions,ke as retry$transient,V as retry$transientFactory,H as retry$transientOptions,ie as traits$Body,q as traits$FormDataFile,J as traits$Header,Y as traits$Http,ae as traits$HttpBody,oe as traits$KeyDictionary,se as traits$Label,ce as traits$Query,f as traits$RawResponse,p as traits$RawResponseRoot,le as traits$ResponseCode,m as traits$SensitiveValue,ue as traits$UnionCases,de as traits$applyErrorMatchers,fe as traits$bodySymbol,pe as traits$errorMatchersSymbol,me as traits$formDataFileSymbol,he as traits$getErrorMatchers,ge as traits$headerSymbol,_e as traits$httpBodySymbol,ve as traits$httpSymbol,ye as traits$keyDictionarySymbol,be as traits$labelSymbol,xe as traits$querySymbol,g as traits$rawResponseRootSymbol,_ as traits$rawResponseSymbol,Se as traits$responseCodeSymbol,v as traits$sensitiveValueSymbol,Ce as traits$unionCasesSymbol};
|
|
2
2
|
//# sourceMappingURL=sdk.js.map
|
package/lib/_bundle/sdk.js.map
CHANGED
|
@@ -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","Number","Record","String$1","Struct","Unknown","at","optional","suspend","D","call","named","op","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","
|
|
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","Number","Record","String$1","Struct","StructWithRest","Unknown","at","optional","suspend","D","call","named","op","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","TemporalProtocol","resolve","creds","code","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"+lEAoBA,MAAakF,GAAuB,wBAOpC,IAAa,YAAb,eACwB,gBAAQ,QAAyD,CAAC,CACtF,qBACF,EAAA,AAAE,CAAC,EAGL,MAAa,WAAc,GAIzBF,EAAM,QACJ,YACAD,EAAO,QAAQ,CACb,OAAQI,EAAO,OACf,WAAYA,EAAO,YAAA,uBACrB,CAAC,CACH,EAGF,MAAaC,GAA6D,gBAAM,QAC9E,YACc,gBAAO,IAAI,WAAa,CACpC,MAAMC,EAAS,QAAQ,IAAI,iBAE3B,GAAI,CAACA,EACH,OAAO,MAAO,IAAI9E,EAAY,CAC5B,QAAS,mDACX,CAAC,EAGH,MAAO,CACL,OAAQ0E,EAAS,KAAKI,CAAM,EAC5B,WAAY,QAAQ,IAAI,uBAAA,uBAC1B,CACF,CAAC,CACH,EC7BA,IAAa,qBAAb,eACwB,gBAAyC,CAAC,CAAC,uBAAwB,CACvF,KAAoB,gBAAgBrF,CAAa,EACjD,QAAuB,gBAAgBA,CAAa,EACpD,KAAMC,CACR,CAAC,CAAC,CAAC,KAAKC,CAAwB,EAAA,AAAE,CAAC,EAGrC,IAAa,mBAAb,eACwB,gBAAuC,CAAC,CAAC,qBAAsB,CACnF,KAAMD,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKE,CAAuB,EAAA,AAAE,CAAC,ECEpC,MAAamF,GAA4D,gBAAyB,CAGhG,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,qBAAqB,CACvB,KAAM,OAAOC,IAAS,SAAWA,EAAOA,IAAS,IAAA,GAAY,OAAOA,CAAI,EAAI,IAAA,GAC5E,UACA,MACF,CAAC,EACH,YAAa,CAAE,OAAM,WAAY,IAAI,mBAAmB,CAAE,OAAM,OAAM,CAAC,CACzE,CAAC,EC9BD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,eAAe,EAAA,AAAE,CAAC,EAG5F,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,qBAAO7C,CAAiB,EAGhE,MAAa8C,GAA0B,qBAAO5C,CAAgB"}
|
package/lib/credentials.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
1
2
|
/**
|
|
2
3
|
* Temporal credentials -- hand-written.
|
|
3
4
|
*
|
|
@@ -21,7 +22,7 @@ export interface Config {
|
|
|
21
22
|
readonly apiKey: Redacted.Redacted<string>;
|
|
22
23
|
readonly apiBaseUrl: string;
|
|
23
24
|
}
|
|
24
|
-
declare const Credentials_base: Context.ServiceClass<Credentials, "TemporalCredentials", Effect.Effect<Config,
|
|
25
|
+
declare const Credentials_base: Context.ServiceClass<Credentials, "TemporalCredentials", Effect.Effect<Config, ConfigError, never>>;
|
|
25
26
|
export declare class Credentials extends /*@__PURE__*/ Credentials_base {
|
|
26
27
|
}
|
|
27
28
|
/** Layer from a redacted API key + optional base URL. */
|
package/lib/credentials.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D;;;;;;;;;;;;GAYG;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,uEAAuE;AACvE,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,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;AAEN,yDAAyD;AACzD,eAAO,MAAM,UAAU,WAAY;IACjC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAOxB,CAAC;AAEJ,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAgBvD,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @distilled.cloud/temporal -- Temporal WorkflowService HTTP SDK for Effect.
|
|
3
3
|
*
|
|
4
|
-
* `./services` is generated by `scripts/generate.ts` from the Smithy model
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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 { UnknownTemporalError, TemporalParseError } from "./errors.ts";
|
|
|
11
12
|
* TemporalOpError, TemporalOpContext>` explicitly so the compiler never
|
|
12
13
|
* infers these back out of the schema generics.
|
|
13
14
|
*/
|
|
14
|
-
export type TemporalOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownTemporalError | ConfigError | HttpClientError.HttpClientError | TemporalParseError;
|
|
15
|
+
export type TemporalOpError = InstanceType<(typeof API_ERRORS)[number]> | UnknownTemporalError | ConfigError | HttpClientError.HttpClientError | TemporalParseError | InvalidInput | SdkError;
|
|
15
16
|
/** Context (requirements) shared by every generated Temporal operation. */
|
|
16
17
|
export type TemporalOpContext = Credentials | HttpClient.HttpClient;
|
|
17
18
|
export declare const TemporalProtocol: 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,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;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,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GACvB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,oBAAoB,GACpB,WAAW,GACX,eAAe,CAAC,eAAe,GAC/B,kBAAkB,GAClB,YAAY,GACZ,QAAQ,CAAC;AAEb,2EAA2E;AAC3E,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAEpE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAiBrD,CAAC"}
|