@distilled.cloud/trigger-dev 1.0.0-rc.13 → 1.0.0-rc.15

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.
@@ -17,9 +17,9 @@ export interface Config {
17
17
  declare const Credentials_base: Context.ServiceClass<Credentials, "TriggerDevCredentials", Effect.Effect<Config, never, never>>;
18
18
  export declare class Credentials extends Credentials_base {
19
19
  }
20
- /** Layer from a plain API key + optional base URL. */
20
+ /** Layer from a redacted API key + optional base URL. */
21
21
  export declare const fromApiKey: (config: {
22
- readonly apiKey: string;
22
+ readonly apiKey: Redacted.Redacted<string>;
23
23
  readonly apiBaseUrl?: string;
24
24
  }) => Layer.Layer<Credentials>;
25
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;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;AAG5C,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,WAAY,SAAQ,gBAGL;CAAG;AAE/B,sDAAsD;AACtD,eAAO,MAAM,UAAU,WAAY;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAOxB,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAkBvD,CAAC"}
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA;;;;;;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,WAAY,SAAQ,gBAEhC;CAAG;AAEJ,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;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAgBvD,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { ConfigError } from "@distilled.cloud/core/errors";
1
2
  /**
2
3
  * Trigger.dev credentials — hand-written.
3
4
  *
@@ -9,13 +10,12 @@ import * as Context from "effect/Context";
9
10
  import * as Effect from "effect/Effect";
10
11
  import * as Layer from "effect/Layer";
11
12
  import * as Redacted from "effect/Redacted";
12
- import { ConfigError } from "@distilled.cloud/core/errors";
13
13
  export const DEFAULT_API_BASE_URL = "https://api.trigger.dev";
14
14
  export class Credentials extends Context.Service()("TriggerDevCredentials") {
15
15
  }
16
- /** Layer from a plain API key + optional base URL. */
16
+ /** Layer from a redacted API key + optional base URL. */
17
17
  export const fromApiKey = (config) => Layer.succeed(Credentials, Effect.succeed({
18
- apiKey: Redacted.make(config.apiKey),
18
+ apiKey: config.apiKey,
19
19
  apiBaseUrl: config.apiBaseUrl ?? DEFAULT_API_BASE_URL,
20
20
  }));
21
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;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;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAO9D,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAG7C,CAAC,uBAAuB,CAAC;CAAG;AAE/B,sDAAsD;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAG1B,EAA4B,EAAE,CAC7B,KAAK,CAAC,OAAO,CACX,WAAW,EACX,MAAM,CAAC,OAAO,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,oBAAoB;CACtD,CAAC,CACH,CAAC;AAEJ;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA6B,KAAK,CAAC,OAAO,CACvE,WAAW,EACX,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,MAAM,GACV,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IAEpE,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,KAAK,CAAC,CAAC,IAAI,WAAW,C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AAE,CAAC;QACZ,OAAO,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC;YAC5B,OAAO,EAAE,8EAA8E;SACxF,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7B,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,oBAAoB;KACzE,CAAC;AACJ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CACtB,CAAC"}
@@ -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;AAElE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;AAGxC,kFAAkF;AAClF,qBAAa,sBAAuB,SAAQ,2BAOZ;CAAG;;;;;;;;;AAEnC,kCAAkC;AAClC,qBAAa,oBAAqB,SAAQ,yBAMX;CAAG"}
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;AAGlE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;AAExC,kFAAkF;AAClF,qBAAa,sBAAuB,SAAQ,2BAOZ;CAAG;;;;;;;;;AAEnC,kCAAkC;AAClC,qBAAa,oBAAqB,SAAQ,yBAMX;CAAG"}
package/lib/errors.js CHANGED
@@ -8,8 +8,8 @@
8
8
  * classes here, so `catchTag` works against either.
9
9
  */
10
10
  export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
11
- import * as Schema from "effect/Schema";
12
11
  import * as Category from "@distilled.cloud/core/category";
12
+ import * as Schema from "effect/Schema";
13
13
  /** Unknown Trigger.dev error — returned when nothing else matches the failure. */
14
14
  export class UnknownTriggerDevError extends Schema.TaggedError()("UnknownTriggerDevError", {
15
15
  code: Schema.optional(Schema.String),
package/lib/errors.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","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;AAGtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAE3D,kFAAkF;AAClF,MAAM,OAAO,sBAAuB,SAAQ,MAAM,CAAC,WAAW,EAA0B,CACtF,wBAAwB,EACxB;IACE,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC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,EAAE,MAAM,CAAC,OAAO;IACpB,KAAK,EAAE,MAAM,CAAC,OAAO;CACtB,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CAAG"}
package/lib/index.d.ts CHANGED
@@ -20,5 +20,5 @@ export { paginateCursor } from "./pagination.ts";
20
20
  export * as Retry from "./retry.ts";
21
21
  export * as Services from "./services/index.ts";
22
22
  export * from "./services/trigger-dev.ts";
23
- export { BadRequest, Conflict, NotFound, UnprocessableEntity, } from "./services/trigger-dev.ts";
23
+ export { BadRequest, Conflict, NotFound, UnprocessableEntity } from "./services/trigger-dev.ts";
24
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","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,QAAQ,EACR,mBAAmB,GACpB,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","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,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
package/lib/index.js CHANGED
@@ -24,5 +24,5 @@ export * as Services from "./services/index.js";
24
24
  // same-named shared ones from ./errors.ts — the ops actually raise the
25
25
  // service-local classes.
26
26
  export * from "./services/trigger-dev.js";
27
- export { BadRequest, Conflict, NotFound, UnprocessableEntity, } from "./services/trigger-dev.js";
27
+ export { BadRequest, Conflict, NotFound, UnprocessableEntity } from "./services/trigger-dev.js";
28
28
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","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,uEAAuE;AACvE,yBAAyB;AACzB,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,mBAAmB,GACpB,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","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,uEAAuE;AACvE,yBAAyB;AACzB,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
package/lib/protocol.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import type * as Layer from "effect/Layer";
2
- import type * as HttpClient from "effect/http/HttpClient";
3
- import type * as HttpClientError from "effect/http/HttpClientError";
4
1
  import type * as API from "@distilled.cloud/core/api";
5
2
  import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors";
3
+ import type * as HttpClient from "effect/http/HttpClient";
4
+ import type * as HttpClientError from "effect/http/HttpClientError";
5
+ import type * as Layer from "effect/Layer";
6
6
  import { Credentials } from "./credentials.ts";
7
7
  import { UnknownTriggerDevError, TriggerDevParseError } from "./errors.ts";
8
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAA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C"}
package/lib/protocol.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
1
2
  /**
2
3
  * TriggerDevProtocol — hand-written.
3
4
  *
@@ -16,7 +17,6 @@
16
17
  */
17
18
  import * as Effect from "effect/Effect";
18
19
  import * as Redacted from "effect/Redacted";
19
- import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
20
20
  import { Credentials } from "./credentials.js";
21
21
  import { UnknownTriggerDevError, TriggerDevParseError } from "./errors.js";
22
22
  export const TriggerDevProtocol = makeRestProtocol({
@@ -31,11 +31,7 @@ export const TriggerDevProtocol = makeRestProtocol({
31
31
  Authorization: `Bearer ${Redacted.value(creds.apiKey)}`,
32
32
  }),
33
33
  unknownError: ({ code, message, body }) => new UnknownTriggerDevError({
34
- code: typeof code === "string"
35
- ? code
36
- : code !== undefined
37
- ? String(code)
38
- : undefined,
34
+ code: typeof code === "string" ? code : code !== undefined ? String(code) : undefined,
39
35
  message,
40
36
  body,
41
37
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAmB3E,MAAM,CAAC,MAAM,kBAAkB,GAC7B,gBAAgB,CAAS;IACvB,mEAAmE;IACnE,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,WAAW,CAAC;QACnC,OAAO,KAAK,CAAC,CAAC,OA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WAAW,CAAC;QACnC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC;IACxB,CAAC,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU;IACpC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACnB,aAAa,EAAE,UAAU,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;KACxD,CAAC;IACF,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CACxC,IAAI,sBAAsB,CAAC;QACzB,IAAI,EAAE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QACrF,OAAO;QACP,IAAI;KACL,CAAC;IACJ,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,oBAAoB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;CAC3E,CAAC,CAAC"}
package/lib/retry.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type Policy } from "@distilled.cloud/core/retry";
1
2
  /**
2
3
  * Trigger.dev retry configuration.
3
4
  *
@@ -15,7 +16,6 @@
15
16
  */
16
17
  import * as Context from "effect/Context";
17
18
  import * as Effect from "effect/Effect";
18
- import { type Policy } from "@distilled.cloud/core/retry";
19
19
  export { type Options, type Factory, type Policy, makeDefault, jittered, capped, throttlingOptions, transientOptions, throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
20
20
  declare const Retry_base: Context.ServiceClass<Retry, "TriggerDevRetry", Policy>;
21
21
  /** Context tag for configuring retry behavior of Trigger.dev API calls. */
@@ -1 +1 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"m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mFAA+D,CAAC;AAEjF,kFAAkF;AAClF,eAAO,MAAM,UAAU,mFAA4B,CAAC;AAEpD,oFAAoF;AACpF,eAAO,MAAM,SAAS,mFAA2B,CAAC"}
package/lib/retry.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { throttlingFactory, transientFactory } from "@distilled.cloud/core/retry";
1
2
  /**
2
3
  * Trigger.dev retry configuration.
3
4
  *
@@ -16,7 +17,6 @@
16
17
  import * as Context from "effect/Context";
17
18
  import * as Effect from "effect/Effect";
18
19
  import * as Layer from "effect/Layer";
19
- import { throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
20
20
  export { makeDefault, jittered, capped, throttlingOptions, transientOptions, throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
21
21
  /** Context tag for configuring retry behavior of Trigger.dev API calls. */
22
22
  export class Retry extends Context.Service()("TriggerDevRetry") {
package/lib/retry.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAEL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,2EAA2E;AAC3E,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CACzD,iBAAiB,CAClB;CAAG;AAEJ,6EAA6E;AAC7E,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,gBAAwB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK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,CAAC,CAAC,CAAC;AAEjF,kFAAkF;AAClF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEpD,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import * as S from "@distilled.cloud/core/schema";
2
1
  import * as API from "@distilled.cloud/core/api";
2
+ import * as S from "@distilled.cloud/core/schema";
3
3
  import { type TriggerDevOpError, type TriggerDevOpContext } from "../protocol.ts";
4
4
  export type { TriggerDevOpError, TriggerDevOpContext };
5
5
  declare const BadRequest_base: S.Class<BadRequest, S.TaggedStruct<"BadRequest", {
@@ -57,6 +57,17 @@ export interface ScheduleObjectGenerator {
57
57
  description?: string;
58
58
  }
59
59
  export declare const ScheduleObjectGenerator: S.Schema<ScheduleObjectGenerator>;
60
+ /** Why the minimum window is applied. */
61
+ export type ScheduleObjectAppliedSchedulePolicyReason = "free_schedule";
62
+ export declare const ScheduleObjectAppliedSchedulePolicyReason: any;
63
+ /** Present only when a non-overridable plan policy applies a minimum window to this schedule (for example, a free-plan schedule's minimum run interval). The configured `window` is returned separately and unchanged. */
64
+ export interface ScheduleObjectAppliedSchedulePolicy {
65
+ /** The minimum window, in seconds, applied on top of the configured window. */
66
+ minimumWindowSeconds?: number;
67
+ /** Why the minimum window is applied. */
68
+ reason?: ScheduleObjectAppliedSchedulePolicyReason;
69
+ }
70
+ export declare const ScheduleObjectAppliedSchedulePolicy: S.Schema<ScheduleObjectAppliedSchedulePolicy>;
60
71
  export interface ScheduleEnvironment {
61
72
  id?: string;
62
73
  type?: string;
@@ -83,6 +94,8 @@ export interface ScheduleObject {
83
94
  timezone?: string;
84
95
  /** The next time the schedule will run */
85
96
  nextRun?: string;
97
+ /** Present only when a non-overridable plan policy applies a minimum window to this schedule (for example, a free-plan schedule's minimum run interval). The configured `window` is returned separately and unchanged. */
98
+ appliedSchedulePolicy?: ScheduleObjectAppliedSchedulePolicy;
86
99
  environments?: ScheduleObjectEnvironmentsList;
87
100
  }
88
101
  export declare const ScheduleObject: S.Schema<ScheduleObject>;
@@ -635,6 +648,52 @@ export interface BulkActionObject {
635
648
  completedAt?: string;
636
649
  }
637
650
  export declare const BulkActionObject: S.Schema<BulkActionObject>;
651
+ export interface GetConcurrencyLimitV1Request {
652
+ /** The limit's name, as declared with `concurrencyLimit()` */
653
+ name: string;
654
+ }
655
+ export declare const GetConcurrencyLimitV1Request: S.Schema<GetConcurrencyLimitV1Request>;
656
+ /** Caps each concurrencyKey pool; runs without a key share one pool */
657
+ export interface ConcurrencyLimitObjectPerKey {
658
+ /** Enforced right now (null = no per-key bound). Enforcement clamps it to the environment concurrency limit at admit time. */
659
+ current?: number | null;
660
+ /** The declared value an override reverts to on reset */
661
+ base?: number | null;
662
+ /** The overridden value, when an override is active */
663
+ override?: number | null;
664
+ /** When the override was applied */
665
+ overriddenAt?: string | null;
666
+ }
667
+ export declare const ConcurrencyLimitObjectPerKey: S.Schema<ConcurrencyLimitObjectPerKey>;
668
+ /** Caps every run holding this limit, keys or not */
669
+ export interface ConcurrencyLimitObjectTotal {
670
+ /** Enforced right now (null = no total bound). Enforcement clamps it to the environment concurrency limit at admit time. */
671
+ current?: number | null;
672
+ /** The declared value an override reverts to on reset */
673
+ base?: number | null;
674
+ /** The overridden value, when an override is active */
675
+ override?: number | null;
676
+ /** When the override was applied */
677
+ overriddenAt?: string | null;
678
+ }
679
+ export declare const ConcurrencyLimitObjectTotal: S.Schema<ConcurrencyLimitObjectTotal>;
680
+ export interface ConcurrencyLimitObject {
681
+ /** The limit's id, starting with `climit_` */
682
+ id: string;
683
+ /** The limit's name, as declared with `concurrencyLimit()` */
684
+ name: string;
685
+ /** Caps each concurrencyKey pool; runs without a key share one pool */
686
+ perKey: ConcurrencyLimitObjectPerKey;
687
+ /** Caps every run holding this limit, keys or not */
688
+ total: ConcurrencyLimitObjectTotal;
689
+ /** Runs executing that hold this limit */
690
+ running: number;
691
+ /** Runs that are queued and must clear this limit to execute */
692
+ queued: number;
693
+ /** Whether the limit is paused. A paused limit admits no runs until resumed; its configured bounds are kept. */
694
+ paused?: boolean;
695
+ }
696
+ export declare const ConcurrencyLimitObject: S.Schema<ConcurrencyLimitObject>;
638
697
  export interface GetDeploymentV1Request {
639
698
  /** The deployment ID. */
640
699
  deploymentId: string;
@@ -674,6 +733,8 @@ export interface GetDeploymentV1Response {
674
733
  imageReference?: string | null;
675
734
  /** Platform of the deployment image */
676
735
  imagePlatform?: string;
736
+ /** The external deployment id this deployment was deployed under (`--external-id`), used by version skew protection to pin runs. Absent if the deployment was deployed without one */
737
+ externalId?: string;
677
738
  /** External build data if applicable */
678
739
  externalBuildData?: unknown | null;
679
740
  /** Error data if the deployment failed */
@@ -757,6 +818,7 @@ export interface GetProjectEnvvarV1Request {
757
818
  }
758
819
  export declare const GetProjectEnvvarV1Request: S.Schema<GetProjectEnvvarV1Request>;
759
820
  export interface EnvVarValue {
821
+ /** The value to store. An empty string is valid and is stored as-is, not treated as a deletion. */
760
822
  value: string;
761
823
  }
762
824
  export declare const EnvVarValue: S.Schema<EnvVarValue>;
@@ -811,7 +873,10 @@ export declare const GetQueueV1Request: S.Schema<GetQueueV1Request>;
811
873
  /** The type of queue: - `task`: Created automatically for each task - `custom`: Created explicitly in your code using `queue()` */
812
874
  export type QueueObjectType = "task" | "custom";
813
875
  export declare const QueueObjectType: any;
814
- /** Detailed concurrency information */
876
+ /** Discriminates the shape: - `V1`: the queue carries its own `concurrencyLimit` (applied per key when runs pass a `concurrencyKey`, to the whole queue when they don't) and its `concurrency` override state - `V2`: the queue is only the line runs wait in; concurrency is declared with the task `concurrency` option and managed through the concurrency-limits endpoints. `concurrencyLimit` is always null and `concurrency` is absent. */
877
+ export type QueueObjectVersion = "V1" | "V2";
878
+ export declare const QueueObjectVersion: any;
879
+ /** Detailed concurrency information. V1 queues only. */
815
880
  export interface QueueObjectConcurrency {
816
881
  /** The effective/current concurrency limit */
817
882
  current?: number | null;
@@ -832,15 +897,17 @@ export interface QueueObject {
832
897
  name: string;
833
898
  /** The type of queue: - `task`: Created automatically for each task - `custom`: Created explicitly in your code using `queue()` */
834
899
  type: QueueObjectType;
900
+ /** Discriminates the shape: - `V1`: the queue carries its own `concurrencyLimit` (applied per key when runs pass a `concurrencyKey`, to the whole queue when they don't) and its `concurrency` override state - `V2`: the queue is only the line runs wait in; concurrency is declared with the task `concurrency` option and managed through the concurrency-limits endpoints. `concurrencyLimit` is always null and `concurrency` is absent. */
901
+ version: QueueObjectVersion;
835
902
  /** The number of runs currently executing */
836
903
  running: number;
837
904
  /** The number of runs currently queued */
838
905
  queued: number;
839
906
  /** Whether the queue is paused. When paused, no new runs will start. */
840
907
  paused: boolean;
841
- /** The current concurrency limit of the queue */
908
+ /** The queue's own concurrency limit. Meaningful on V1 queues; always null on V2 queues. */
842
909
  concurrencyLimit?: number | null;
843
- /** Detailed concurrency information */
910
+ /** Detailed concurrency information. V1 queues only. */
844
911
  concurrency?: QueueObjectConcurrency;
845
912
  }
846
913
  export declare const QueueObject: S.Schema<QueueObject>;
@@ -1280,6 +1347,24 @@ export interface ListBulkActionsResult {
1280
1347
  pagination: ListBulkActionsResultPagination;
1281
1348
  }
1282
1349
  export declare const ListBulkActionsResult: S.Schema<ListBulkActionsResult>;
1350
+ export interface ListConcurrencyLimitsV1Request {
1351
+ page?: number;
1352
+ perPage?: number;
1353
+ }
1354
+ export declare const ListConcurrencyLimitsV1Request: S.Schema<ListConcurrencyLimitsV1Request>;
1355
+ export type ListConcurrencyLimitsV1ResponseDataList = Array<ConcurrencyLimitObject>;
1356
+ export declare const ListConcurrencyLimitsV1ResponseDataList: S.Schema<ListConcurrencyLimitsV1ResponseDataList>;
1357
+ export interface ListConcurrencyLimitsV1ResponsePagination {
1358
+ currentPage?: number;
1359
+ totalPages?: number;
1360
+ count?: number;
1361
+ }
1362
+ export declare const ListConcurrencyLimitsV1ResponsePagination: S.Schema<ListConcurrencyLimitsV1ResponsePagination>;
1363
+ export interface ListConcurrencyLimitsV1Response {
1364
+ data?: ListConcurrencyLimitsV1ResponseDataList;
1365
+ pagination?: ListConcurrencyLimitsV1ResponsePagination;
1366
+ }
1367
+ export declare const ListConcurrencyLimitsV1Response: S.Schema<ListConcurrencyLimitsV1Response>;
1283
1368
  export interface ListDashboardsV1Request {
1284
1369
  }
1285
1370
  export declare const ListDashboardsV1Request: S.Schema<ListDashboardsV1Request>;
@@ -1354,6 +1439,8 @@ export interface ListDeploymentsV1ResponseDataItem {
1354
1439
  git?: unknown | null;
1355
1440
  /** Error data if the deployment failed */
1356
1441
  error?: unknown | null;
1442
+ /** The external deployment id this deployment was deployed under (`--external-id`), used by version skew protection to pin runs. Absent if the deployment was deployed without one */
1443
+ externalId?: string;
1357
1444
  }
1358
1445
  export declare const ListDeploymentsV1ResponseDataItem: S.Schema<ListDeploymentsV1ResponseDataItem>;
1359
1446
  export type ListDeploymentsV1ResponseDataList = Array<ListDeploymentsV1ResponseDataItem>;
@@ -1678,15 +1765,11 @@ export interface ListSchedulesV1Request {
1678
1765
  export declare const ListSchedulesV1Request: S.Schema<ListSchedulesV1Request>;
1679
1766
  export type ListSchedulesResultDataList = Array<ScheduleObject>;
1680
1767
  export declare const ListSchedulesResultDataList: S.Schema<ListSchedulesResultDataList>;
1681
- export interface ListSchedulesResultPagination {
1682
- currentPage?: number;
1683
- totalPages?: number;
1684
- count?: number;
1685
- }
1686
- export declare const ListSchedulesResultPagination: S.Schema<ListSchedulesResultPagination>;
1768
+ export type ListSchedulesResultPagination = ListConcurrencyLimitsV1ResponsePagination;
1769
+ export declare const ListSchedulesResultPagination: S.Schema<ListConcurrencyLimitsV1ResponsePagination>;
1687
1770
  export interface ListSchedulesResult {
1688
1771
  data?: ListSchedulesResultDataList;
1689
- pagination?: ListSchedulesResultPagination;
1772
+ pagination?: ListConcurrencyLimitsV1ResponsePagination;
1690
1773
  }
1691
1774
  export declare const ListSchedulesResult: S.Schema<ListSchedulesResult>;
1692
1775
  export interface ListSessionsV1RequestPage {
@@ -1793,6 +1876,15 @@ export interface ListWaitpointTokensResult {
1793
1876
  pagination: ListWaitpointTokensResultPagination;
1794
1877
  }
1795
1878
  export declare const ListWaitpointTokensResult: S.Schema<ListWaitpointTokensResult>;
1879
+ export interface OverrideConcurrencyLimitV1Request {
1880
+ /** The limit's name */
1881
+ name: string;
1882
+ /** Caps each concurrencyKey pool; runs without a key share one pool. May not exceed the environment concurrency limit. */
1883
+ perKey?: number;
1884
+ /** Caps every run holding this limit, keys or not. May not exceed the environment concurrency limit. */
1885
+ total?: number;
1886
+ }
1887
+ export declare const OverrideConcurrencyLimitV1Request: S.Schema<OverrideConcurrencyLimitV1Request>;
1796
1888
  /** How to interpret the `queueParam` path parameter: - `id`: Treat as a queue ID (default) - `task`: Treat as a task ID to get the task's default queue - `custom`: Treat as a custom queue name */
1797
1889
  export type OverrideQueueConcurrencyV1RequestType = "id" | "task" | "custom";
1798
1890
  export declare const OverrideQueueConcurrencyV1RequestType: any;
@@ -1805,6 +1897,16 @@ export interface OverrideQueueConcurrencyV1Request {
1805
1897
  concurrencyLimit: number;
1806
1898
  }
1807
1899
  export declare const OverrideQueueConcurrencyV1Request: S.Schema<OverrideQueueConcurrencyV1Request>;
1900
+ /** Whether to pause or resume the limit */
1901
+ export type PauseConcurrencyLimitV1RequestAction = "pause" | "resume";
1902
+ export declare const PauseConcurrencyLimitV1RequestAction: any;
1903
+ export interface PauseConcurrencyLimitV1Request {
1904
+ /** The limit's name */
1905
+ name: string;
1906
+ /** Whether to pause or resume the limit */
1907
+ action: PauseConcurrencyLimitV1RequestAction | (string & {});
1908
+ }
1909
+ export declare const PauseConcurrencyLimitV1Request: S.Schema<PauseConcurrencyLimitV1Request>;
1808
1910
  /** How to interpret the `queueParam` path parameter: - `id`: Treat as a queue ID (default) - `task`: Treat as a task ID to get the task's default queue - `custom`: Treat as a custom queue name */
1809
1911
  export type PauseQueueV1RequestType = "id" | "task" | "custom";
1810
1912
  export declare const PauseQueueV1RequestType: any;
@@ -1834,6 +1936,11 @@ export interface PromoteDeploymentV1Response {
1834
1936
  shortCode?: string;
1835
1937
  }
1836
1938
  export declare const PromoteDeploymentV1Response: S.Schema<PromoteDeploymentV1Response>;
1939
+ export interface ResetConcurrencyLimitV1Request {
1940
+ /** The limit's name */
1941
+ name: string;
1942
+ }
1943
+ export declare const ResetConcurrencyLimitV1Request: S.Schema<ResetConcurrencyLimitV1Request>;
1837
1944
  /** How to interpret the `queueParam` path parameter: - `id`: Treat as a queue ID (default) - `task`: Treat as a task ID to get the task's default queue - `custom`: Treat as a custom queue name */
1838
1945
  export type ResetQueueConcurrencyV1RequestType = "id" | "task" | "custom";
1839
1946
  export declare const ResetQueueConcurrencyV1RequestType: any;
@@ -2014,7 +2121,7 @@ export declare const TriggerTaskRequestBody: S.Schema<TriggerTaskRequestBody>;
2014
2121
  export type TriggerBatchTaskByIdV1RequestItemsList = Array<TriggerTaskRequestBody>;
2015
2122
  export declare const TriggerBatchTaskByIdV1RequestItemsList: S.Schema<TriggerBatchTaskByIdV1RequestItemsList>;
2016
2123
  export interface TriggerBatchTaskByIdV1Request {
2017
- /** The id of a task */
2124
+ /** The id of a task. If the id contains characters that are reserved in a URL path, such as a slash (`/`), percent-encode it when building the request path (e.g. `types/zod` becomes `types%2Fzod`). */
2018
2125
  taskIdentifier: string;
2019
2126
  /** An array of payloads to trigger the task with (max 1,000 items). */
2020
2127
  items: TriggerBatchTaskByIdV1RequestItemsList;
@@ -2083,7 +2190,7 @@ export interface TriggerTaskV1RequestOptions {
2083
2190
  }
2084
2191
  export declare const TriggerTaskV1RequestOptions: S.Schema<TriggerTaskV1RequestOptions>;
2085
2192
  export interface TriggerTaskV1Request {
2086
- /** The id of a task */
2193
+ /** The id of a task. If the id contains characters that are reserved in a URL path, such as a slash (`/`), percent-encode it when building the request path (e.g. `types/zod` becomes `types%2Fzod`). */
2087
2194
  taskIdentifier: string;
2088
2195
  /** The payload can include any valid JSON */
2089
2196
  payload?: unknown;
@@ -2111,6 +2218,7 @@ export interface UpdateProjectEnvvarV1Request {
2111
2218
  env: UpdateProjectEnvvarV1RequestEnv | (string & {});
2112
2219
  /** The name of the environment variable. */
2113
2220
  name: string;
2221
+ /** The value to store. An empty string is valid and is stored as-is, not treated as a deletion. */
2114
2222
  value: string;
2115
2223
  }
2116
2224
  export declare const UpdateProjectEnvvarV1Request: S.Schema<UpdateProjectEnvvarV1Request>;
@@ -2226,6 +2334,9 @@ export declare const getBatchV1: API.OperationMethod<GetBatchV1Request, GetBatch
2226
2334
  export type GetBulkActionV1Error = NotFound | TriggerDevOpError;
2227
2335
  /** Retrieve bulk action Retrieve the status and aggregate processing counts for a bulk action. */
2228
2336
  export declare const getBulkActionV1: API.OperationMethod<GetBulkActionV1Request, BulkActionObject, GetBulkActionV1Error, TriggerDevOpContext>;
2337
+ export type GetConcurrencyLimitV1Error = NotFound | TriggerDevOpError;
2338
+ /** Retrieve concurrency limit Retrieve a concurrency limit by name, with its bounds and live running and queued counts. */
2339
+ export declare const getConcurrencyLimitV1: API.OperationMethod<GetConcurrencyLimitV1Request, ConcurrencyLimitObject, GetConcurrencyLimitV1Error, TriggerDevOpContext>;
2229
2340
  export type GetDeploymentV1Error = NotFound | TriggerDevOpError;
2230
2341
  /** Get deployment Retrieve information about a specific deployment by its ID. */
2231
2342
  export declare const getDeploymentV1: API.OperationMethod<GetDeploymentV1Request, GetDeploymentV1Response, GetDeploymentV1Error, TriggerDevOpContext>;
@@ -2274,6 +2385,9 @@ export declare const ignoreErrorV1: API.OperationMethod<IgnoreErrorV1Request, Er
2274
2385
  export type ListBulkActionsV1Error = BadRequest | TriggerDevOpError;
2275
2386
  /** List bulk actions List bulk actions in the current environment. Bulk actions are returned newest first and can be paginated with cursor pagination. */
2276
2387
  export declare const listBulkActionsV1: API.OperationMethod<ListBulkActionsV1Request, ListBulkActionsResult, ListBulkActionsV1Error, TriggerDevOpContext>;
2388
+ export type ListConcurrencyLimitsV1Error = TriggerDevOpError;
2389
+ /** List concurrency limits List the environment's declared concurrency limits (anonymous inline limits appear under their derived `task/<task-id>` names), with each limit's bounds and its live running and queued counts. Results are ordered by the underlying row name, so named limits sort before `task/`-derived inline limits. */
2390
+ export declare const listConcurrencyLimitsV1: API.OperationMethod<ListConcurrencyLimitsV1Request, ListConcurrencyLimitsV1Response, ListConcurrencyLimitsV1Error, TriggerDevOpContext>;
2277
2391
  export type ListDashboardsV1Error = TriggerDevOpError;
2278
2392
  /** List built-in dashboards List available built-in dashboards with their widgets. Each dashboard contains pre-built TRQL queries for common metrics like run success rates, costs, and LLM usage. */
2279
2393
  export declare const listDashboardsV1: API.OperationMethod<ListDashboardsV1Request, ListDashboardsV1Response, ListDashboardsV1Error, TriggerDevOpContext>;
@@ -2304,15 +2418,24 @@ export declare const listSessionsV1: API.OperationMethod<ListSessionsV1Request,
2304
2418
  export type ListWaitpointTokensV1Error = UnprocessableEntity | TriggerDevOpError;
2305
2419
  /** List waitpoint tokens Returns a paginated list of waitpoint tokens for the current environment. Results are ordered by creation date, newest first. Use cursor-based pagination with `page[after]` and `page[before]` to navigate pages. */
2306
2420
  export declare const listWaitpointTokensV1: API.OperationMethod<ListWaitpointTokensV1Request, ListWaitpointTokensResult, ListWaitpointTokensV1Error, TriggerDevOpContext>;
2421
+ export type OverrideConcurrencyLimitV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
2422
+ /** Override concurrency limit Override a concurrency limit's bounds. Only the given fields change; the declared values are kept and restored by reset. To stop runs holding a limit, prefer the pause endpoint (it keeps the configured bounds); overriding `total` to `0` also blocks every run holding the limit. */
2423
+ export declare const overrideConcurrencyLimitV1: API.OperationMethod<OverrideConcurrencyLimitV1Request, ConcurrencyLimitObject, OverrideConcurrencyLimitV1Error, TriggerDevOpContext>;
2307
2424
  export type OverrideQueueConcurrencyV1Error = BadRequest | NotFound | TriggerDevOpError;
2308
2425
  /** Override queue concurrency limit Override the concurrency limit of a queue. This is useful for temporarily scaling up or down based on demand. */
2309
2426
  export declare const overrideQueueConcurrencyV1: API.OperationMethod<OverrideQueueConcurrencyV1Request, QueueObject, OverrideQueueConcurrencyV1Error, TriggerDevOpContext>;
2427
+ export type PauseConcurrencyLimitV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
2428
+ /** Pause or resume a concurrency limit Pause a concurrency limit to prevent runs holding it from starting, or resume a paused limit. Runs that are currently executing will continue to completion, and the limit's configured bounds are kept. */
2429
+ export declare const pauseConcurrencyLimitV1: API.OperationMethod<PauseConcurrencyLimitV1Request, ConcurrencyLimitObject, PauseConcurrencyLimitV1Error, TriggerDevOpContext>;
2310
2430
  export type PauseQueueV1Error = BadRequest | NotFound | TriggerDevOpError;
2311
2431
  /** Pause or resume a queue Pause a queue to prevent new runs from starting, or resume a paused queue. Runs that are currently executing will continue to completion. */
2312
2432
  export declare const pauseQueueV1: API.OperationMethod<PauseQueueV1Request, QueueObject, PauseQueueV1Error, TriggerDevOpContext>;
2313
2433
  export type PromoteDeploymentV1Error = BadRequest | NotFound | TriggerDevOpError;
2314
2434
  /** Promote deployment Promote a previously deployed version to be the current version for the environment. This makes the specified version active for new task runs. */
2315
2435
  export declare const promoteDeploymentV1: API.OperationMethod<PromoteDeploymentV1Request, PromoteDeploymentV1Response, PromoteDeploymentV1Error, TriggerDevOpContext>;
2436
+ export type ResetConcurrencyLimitV1Error = BadRequest | NotFound | Conflict | TriggerDevOpError;
2437
+ /** Reset concurrency limit Reset a concurrency limit back to the values declared in your code, clearing any override. */
2438
+ export declare const resetConcurrencyLimitV1: API.OperationMethod<ResetConcurrencyLimitV1Request, ConcurrencyLimitObject, ResetConcurrencyLimitV1Error, TriggerDevOpContext>;
2316
2439
  export type ResetQueueConcurrencyV1Error = BadRequest | NotFound | TriggerDevOpError;
2317
2440
  /** Reset queue concurrency limit Reset the concurrency limit of a queue back to its base value defined in code. */
2318
2441
  export declare const resetQueueConcurrencyV1: API.OperationMethod<ResetQueueConcurrencyV1Request, QueueObject, ResetQueueConcurrencyV1Error, TriggerDevOpContext>;