@distilled.cloud/trigger-dev 1.0.0-rc.20 → 1.0.0-rc.22
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 +7 -10
- 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/trigger-dev.d.ts +189 -6
- package/lib/services/trigger-dev.d.ts.map +1 -1
- package/lib/services/trigger-dev.js +132 -124
- package/lib/services/trigger-dev.js.map +1 -1
- package/lib/services.lazy/trigger-dev.js +2 -2
- package/lib/traits.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/credentials.ts +21 -15
- package/src/errors.ts +9 -1
- package/src/protocol.ts +24 -32
- package/src/services/trigger-dev.ts +1243 -651
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
|
|
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 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$rawResponseRootSymbol as m,protocol_rest$rawResponseSymbol as h,protocol_rest$restProtocol 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$Union as D,schema_lite$Unknown as O,schema_lite$at as k,schema_lite$optional as A,schema_lite$suspend as j}from"@distilled.cloud/core/_bundle/rest";import{api$D as M,api$call as N,api$error as P,api$named as F,api$newError as I,api$op as L,category$withAuthError as R,category$withBadRequestError as z,category$withConflictError as B,category$withParseError as V,retry$capped as H,retry$jittered as U,retry$makeDefault as W,retry$throttlingFactory as G,retry$throttlingOptions as oe,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.trigger.dev`;var Credentials=class extends (/*@__PURE__*/ X.Service()(`TriggerDevCredentials`)){};const fromApiKey=e=>Q.succeed(Credentials,Z.succeed({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl??`https://api.trigger.dev`}));const je=/*@__PURE__*/ Q.effect(Credentials,/*@__PURE__*/ Z.map(/*@__PURE__*/ Z.gen(function*(){const e=process.env.TRIGGER_DEV_API_KEY??process.env.TRIGGER_SECRET_KEY;if(!e)return yield*new r({message:`TRIGGER_DEV_API_KEY (or TRIGGER_SECRET_KEY) environment variable is required`});return{apiKey:$.make(e),apiBaseUrl:process.env.TRIGGER_DEV_API_BASE_URL??`https://api.trigger.dev`}}),e=>Z.succeed(e)));var UnknownTriggerDevError=class extends (/*@__PURE__*/ J()(`UnknownTriggerDevError`,l)){};var TriggerDevParseError=class extends (/*@__PURE__*/ J()(`TriggerDevParseError`,{body:Y,cause:Y}).pipe(V)){};const Me=e;const Ne=/*@__PURE__*/ g({credentials:/*@__PURE__*/ Z.flatten(Credentials),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${$.value(e.apiKey)}`}),unknownError:e=>new UnknownTriggerDevError(v(e)),parseError:({body:e,cause:t})=>new TriggerDevParseError({body:e,cause:t})});var Retry=class extends (/*@__PURE__*/ X.Service()(`TriggerDevRetry`)){};const policy=e=>Z.provide(Q.succeed(Retry,e));const Pe=/*@__PURE__*/ Z.provide(/*@__PURE__*/ Q.succeed(Retry,{while:()=>false}));const Fe=/*@__PURE__*/ policy(G);const Ie=/*@__PURE__*/ policy(K);export{B as Ca,y as Zb,b as _b,M as a,N as b,Credentials as credentials$Credentials,je 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,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,o as errors$ServiceUnavailable,s as errors$TooManyRequests,TriggerDevParseError as errors$TriggerDevParseError,Me as errors$TriggerDevServiceErrors,c as errors$Unauthorized,UnknownTriggerDevError as errors$UnknownTriggerDevError,u as errors$UnprocessableEntity,P as f,x as hc,S as ic,C as jc,F as l,w as lc,I as m,T as mc,L as n,E as oc,Ne as protocol$TriggerDevProtocol,D as qc,O as rc,Retry as retry$Retry,H as retry$capped,U as retry$jittered,W as retry$makeDefault,Pe as retry$none,policy as retry$policy,Fe as retry$throttling,G as retry$throttlingFactory,oe as retry$throttlingOptions,Ie as retry$transient,K as retry$transientFactory,q as retry$transientOptions,k 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,d as traits$RawResponse,f as traits$RawResponseRoot,he as traits$ResponseCode,p 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,m as traits$rawResponseRootSymbol,h as traits$rawResponseSymbol,Oe as traits$responseCodeSymbol,_ as traits$sensitiveValueSymbol,ke as traits$unionCasesSymbol,R as ya,A as yc,z as za,j 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","TriggerDevServiceErrors","TriggerDevProtocol","creds","info","optionsOrFactory","none","throttling","transient"],"sources":["../../src/credentials.ts","../../src/errors.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"ovEAaA,MAAasF,GAAuB,0BAOpC,IAAa,YAAb,eACwB,gBAAQ,QAA4C,CAAC,CACzE,uBACF,EAAA,AAAE,CAAC,EAGL,MAAa,WAAc,GAIzBF,EAAM,QACJ,YACAD,EAAO,QAAQ,CACb,OAAQI,EAAO,OACf,WAAYA,EAAO,YAAA,yBACrB,CAAC,CACH,EASF,MAAaC,GAA0E,gBAAM,OAC3F,YACc,gBAAO,IACL,gBAAO,IAAI,WAAa,CACpC,MAAMC,EAAS,QAAQ,IAAI,qBAAuB,QAAQ,IAAI,mBAE9D,GAAI,CAACA,EACH,OAAO,MAAO,IAAIpF,EAAY,CAC5B,QAAS,8EACX,CAAC,EAGH,MAAO,CACL,OAAQgF,EAAS,KAAKI,CAAM,EAC5B,WAAY,QAAQ,IAAI,0BAAA,yBAC1B,CACF,CAAC,EACA,GAAWN,EAAO,QAAQI,CAAM,CACnC,CACF,EC9BA,IAAa,uBAAb,eACwB,gBAA2C,CAAC,CAChE,yBACAtE,CACF,EAAA,AAAE,CAAC,EAGL,IAAa,qBAAb,eACwB,gBAAyC,CAAC,CAAC,uBAAwB,CACvF,KAAMjB,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKC,CAAuB,EAAA,AAAE,CAAC,EAOpC,MAAayF,GAA0BxF,ECXvC,MAAayF,GAAmC,gBAAa,CAG3D,YAA2B,gBAAO,QAAQ,WAAW,EACrD,QAAU,GAAUC,EAAM,WAC1B,QAAU,IAAW,CACnB,cAAe,UAAUP,EAAS,MAAMO,EAAM,MAAM,GACtD,GACA,aAAe,GAAS,IAAI,uBAAuBlE,EAAkBmE,CAAI,CAAC,EAC1E,YAAa,CAAE,OAAM,WAAY,IAAI,qBAAqB,CAAE,OAAM,OAAM,CAAC,CAC3E,CAAC,ECjBD,IAAa,MAAb,eAAyC,gBAAQ,QAAuB,CAAC,CAAC,iBAAiB,EAAA,AAAE,CAAC,EAG9F,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,qBAAO3C,CAAiB,EAGhE,MAAa4C,GAA0B,qBAAO1C,CAAgB"}
|
package/lib/credentials.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ConfigError } from "@distilled.cloud/core/errors";
|
|
|
3
3
|
* Trigger.dev credentials -- hand-written.
|
|
4
4
|
*
|
|
5
5
|
* The `Credentials` service holds an *effect* that resolves the current
|
|
6
|
-
* credentials on every request (the protocol
|
|
6
|
+
* credentials on every request (the protocol resolves it per request
|
|
7
7
|
* on the calling fiber).
|
|
8
8
|
*/
|
|
9
9
|
import * as Context from "effect/Context";
|
|
@@ -15,7 +15,7 @@ export interface Config {
|
|
|
15
15
|
readonly apiKey: Redacted.Redacted<string>;
|
|
16
16
|
readonly apiBaseUrl: string;
|
|
17
17
|
}
|
|
18
|
-
declare const Credentials_base: Context.ServiceClass<Credentials, "TriggerDevCredentials", Effect.Effect<Config,
|
|
18
|
+
declare const Credentials_base: Context.ServiceClass<Credentials, "TriggerDevCredentials", Effect.Effect<Config, never, never>>;
|
|
19
19
|
export declare class Credentials extends /*@__PURE__*/ Credentials_base {
|
|
20
20
|
}
|
|
21
21
|
/** Layer from a redacted API key + optional base URL. */
|
|
@@ -26,7 +26,10 @@ export declare const fromApiKey: (config: {
|
|
|
26
26
|
/**
|
|
27
27
|
* Reads TRIGGER_DEV_API_KEY (required) and TRIGGER_DEV_API_BASE_URL
|
|
28
28
|
* (optional). TRIGGER_SECRET_KEY is accepted as a vendor-docs alias.
|
|
29
|
+
*
|
|
30
|
+
* Its configuration is read and checked once, when the layer is built: a
|
|
31
|
+
* problem there fails the layer with `ConfigError`.
|
|
29
32
|
*/
|
|
30
|
-
export declare const CredentialsFromEnv: Layer.Layer<Credentials>;
|
|
33
|
+
export declare const CredentialsFromEnv: Layer.Layer<Credentials, ConfigError>;
|
|
31
34
|
export {};
|
|
32
35
|
//# 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;;;;;;GAMG;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,4BAA4B,CAAC;AAE9D,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;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAmBpE,CAAC"}
|
package/lib/errors.d.ts
CHANGED
|
@@ -30,4 +30,11 @@ declare const TriggerDevParseError_base: Schema.TaggedErrorClass<"TriggerDevPars
|
|
|
30
30
|
/** Schema parse error wrapper. */
|
|
31
31
|
export declare class TriggerDevParseError extends /*@__PURE__*/ TriggerDevParseError_base {
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* The errors declared on the Trigger.dev service: any operation can return
|
|
35
|
+
* them, and every generated operation lists them as its `serviceErrors`. Today
|
|
36
|
+
* that is each of core's status classes (401, 403, 404, 429, the 5xx ...).
|
|
37
|
+
*/
|
|
38
|
+
export declare const TriggerDevServiceErrors: 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 TriggerDevServiceError = InstanceType<(typeof TriggerDevServiceErrors)[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,mFAAmF;AACnF,qBAAa,sBACX,SAAQ,aAAa,CAAC,2BAGrB;CAAG;;;;;;;;;AAEN,kCAAkC;AAClC,qBAAa,oBACX,SAAQ,aAAa,CAAC,yBAGU;CAAG;AAErC;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,+tBAAa,CAAC;AAClD,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,CAAC,OAAO,uBAAuB,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$ServiceUnavailable as ServiceUnavailable, errors$TooManyRequests as TooManyRequests, errors$TriggerDevParseError as TriggerDevParseError, errors$Unauthorized as Unauthorized, errors$UnknownTriggerDevError as UnknownTriggerDevError, 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$ServiceUnavailable as ServiceUnavailable, errors$TooManyRequests as TooManyRequests, errors$TriggerDevParseError as TriggerDevParseError, errors$TriggerDevServiceErrors as TriggerDevServiceErrors, errors$Unauthorized as Unauthorized, errors$UnknownTriggerDevError as UnknownTriggerDevError, 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,EACL,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAKhD,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,mBAAmB,GACpB,MAAM,2BAA2B,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,EACL,kBAAkB,GAGnB,MAAM,eAAe,CAAC;AACvB,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,2BAA2B,CAAC;AAC1C,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,mBAAmB,GACpB,MAAM,2BAA2B,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;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC"}
|
package/lib/protocol.d.ts
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
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 { UnknownTriggerDevError, TriggerDevParseError } from "./errors.ts";
|
|
4
|
+
import { UnknownTriggerDevError, TriggerDevParseError, type TriggerDevServiceError } from "./errors.ts";
|
|
9
5
|
/**
|
|
10
|
-
*
|
|
11
|
-
* service
|
|
6
|
+
* What every generated Trigger.dev operation fails with besides its own
|
|
7
|
+
* errors: the service's errors, the protocol's, and what resolving the
|
|
8
|
+
* credentials fails with. Generated service files annotate operations with
|
|
12
9
|
* `API.OperationMethod<I, O, TriggerDevOpError, TriggerDevOpContext>`
|
|
13
10
|
* explicitly so the compiler never infers these back out of the schema
|
|
14
11
|
* generics.
|
|
15
12
|
*/
|
|
16
|
-
export type TriggerDevOpError =
|
|
13
|
+
export type TriggerDevOpError = TriggerDevServiceError | ErrorOf<typeof TriggerDevProtocol>;
|
|
17
14
|
/** Context (requirements) shared by every generated Trigger.dev operation. */
|
|
18
15
|
export type TriggerDevOpContext = Credentials | HttpClient.HttpClient;
|
|
19
|
-
export declare const TriggerDevProtocol:
|
|
16
|
+
export declare const TriggerDevProtocol: import("@distilled.cloud/core/protocol").Protocol<TriggerDevParseError | UnknownTriggerDevError | import("@distilled.cloud/core/protocol-rest").RestProtocolError, Credentials>;
|
|
20
17
|
//# 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;AAmB9D,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,sBAAsB,EAC5B,MAAM,aAAa,CAAC;AAErB;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,GAAG,OAAO,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE5F,8EAA8E;AAC9E,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAEtE,eAAO,MAAM,kBAAkB,iLAU7B,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,2EAA2E;AAC3E,qBAAa,KAAM,SAAQ,aAAa,CAAC,UAAmD;CAAG;AAE/F,6EAA6E;AAC7E,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,UAAU,MAAM,kBAAkB,CAAC"}
|
|
@@ -6,52 +6,67 @@ export type { TriggerDevOpError, TriggerDevOpContext };
|
|
|
6
6
|
declare const BadRequest_base: S.TaggedErrorClass<"BadRequest", {
|
|
7
7
|
readonly code: any;
|
|
8
8
|
readonly message: any;
|
|
9
|
+
readonly body: any;
|
|
10
|
+
readonly headers: any;
|
|
9
11
|
}> & (new (...args: any[]) => {
|
|
10
12
|
"@distilled.cloud/error/categories": {
|
|
11
13
|
BadRequestError: true;
|
|
12
14
|
};
|
|
13
15
|
});
|
|
14
16
|
export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
|
|
17
|
+
readonly body?: Error403Body | ErrorResponse | Error400Body3 | SkewProtectionThresholdError | InvalidEnvVarsRequestResponse | Error400Body4 | Error400Body5 | ErrorWithDetailsResponse | Error400Body | Error400Body2 | string;
|
|
15
18
|
}
|
|
16
19
|
declare const Conflict_base: S.TaggedErrorClass<"Conflict", {
|
|
17
20
|
readonly code: any;
|
|
18
21
|
readonly message: any;
|
|
22
|
+
readonly body: any;
|
|
23
|
+
readonly headers: any;
|
|
19
24
|
}> & (new (...args: any[]) => {
|
|
20
25
|
"@distilled.cloud/error/categories": {
|
|
21
26
|
ConflictError: true;
|
|
22
27
|
};
|
|
23
28
|
});
|
|
24
29
|
export declare class Conflict extends /*@__PURE__*/ Conflict_base {
|
|
30
|
+
readonly body?: Error403Body | ErrorResponse | SkewProtectionThresholdError | string;
|
|
25
31
|
}
|
|
26
32
|
declare const Forbidden_base: S.TaggedErrorClass<"Forbidden", {
|
|
27
33
|
readonly code: any;
|
|
28
34
|
readonly message: any;
|
|
35
|
+
readonly body: any;
|
|
36
|
+
readonly headers: any;
|
|
29
37
|
}> & (new (...args: any[]) => {
|
|
30
38
|
"@distilled.cloud/error/categories": {
|
|
31
39
|
AuthError: true;
|
|
32
40
|
};
|
|
33
41
|
});
|
|
34
42
|
export declare class Forbidden extends /*@__PURE__*/ Forbidden_base {
|
|
43
|
+
readonly body?: ErrorResponse | Error403Body | string;
|
|
35
44
|
}
|
|
36
45
|
declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
|
|
37
46
|
readonly code: any;
|
|
38
47
|
readonly message: any;
|
|
48
|
+
readonly body: any;
|
|
49
|
+
readonly headers: any;
|
|
39
50
|
}> & (new (...args: any[]) => {
|
|
40
51
|
"@distilled.cloud/error/categories": {
|
|
41
52
|
BadRequestError: true;
|
|
42
53
|
};
|
|
43
54
|
});
|
|
44
55
|
export declare class NotFound extends /*@__PURE__*/ NotFound_base {
|
|
56
|
+
readonly body?: Error404Body | Error403Body | WebhookWaiterErrorResponse | ErrorResponse | Error404Body4 | Error404Body2 | SkewProtectionThresholdError | Error404Body3 | string;
|
|
45
57
|
}
|
|
46
58
|
declare const UnprocessableEntity_base: S.TaggedErrorClass<"UnprocessableEntity", {
|
|
47
59
|
readonly code: any;
|
|
48
60
|
readonly message: any;
|
|
61
|
+
readonly body: any;
|
|
62
|
+
readonly headers: any;
|
|
49
63
|
}> & (new (...args: any[]) => {
|
|
50
64
|
"@distilled.cloud/error/categories": {
|
|
51
65
|
BadRequestError: true;
|
|
52
66
|
};
|
|
53
67
|
});
|
|
54
68
|
export declare class UnprocessableEntity extends /*@__PURE__*/ UnprocessableEntity_base {
|
|
69
|
+
readonly body?: Error422Body | ErrorResponse | ErrorWithDetailsResponse | WebhookWaiterErrorResponse | string;
|
|
55
70
|
}
|
|
56
71
|
export interface ActivateScheduleV1Request {
|
|
57
72
|
/** The ID of the schedule. */
|
|
@@ -236,6 +251,35 @@ export interface CancelWebhookWaiterResponse {
|
|
|
236
251
|
/** With `too_late`, the delivery that resumed the run. */
|
|
237
252
|
deliveryId?: string | undefined;
|
|
238
253
|
}
|
|
254
|
+
export interface ClearSkewProtectionThresholdV1Request {
|
|
255
|
+
/** A task id. Clears that task's own threshold and leaves the environment's. Leave it out to clear the environment's threshold and leave each task's. */
|
|
256
|
+
task?: string | undefined;
|
|
257
|
+
}
|
|
258
|
+
/** `user` from the dashboard, `api` through this API, `migrated` when Trigger.dev set it for you. */
|
|
259
|
+
export type SkewProtectionThresholdSetByType = "user" | "api" | "migrated";
|
|
260
|
+
export interface SkewProtectionThresholdSetBy {
|
|
261
|
+
/** `user` from the dashboard, `api` through this API, `migrated` when Trigger.dev set it for you. */
|
|
262
|
+
type?: SkewProtectionThresholdSetByType | undefined;
|
|
263
|
+
}
|
|
264
|
+
export interface SkewProtectionThreshold {
|
|
265
|
+
version?: string | undefined;
|
|
266
|
+
/** The ID of the deployment with this version. */
|
|
267
|
+
deploymentId?: string | null | undefined;
|
|
268
|
+
setAt?: string | undefined;
|
|
269
|
+
setBy?: SkewProtectionThresholdSetBy | null | undefined;
|
|
270
|
+
}
|
|
271
|
+
/** Each task's own skew protection threshold, by task id. Empty when no task has one. */
|
|
272
|
+
export type SkewProtectionThresholdStateTasksMap = {
|
|
273
|
+
[key: string]: SkewProtectionThreshold | undefined;
|
|
274
|
+
};
|
|
275
|
+
export interface SkewProtectionThresholdState {
|
|
276
|
+
/** The current deployment's version, or null when nothing is current. */
|
|
277
|
+
currentVersion?: string | null | undefined;
|
|
278
|
+
/** The environment's skew protection threshold, or null when none is set. */
|
|
279
|
+
threshold?: SkewProtectionThreshold | null | undefined;
|
|
280
|
+
/** Each task's own skew protection threshold, by task id. Empty when no task has one. */
|
|
281
|
+
tasks?: SkewProtectionThresholdStateTasksMap | undefined;
|
|
282
|
+
}
|
|
239
283
|
export interface CloseSessionV1Request {
|
|
240
284
|
/** The session's friendly ID (`session_...`) or your `externalId`. The server disambiguates by the `session_` prefix. */
|
|
241
285
|
session: string;
|
|
@@ -694,14 +738,14 @@ export interface EnableWebhookEndpointV1Response {
|
|
|
694
738
|
/** Instructions for an AI coding agent to register the endpoint with its provider and set up the signing secret. */
|
|
695
739
|
setupPrompt: string;
|
|
696
740
|
}
|
|
697
|
-
/** The scope of data to query
|
|
741
|
+
/** The scope of data to query. With an API key, every scope reads the key's own environment. Project and organization wide queries are available on the dashboard's Query page. */
|
|
698
742
|
export type ExecuteQueryV1RequestScope = "environment" | "project" | "organization";
|
|
699
743
|
/** Response format - "json" returns structured data (default), "csv" returns CSV string */
|
|
700
744
|
export type ExecuteQueryV1RequestFormat = "json" | "csv";
|
|
701
745
|
export interface ExecuteQueryV1Request {
|
|
702
746
|
/** The TRQL query to execute */
|
|
703
747
|
query: string;
|
|
704
|
-
/** The scope of data to query
|
|
748
|
+
/** The scope of data to query. With an API key, every scope reads the key's own environment. Project and organization wide queries are available on the dashboard's Query page. */
|
|
705
749
|
scope?: ExecuteQueryV1RequestScope | (string & {}) | undefined;
|
|
706
750
|
/** Time period shorthand (e.g., "7d", "30d", "1h"). Cannot be used with from/to. */
|
|
707
751
|
period?: string | null | undefined;
|
|
@@ -1435,6 +1479,8 @@ export interface GetSessionV1Request {
|
|
|
1435
1479
|
/** The session's friendly ID (`session_...`) or your `externalId`. The server disambiguates by the `session_` prefix. */
|
|
1436
1480
|
session: string;
|
|
1437
1481
|
}
|
|
1482
|
+
export interface GetSkewProtectionThresholdV1Request {
|
|
1483
|
+
}
|
|
1438
1484
|
export interface GetTimezonesV1Request {
|
|
1439
1485
|
/** Defaults to false. Whether to include UTC in the results or not. */
|
|
1440
1486
|
excludeUtc?: boolean | undefined;
|
|
@@ -1815,6 +1861,7 @@ export interface ListProjectRunsV1RequestPage {
|
|
|
1815
1861
|
/** The ID of the run to start the page before. This will set the direction of the pagination to backward. */
|
|
1816
1862
|
before?: string | undefined;
|
|
1817
1863
|
}
|
|
1864
|
+
/** Without `period`, `from` or `to`, only runs created in the last 7 days are listed. The response's `appliedFilters.createdAt` says which window was used. */
|
|
1818
1865
|
export interface ListProjectRunsV1RequestFilterCreatedAt {
|
|
1819
1866
|
/** The start date to filter the runs by */
|
|
1820
1867
|
from?: string | undefined;
|
|
@@ -1836,6 +1883,7 @@ export type ListProjectRunsV1RequestFilterTagList = Array<string>;
|
|
|
1836
1883
|
export type ListProjectRunsV1RequestFilterEnvItem = "dev" | "staging" | "prod";
|
|
1837
1884
|
export type ListProjectRunsV1RequestFilterEnvList = Array<ListProjectRunsV1RequestFilterEnvItem | (string & {})>;
|
|
1838
1885
|
export interface ListProjectRunsV1RequestFilter {
|
|
1886
|
+
/** Without `period`, `from` or `to`, only runs created in the last 7 days are listed. The response's `appliedFilters.createdAt` says which window was used. */
|
|
1839
1887
|
createdAt?: ListProjectRunsV1RequestFilterCreatedAt | undefined;
|
|
1840
1888
|
status?: ListProjectRunsV1RequestFilterStatusList | undefined;
|
|
1841
1889
|
/** The identifier of the task that was run */
|
|
@@ -1917,9 +1965,27 @@ export interface ListRunsResultPagination {
|
|
|
1917
1965
|
/** The run ID to start the previous page before. This should be used as the `page[before]` parameter in the next request. */
|
|
1918
1966
|
previous?: string | undefined;
|
|
1919
1967
|
}
|
|
1968
|
+
/** The creation-time window the list used. */
|
|
1969
|
+
export interface ListRunsResultAppliedFiltersCreatedAt {
|
|
1970
|
+
/** The period, when the list used one. */
|
|
1971
|
+
period?: string | undefined;
|
|
1972
|
+
/** The start of the window, when the request set `filter[createdAt][from]`. */
|
|
1973
|
+
from?: string | undefined;
|
|
1974
|
+
/** The end of the window, when the request set `filter[createdAt][to]`. */
|
|
1975
|
+
to?: string | undefined;
|
|
1976
|
+
/** True when the request set no period, from or to, so the default 7-day period applied. */
|
|
1977
|
+
isDefault?: boolean | undefined;
|
|
1978
|
+
}
|
|
1979
|
+
/** The filters the list was run with, including defaults the request didn't set. */
|
|
1980
|
+
export interface ListRunsResultAppliedFilters {
|
|
1981
|
+
/** The creation-time window the list used. */
|
|
1982
|
+
createdAt?: ListRunsResultAppliedFiltersCreatedAt | undefined;
|
|
1983
|
+
}
|
|
1920
1984
|
export interface ListRunsResult {
|
|
1921
1985
|
data?: ListRunsResultDataList | undefined;
|
|
1922
1986
|
pagination?: ListRunsResultPagination | undefined;
|
|
1987
|
+
/** The filters the list was run with, including defaults the request didn't set. */
|
|
1988
|
+
appliedFilters?: ListRunsResultAppliedFilters | undefined;
|
|
1923
1989
|
}
|
|
1924
1990
|
export interface ListQueuesV1Request {
|
|
1925
1991
|
/** Page number of the queue listing (1-based) */
|
|
@@ -1943,6 +2009,7 @@ export interface ListQueuesResult {
|
|
|
1943
2009
|
pagination: ListQueuesResultPagination;
|
|
1944
2010
|
}
|
|
1945
2011
|
export type ListRunsV1RequestPage = ListProjectRunsV1RequestPage;
|
|
2012
|
+
/** Without `period`, `from` or `to`, only runs created in the last 7 days are listed. The response's `appliedFilters.createdAt` says which window was used. */
|
|
1946
2013
|
export type CommonRunsFilterCreatedAt = ListProjectRunsV1RequestFilterCreatedAt;
|
|
1947
2014
|
/** The status of the run */
|
|
1948
2015
|
export type CommonRunsFilterStatusItem = "PENDING_VERSION" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
|
|
@@ -1954,6 +2021,7 @@ export type CommonRunsFilterVersionList = Array<string>;
|
|
|
1954
2021
|
/** The tags that are attached to the run */
|
|
1955
2022
|
export type CommonRunsFilterTagList = Array<string>;
|
|
1956
2023
|
export interface CommonRunsFilter {
|
|
2024
|
+
/** Without `period`, `from` or `to`, only runs created in the last 7 days are listed. The response's `appliedFilters.createdAt` says which window was used. */
|
|
1957
2025
|
createdAt?: ListProjectRunsV1RequestFilterCreatedAt | undefined;
|
|
1958
2026
|
status?: CommonRunsFilterStatusList | undefined;
|
|
1959
2027
|
/** The identifier of the task that was run */
|
|
@@ -2215,6 +2283,26 @@ export interface PromoteDeploymentV1Request {
|
|
|
2215
2283
|
/** The deployment version to promote (e.g., "20250228.1"). */
|
|
2216
2284
|
version: string;
|
|
2217
2285
|
}
|
|
2286
|
+
/** The environment's threshold, when it was cleared; null when only task thresholds were. */
|
|
2287
|
+
export interface PromoteDeploymentV1ResponseSkewProtectionThresholdClearedThreshold {
|
|
2288
|
+
/** The threshold's version before it was cleared */
|
|
2289
|
+
version?: string | undefined;
|
|
2290
|
+
}
|
|
2291
|
+
export interface PromoteDeploymentV1ResponseSkewProtectionThresholdClearedTasksValue {
|
|
2292
|
+
/** The task threshold's version before it was cleared */
|
|
2293
|
+
version?: string | undefined;
|
|
2294
|
+
}
|
|
2295
|
+
/** Each task threshold that was cleared, by task id. */
|
|
2296
|
+
export type PromoteDeploymentV1ResponseSkewProtectionThresholdClearedTasksMap = {
|
|
2297
|
+
[key: string]: PromoteDeploymentV1ResponseSkewProtectionThresholdClearedTasksValue | undefined;
|
|
2298
|
+
};
|
|
2299
|
+
/** Present when the promoted version is below a skew protection threshold (the environment's, or a task's own), which the promote cleared. */
|
|
2300
|
+
export interface PromoteDeploymentV1ResponseSkewProtectionThresholdCleared {
|
|
2301
|
+
/** The environment's threshold, when it was cleared; null when only task thresholds were. */
|
|
2302
|
+
threshold?: PromoteDeploymentV1ResponseSkewProtectionThresholdClearedThreshold | null | undefined;
|
|
2303
|
+
/** Each task threshold that was cleared, by task id. */
|
|
2304
|
+
tasks?: PromoteDeploymentV1ResponseSkewProtectionThresholdClearedTasksMap | undefined;
|
|
2305
|
+
}
|
|
2218
2306
|
export interface PromoteDeploymentV1Response {
|
|
2219
2307
|
/** The deployment ID */
|
|
2220
2308
|
id?: string | undefined;
|
|
@@ -2222,6 +2310,8 @@ export interface PromoteDeploymentV1Response {
|
|
|
2222
2310
|
version?: string | undefined;
|
|
2223
2311
|
/** The short code for the deployment */
|
|
2224
2312
|
shortCode?: string | undefined;
|
|
2313
|
+
/** Present when the promoted version is below a skew protection threshold (the environment's, or a task's own), which the promote cleared. */
|
|
2314
|
+
skewProtectionThresholdCleared?: PromoteDeploymentV1ResponseSkewProtectionThresholdCleared | undefined;
|
|
2225
2315
|
}
|
|
2226
2316
|
export type ReplaceDashboardV1RequestWidgetsList = Array<DashboardWidgetInput>;
|
|
2227
2317
|
export interface ReplaceDashboardV1Request {
|
|
@@ -2434,6 +2524,12 @@ export interface RunRescheduleV1Response {
|
|
|
2434
2524
|
schedule?: RunRescheduleV1ResponseSchedule | undefined;
|
|
2435
2525
|
attempts: RunRescheduleV1ResponseAttemptsList;
|
|
2436
2526
|
}
|
|
2527
|
+
export interface SetSkewProtectionThresholdV1Request {
|
|
2528
|
+
/** A deployed version in this environment, at or below the current deployment (e.g. "20261109.22"). */
|
|
2529
|
+
version: string;
|
|
2530
|
+
/** A task id. The threshold then covers only that task's sessions, and the task must exist in the current deployment. Leave it out to cover every session in the environment. */
|
|
2531
|
+
task?: string | undefined;
|
|
2532
|
+
}
|
|
2437
2533
|
export interface SetWebhookEndpointSecretV1Request {
|
|
2438
2534
|
/** The endpoint's declared id (the `id` passed to `webhooks.endpoint.define`) or its `wh_` id. A value starting with `wh_` is always a generated id, since declared ids can't start with `wh_`. A declared id names the endpoint's declared instance in the key's environment. */
|
|
2439
2535
|
endpointId: string;
|
|
@@ -2630,6 +2726,84 @@ export interface UploadProjectEnvvarsV1Request {
|
|
|
2630
2726
|
/** Whether to override existing variables or not */
|
|
2631
2727
|
override?: boolean | undefined;
|
|
2632
2728
|
}
|
|
2729
|
+
export interface Error403Body {
|
|
2730
|
+
error?: string | undefined;
|
|
2731
|
+
}
|
|
2732
|
+
export interface ErrorResponse {
|
|
2733
|
+
error: string;
|
|
2734
|
+
}
|
|
2735
|
+
export type Error400BodyError2 = "Invalid or missing run ID" | "Failed to create new run";
|
|
2736
|
+
export interface Error400Body3 {
|
|
2737
|
+
error?: Error400BodyError2 | undefined;
|
|
2738
|
+
}
|
|
2739
|
+
export type SkewProtectionThresholdError = Error403Body;
|
|
2740
|
+
export type InvalidEnvVarsRequestResponseIssuesList = Array<unknown>;
|
|
2741
|
+
export type InvalidEnvVarsRequestResponseVariableErrorsList = Array<unknown>;
|
|
2742
|
+
export interface InvalidEnvVarsRequestResponse {
|
|
2743
|
+
error?: string | undefined;
|
|
2744
|
+
issues?: InvalidEnvVarsRequestResponseIssuesList | undefined;
|
|
2745
|
+
variableErrors?: InvalidEnvVarsRequestResponseVariableErrorsList | undefined;
|
|
2746
|
+
}
|
|
2747
|
+
export interface Error400Body4 {
|
|
2748
|
+
/** Error message describing the query error */
|
|
2749
|
+
error?: string | undefined;
|
|
2750
|
+
}
|
|
2751
|
+
export type Error400BodyError3 = "Invalid or missing run ID";
|
|
2752
|
+
export interface Error400Body5 {
|
|
2753
|
+
error?: Error400BodyError3 | undefined;
|
|
2754
|
+
}
|
|
2755
|
+
/** The relevant path in the request */
|
|
2756
|
+
export type ErrorWithDetailsResponseDetailsItemPathList = Array<string>;
|
|
2757
|
+
export interface ErrorWithDetailsResponseDetailsItem {
|
|
2758
|
+
/** The error code */
|
|
2759
|
+
code: string;
|
|
2760
|
+
/** The error message */
|
|
2761
|
+
message: string;
|
|
2762
|
+
/** The relevant path in the request */
|
|
2763
|
+
path?: ErrorWithDetailsResponseDetailsItemPathList | undefined;
|
|
2764
|
+
}
|
|
2765
|
+
export type ErrorWithDetailsResponseDetailsList = Array<ErrorWithDetailsResponseDetailsItem>;
|
|
2766
|
+
export interface ErrorWithDetailsResponse {
|
|
2767
|
+
error: string;
|
|
2768
|
+
details?: ErrorWithDetailsResponseDetailsList | undefined;
|
|
2769
|
+
}
|
|
2770
|
+
export interface Error400Body {
|
|
2771
|
+
/** What was wrong with the request. */
|
|
2772
|
+
error?: string | undefined;
|
|
2773
|
+
}
|
|
2774
|
+
export type Error400BodyError = "Invalid or missing run ID" | "Invalid metadata";
|
|
2775
|
+
export interface Error400Body2 {
|
|
2776
|
+
error?: Error400BodyError | undefined;
|
|
2777
|
+
}
|
|
2778
|
+
export type Error404BodyError = "Run not found";
|
|
2779
|
+
export interface Error404Body {
|
|
2780
|
+
error?: Error404BodyError | undefined;
|
|
2781
|
+
}
|
|
2782
|
+
export type WebhookWaiterErrorResponseCode = "webhook_waiter_limit" | "webhook_endpoint_not_found" | "webhook_filter_invalid" | "invalid_request";
|
|
2783
|
+
/** For `webhook_waiter_limit`, which limit was reached. */
|
|
2784
|
+
export type WebhookWaiterErrorResponseReason = "environment_limit" | "endpoint_limit" | "shape_limit" | "timeout_too_long";
|
|
2785
|
+
export interface WebhookWaiterErrorResponse {
|
|
2786
|
+
error: string;
|
|
2787
|
+
code: WebhookWaiterErrorResponseCode;
|
|
2788
|
+
/** For `webhook_waiter_limit`, which limit was reached. */
|
|
2789
|
+
reason?: WebhookWaiterErrorResponseReason | undefined;
|
|
2790
|
+
}
|
|
2791
|
+
export type Error404BodyError4 = "Run either doesn't exist or is not finished";
|
|
2792
|
+
export interface Error404Body4 {
|
|
2793
|
+
error?: Error404BodyError4 | undefined;
|
|
2794
|
+
}
|
|
2795
|
+
export type Error404BodyError2 = "Run not found" | "Trace not found";
|
|
2796
|
+
export interface Error404Body2 {
|
|
2797
|
+
error?: Error404BodyError2 | undefined;
|
|
2798
|
+
}
|
|
2799
|
+
export type Error404BodyError3 = "Task Run not found";
|
|
2800
|
+
export interface Error404Body3 {
|
|
2801
|
+
error?: Error404BodyError3 | undefined;
|
|
2802
|
+
}
|
|
2803
|
+
export interface Error422Body {
|
|
2804
|
+
/** Runs can only have 10 tags. */
|
|
2805
|
+
error?: string | undefined;
|
|
2806
|
+
}
|
|
2633
2807
|
export type ActivateScheduleV1Error = NotFound | TriggerDevOpError;
|
|
2634
2808
|
/** Activate Schedule Activate a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`. */
|
|
2635
2809
|
export declare const activateScheduleV1: API.OperationMethod<ActivateScheduleV1Request, ScheduleObject, ActivateScheduleV1Error, TriggerDevOpContext>;
|
|
@@ -2648,6 +2822,9 @@ export declare const cancelRunV1: API.OperationMethod<CancelRunV1Request, Cancel
|
|
|
2648
2822
|
export type CancelWebhookWaiterV1Error = NotFound | TriggerDevOpError;
|
|
2649
2823
|
/** Cancel a webhook waiter Cancel a waiter. It stops matching deliveries, frees its slot toward the endpoint's limit, and fails the run's wait. If a delivery already claimed the waiter, the cancel is too late: the response has `cancelled: false` with `reason: "too_late"`, and the run resumes with that delivery's event. */
|
|
2650
2824
|
export declare const cancelWebhookWaiterV1: API.OperationMethod<CancelWebhookWaiterV1Request, CancelWebhookWaiterResponse, CancelWebhookWaiterV1Error, TriggerDevOpContext>;
|
|
2825
|
+
export type ClearSkewProtectionThresholdV1Error = BadRequest | Forbidden | TriggerDevOpError;
|
|
2826
|
+
/** Clear skew protection threshold Clear the environment's skew protection threshold, or with `task` the threshold of that one task. Sessions already moved stay on their new runs; the others keep their versions and stored pins. Clearing a threshold that isn't set changes nothing. Use a secret key from a deployed environment, such as staging or production. Development environments return 400. */
|
|
2827
|
+
export declare const clearSkewProtectionThresholdV1: API.OperationMethod<ClearSkewProtectionThresholdV1Request, SkewProtectionThresholdState, ClearSkewProtectionThresholdV1Error, TriggerDevOpContext>;
|
|
2651
2828
|
export type CloseSessionV1Error = NotFound | TriggerDevOpError;
|
|
2652
2829
|
/** Close a session Close a session. Closing is terminal and idempotent -- closing an already-closed session returns the existing row unchanged. A closed session cannot be reopened, and reusing its `externalId` on create returns `409`. Requires a secret key -- a session public token cannot close a session. */
|
|
2653
2830
|
export declare const closeSessionV1: API.OperationMethod<CloseSessionV1Request, SessionObject, CloseSessionV1Error, TriggerDevOpContext>;
|
|
@@ -2663,7 +2840,7 @@ export declare const createBulkActionV1: API.OperationMethod<CreateBulkActionV1R
|
|
|
2663
2840
|
export type CreateDashboardV1Error = BadRequest | Forbidden | TriggerDevOpError;
|
|
2664
2841
|
/** Create a dashboard Create a custom dashboard, optionally with its widgets. Every widget query is checked against the queryable tables before it is saved. Creating more dashboards than your plan allows returns a 403. */
|
|
2665
2842
|
export declare const createDashboardV1: API.OperationMethod<CreateDashboardV1Request, DashboardObject, CreateDashboardV1Error, TriggerDevOpContext>;
|
|
2666
|
-
export type CreateProjectEnvvarV1Error = BadRequest | NotFound | TriggerDevOpError;
|
|
2843
|
+
export type CreateProjectEnvvarV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
|
|
2667
2844
|
/** Create environment variable Create a new environment variable for a specific project and environment. */
|
|
2668
2845
|
export declare const createProjectEnvvarV1: API.OperationMethod<CreateProjectEnvvarV1Request, SucceedResponse, CreateProjectEnvvarV1Error, TriggerDevOpContext>;
|
|
2669
2846
|
export type CreateScheduleV1Error = BadRequest | UnprocessableEntity | TriggerDevOpError;
|
|
@@ -2687,7 +2864,7 @@ export declare const deleteDashboardV1: API.OperationMethod<DeleteDashboardV1Req
|
|
|
2687
2864
|
export type DeleteDashboardWidgetV1Error = NotFound | Conflict | TriggerDevOpError;
|
|
2688
2865
|
/** Delete a dashboard widget Remove a widget from a custom dashboard. */
|
|
2689
2866
|
export declare const deleteDashboardWidgetV1: API.OperationMethod<DeleteDashboardWidgetV1Request, DashboardObject, DeleteDashboardWidgetV1Error, TriggerDevOpContext>;
|
|
2690
|
-
export type DeleteProjectEnvvarV1Error = BadRequest | NotFound | TriggerDevOpError;
|
|
2867
|
+
export type DeleteProjectEnvvarV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
|
|
2691
2868
|
/** Delete environment variable Delete a specific environment variable for a specific project and environment. */
|
|
2692
2869
|
export declare const deleteProjectEnvvarV1: API.OperationMethod<DeleteProjectEnvvarV1Request, SucceedResponse, DeleteProjectEnvvarV1Error, TriggerDevOpContext>;
|
|
2693
2870
|
export type DeleteScheduleV1Error = NotFound | TriggerDevOpError;
|
|
@@ -2753,6 +2930,9 @@ export declare const getScheduleV1: API.OperationMethod<GetScheduleV1Request, Sc
|
|
|
2753
2930
|
export type GetSessionV1Error = NotFound | TriggerDevOpError;
|
|
2754
2931
|
/** Retrieve a session Retrieve a single session by its friendly id (`session_...`) or your `externalId`. The response includes `triggerConfig` and the friendly `currentRunId` of the live run, if any. */
|
|
2755
2932
|
export declare const getSessionV1: API.OperationMethod<GetSessionV1Request, SessionObject, GetSessionV1Error, TriggerDevOpContext>;
|
|
2933
|
+
export type GetSkewProtectionThresholdV1Error = Forbidden | TriggerDevOpError;
|
|
2934
|
+
/** Get skew protection threshold Get the environment's skew protection threshold, each task's own threshold, and the current deployment version. */
|
|
2935
|
+
export declare const getSkewProtectionThresholdV1: API.OperationMethod<GetSkewProtectionThresholdV1Request, SkewProtectionThresholdState, GetSkewProtectionThresholdV1Error, TriggerDevOpContext>;
|
|
2756
2936
|
export type GetTimezonesV1Error = TriggerDevOpError;
|
|
2757
2937
|
/** Get all supported timezones Get all supported timezones that schedule tasks support. */
|
|
2758
2938
|
export declare const getTimezonesV1: API.OperationMethod<GetTimezonesV1Request, GetTimezonesResult, GetTimezonesV1Error, TriggerDevOpContext>;
|
|
@@ -2849,6 +3029,9 @@ export declare const runReplayV1: API.OperationMethod<RunReplayV1Request, RunRep
|
|
|
2849
3029
|
export type RunRescheduleV1Error = BadRequest | NotFound | TriggerDevOpError;
|
|
2850
3030
|
/** Rescheduled a delayed run Updates a delayed run with a new delay. Only valid when the run is in the DELAYED state. */
|
|
2851
3031
|
export declare const runRescheduleV1: API.OperationMethod<RunRescheduleV1Request, RunRescheduleV1Response, RunRescheduleV1Error, TriggerDevOpContext>;
|
|
3032
|
+
export type SetSkewProtectionThresholdV1Error = BadRequest | Forbidden | NotFound | Conflict | TriggerDevOpError;
|
|
3033
|
+
/** Set skew protection threshold Set or move the environment's skew protection threshold, or with `task` the threshold of that one task. Sessions on versions before it move to the current deployment the next time they're used. The version must be deployed in this environment and at or below the current deployment. Setting the version that is already the threshold changes nothing. Use a secret key from a deployed environment, such as staging or production. Development environments return 400. */
|
|
3034
|
+
export declare const setSkewProtectionThresholdV1: API.OperationMethod<SetSkewProtectionThresholdV1Request, SkewProtectionThresholdState, SetSkewProtectionThresholdV1Error, TriggerDevOpContext>;
|
|
2852
3035
|
export type SetWebhookEndpointSecretV1Error = BadRequest | NotFound | TriggerDevOpError;
|
|
2853
3036
|
/** Set a webhook signing secret Store the signing secret or public key the provider issued for this endpoint, such as the `whsec_` secret Stripe returns when you create a webhook endpoint. It replaces the existing secret. Pass `previousSecretTtlSeconds` to keep accepting the old secret for a while, for example while the provider rolls its secret. */
|
|
2854
3037
|
export declare const setWebhookEndpointSecretV1: API.OperationMethod<SetWebhookEndpointSecretV1Request, SetWebhookEndpointSecretResponse, SetWebhookEndpointSecretV1Error, TriggerDevOpContext>;
|
|
@@ -2870,7 +3053,7 @@ export declare const updateDashboardV1: API.OperationMethod<UpdateDashboardV1Req
|
|
|
2870
3053
|
export type UpdateDashboardWidgetV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
|
|
2871
3054
|
/** Update a dashboard widget Change a widget's title, query, display or position. */
|
|
2872
3055
|
export declare const updateDashboardWidgetV1: API.OperationMethod<UpdateDashboardWidgetV1Request, DashboardObject, UpdateDashboardWidgetV1Error, TriggerDevOpContext>;
|
|
2873
|
-
export type UpdateProjectEnvvarV1Error = BadRequest | NotFound | TriggerDevOpError;
|
|
3056
|
+
export type UpdateProjectEnvvarV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
|
|
2874
3057
|
/** Update environment variable Update a specific environment variable for a specific project and environment. */
|
|
2875
3058
|
export declare const updateProjectEnvvarV1: API.OperationMethod<UpdateProjectEnvvarV1Request, SucceedResponse, UpdateProjectEnvvarV1Error, TriggerDevOpContext>;
|
|
2876
3059
|
export type UpdateRunMetadataV1Error = BadRequest | NotFound | TriggerDevOpError;
|
|
@@ -2882,7 +3065,7 @@ export declare const updateScheduleV1: API.OperationMethod<UpdateScheduleV1Reque
|
|
|
2882
3065
|
export type UpdateSessionV1Error = NotFound | UnprocessableEntity | TriggerDevOpError;
|
|
2883
3066
|
/** Update a session Update a session's `tags` or `metadata`. Pass `metadata: null` to clear it. Requires a secret key -- a session public token cannot update a session. `externalId` is read-only after create: it cannot be changed or cleared. Sending a value different from the current one (including `null` when one is set) returns `422`; sending the same value is accepted as a no-op. */
|
|
2884
3067
|
export declare const updateSessionV1: API.OperationMethod<UpdateSessionV1Request, SessionObject, UpdateSessionV1Error, TriggerDevOpContext>;
|
|
2885
|
-
export type UploadProjectEnvvarsV1Error = BadRequest | NotFound | TriggerDevOpError;
|
|
3068
|
+
export type UploadProjectEnvvarsV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
|
|
2886
3069
|
/** Upload environment variables Upload mulitple environment variables for a specific project and environment. */
|
|
2887
3070
|
export declare const uploadProjectEnvvarsV1: API.OperationMethod<UploadProjectEnvvarsV1Request, SucceedResponse, UploadProjectEnvvarsV1Error, TriggerDevOpContext>;
|
|
2888
3071
|
//# sourceMappingURL=trigger-dev.d.ts.map
|