@boboddy/sdk 0.0.16-alpha → 0.1.0-alpha

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.
@@ -13,7 +13,7 @@ var __export = (target, all) => {
13
13
  });
14
14
  };
15
15
 
16
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/index.js
16
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/index.js
17
17
  var exports_core2 = {};
18
18
  __export(exports_core2, {
19
19
  version: () => version,
@@ -292,7 +292,7 @@ __export(exports_core2, {
292
292
  $ZodAny: () => $ZodAny
293
293
  });
294
294
 
295
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/core.js
295
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/core.js
296
296
  var _a;
297
297
  var NEVER = /* @__PURE__ */ Object.freeze({
298
298
  status: "aborted"
@@ -370,7 +370,7 @@ function config(newConfig) {
370
370
  Object.assign(globalConfig, newConfig);
371
371
  return globalConfig;
372
372
  }
373
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/util.js
373
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/util.js
374
374
  var exports_util = {};
375
375
  __export(exports_util, {
376
376
  unwrapMessage: () => unwrapMessage,
@@ -1062,7 +1062,7 @@ class Class {
1062
1062
  constructor(..._args) {}
1063
1063
  }
1064
1064
 
1065
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/errors.js
1065
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/errors.js
1066
1066
  var initializer = (inst, def) => {
1067
1067
  inst.name = "$ZodError";
1068
1068
  Object.defineProperty(inst, "_zod", {
@@ -1202,7 +1202,7 @@ function prettifyError(error) {
1202
1202
  `);
1203
1203
  }
1204
1204
 
1205
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/parse.js
1205
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/parse.js
1206
1206
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
1207
1207
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
1208
1208
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -1289,7 +1289,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
1289
1289
  return _safeParseAsync(_Err)(schema, value, _ctx);
1290
1290
  };
1291
1291
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
1292
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/regexes.js
1292
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/regexes.js
1293
1293
  var exports_regexes = {};
1294
1294
  __export(exports_regexes, {
1295
1295
  xid: () => xid,
@@ -1448,7 +1448,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
1448
1448
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
1449
1449
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
1450
1450
 
1451
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/checks.js
1451
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/checks.js
1452
1452
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1453
1453
  var _a2;
1454
1454
  inst._zod ?? (inst._zod = {});
@@ -1995,7 +1995,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
1995
1995
  };
1996
1996
  });
1997
1997
 
1998
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/doc.js
1998
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/doc.js
1999
1999
  class Doc {
2000
2000
  constructor(args = []) {
2001
2001
  this.content = [];
@@ -2033,14 +2033,14 @@ class Doc {
2033
2033
  }
2034
2034
  }
2035
2035
 
2036
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/versions.js
2036
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/versions.js
2037
2037
  var version = {
2038
2038
  major: 4,
2039
2039
  minor: 4,
2040
- patch: 2
2040
+ patch: 3
2041
2041
  };
2042
2042
 
2043
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/schemas.js
2043
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/schemas.js
2044
2044
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2045
2045
  var _a2;
2046
2046
  inst ?? (inst = {});
@@ -3631,6 +3631,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
3631
3631
  });
3632
3632
  var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
3633
3633
  $ZodType.init(inst, def);
3634
+ inst._zod.optin = "optional";
3634
3635
  inst._zod.parse = (payload, ctx) => {
3635
3636
  if (ctx.direction === "backward") {
3636
3637
  throw new $ZodEncodeError(inst.constructor.name);
@@ -3640,6 +3641,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
3640
3641
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
3641
3642
  return output.then((output2) => {
3642
3643
  payload.value = output2;
3644
+ payload.fallback = true;
3643
3645
  return payload;
3644
3646
  });
3645
3647
  }
@@ -3647,11 +3649,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
3647
3649
  throw new $ZodAsyncError;
3648
3650
  }
3649
3651
  payload.value = _out;
3652
+ payload.fallback = true;
3650
3653
  return payload;
3651
3654
  };
3652
3655
  });
3653
3656
  function handleOptionalResult(result, input) {
3654
- if (result.issues.length && input === undefined) {
3657
+ if (input === undefined && (result.issues.length || result.fallback)) {
3655
3658
  return { issues: [], value: undefined };
3656
3659
  }
3657
3660
  return result;
@@ -3669,10 +3672,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
3669
3672
  });
3670
3673
  inst._zod.parse = (payload, ctx) => {
3671
3674
  if (def.innerType._zod.optin === "optional") {
3675
+ const input = payload.value;
3672
3676
  const result = def.innerType._zod.run(payload, ctx);
3673
3677
  if (result instanceof Promise)
3674
- return result.then((r) => handleOptionalResult(r, payload.value));
3675
- return handleOptionalResult(result, payload.value);
3678
+ return result.then((r) => handleOptionalResult(r, input));
3679
+ return handleOptionalResult(result, input);
3676
3680
  }
3677
3681
  if (payload.value === undefined) {
3678
3682
  return payload;
@@ -3788,7 +3792,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
3788
3792
  });
3789
3793
  var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3790
3794
  $ZodType.init(inst, def);
3791
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3795
+ inst._zod.optin = "optional";
3792
3796
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3793
3797
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3794
3798
  inst._zod.parse = (payload, ctx) => {
@@ -3808,6 +3812,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3808
3812
  input: payload.value
3809
3813
  });
3810
3814
  payload.issues = [];
3815
+ payload.fallback = true;
3811
3816
  }
3812
3817
  return payload;
3813
3818
  });
@@ -3822,6 +3827,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3822
3827
  input: payload.value
3823
3828
  });
3824
3829
  payload.issues = [];
3830
+ payload.fallback = true;
3825
3831
  }
3826
3832
  return payload;
3827
3833
  };
@@ -3867,7 +3873,7 @@ function handlePipeResult(left, next, ctx) {
3867
3873
  left.aborted = true;
3868
3874
  return left;
3869
3875
  }
3870
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
3876
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
3871
3877
  }
3872
3878
  var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
3873
3879
  $ZodType.init(inst, def);
@@ -3921,8 +3927,6 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
3921
3927
  }
3922
3928
  var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
3923
3929
  $ZodPipe.init(inst, def);
3924
- defineLazy(inst._zod, "optin", () => def.out._zod.optin);
3925
- defineLazy(inst._zod, "optout", () => def.out._zod.optout);
3926
3930
  });
3927
3931
  var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3928
3932
  $ZodType.init(inst, def);
@@ -4120,7 +4124,7 @@ function handleRefineResult(result, payload, input, inst) {
4120
4124
  payload.issues.push(issue(_iss));
4121
4125
  }
4122
4126
  }
4123
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/index.js
4127
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/index.js
4124
4128
  var exports_locales = {};
4125
4129
  __export(exports_locales, {
4126
4130
  zhTW: () => zh_TW_default,
@@ -4177,7 +4181,7 @@ __export(exports_locales, {
4177
4181
  ar: () => ar_default
4178
4182
  });
4179
4183
 
4180
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ar.js
4184
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ar.js
4181
4185
  var error = () => {
4182
4186
  const Sizable = {
4183
4187
  string: { unit: "حرف", verb: "أن يحوي" },
@@ -4283,7 +4287,7 @@ function ar_default() {
4283
4287
  localeError: error()
4284
4288
  };
4285
4289
  }
4286
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/az.js
4290
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/az.js
4287
4291
  var error2 = () => {
4288
4292
  const Sizable = {
4289
4293
  string: { unit: "simvol", verb: "olmalıdır" },
@@ -4388,7 +4392,7 @@ function az_default() {
4388
4392
  localeError: error2()
4389
4393
  };
4390
4394
  }
4391
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/be.js
4395
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/be.js
4392
4396
  function getBelarusianPlural(count, one, few, many) {
4393
4397
  const absCount = Math.abs(count);
4394
4398
  const lastDigit = absCount % 10;
@@ -4544,7 +4548,7 @@ function be_default() {
4544
4548
  localeError: error3()
4545
4549
  };
4546
4550
  }
4547
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/bg.js
4551
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/bg.js
4548
4552
  var error4 = () => {
4549
4553
  const Sizable = {
4550
4554
  string: { unit: "символа", verb: "да съдържа" },
@@ -4664,7 +4668,7 @@ function bg_default() {
4664
4668
  localeError: error4()
4665
4669
  };
4666
4670
  }
4667
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ca.js
4671
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ca.js
4668
4672
  var error5 = () => {
4669
4673
  const Sizable = {
4670
4674
  string: { unit: "caràcters", verb: "contenir" },
@@ -4771,7 +4775,7 @@ function ca_default() {
4771
4775
  localeError: error5()
4772
4776
  };
4773
4777
  }
4774
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/cs.js
4778
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/cs.js
4775
4779
  var error6 = () => {
4776
4780
  const Sizable = {
4777
4781
  string: { unit: "znaků", verb: "mít" },
@@ -4882,7 +4886,7 @@ function cs_default() {
4882
4886
  localeError: error6()
4883
4887
  };
4884
4888
  }
4885
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/da.js
4889
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/da.js
4886
4890
  var error7 = () => {
4887
4891
  const Sizable = {
4888
4892
  string: { unit: "tegn", verb: "havde" },
@@ -4997,7 +5001,7 @@ function da_default() {
4997
5001
  localeError: error7()
4998
5002
  };
4999
5003
  }
5000
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/de.js
5004
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/de.js
5001
5005
  var error8 = () => {
5002
5006
  const Sizable = {
5003
5007
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -5105,7 +5109,7 @@ function de_default() {
5105
5109
  localeError: error8()
5106
5110
  };
5107
5111
  }
5108
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/el.js
5112
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/el.js
5109
5113
  var error9 = () => {
5110
5114
  const Sizable = {
5111
5115
  string: { unit: "χαρακτήρες", verb: "να έχει" },
@@ -5214,7 +5218,7 @@ function el_default() {
5214
5218
  localeError: error9()
5215
5219
  };
5216
5220
  }
5217
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/en.js
5221
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/en.js
5218
5222
  var error10 = () => {
5219
5223
  const Sizable = {
5220
5224
  string: { unit: "characters", verb: "to have" },
@@ -5324,7 +5328,7 @@ function en_default() {
5324
5328
  localeError: error10()
5325
5329
  };
5326
5330
  }
5327
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/eo.js
5331
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/eo.js
5328
5332
  var error11 = () => {
5329
5333
  const Sizable = {
5330
5334
  string: { unit: "karaktrojn", verb: "havi" },
@@ -5433,7 +5437,7 @@ function eo_default() {
5433
5437
  localeError: error11()
5434
5438
  };
5435
5439
  }
5436
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/es.js
5440
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/es.js
5437
5441
  var error12 = () => {
5438
5442
  const Sizable = {
5439
5443
  string: { unit: "caracteres", verb: "tener" },
@@ -5565,7 +5569,7 @@ function es_default() {
5565
5569
  localeError: error12()
5566
5570
  };
5567
5571
  }
5568
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/fa.js
5572
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fa.js
5569
5573
  var error13 = () => {
5570
5574
  const Sizable = {
5571
5575
  string: { unit: "کاراکتر", verb: "داشته باشد" },
@@ -5679,7 +5683,7 @@ function fa_default() {
5679
5683
  localeError: error13()
5680
5684
  };
5681
5685
  }
5682
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/fi.js
5686
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fi.js
5683
5687
  var error14 = () => {
5684
5688
  const Sizable = {
5685
5689
  string: { unit: "merkkiä", subject: "merkkijonon" },
@@ -5791,7 +5795,7 @@ function fi_default() {
5791
5795
  localeError: error14()
5792
5796
  };
5793
5797
  }
5794
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/fr.js
5798
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fr.js
5795
5799
  var error15 = () => {
5796
5800
  const Sizable = {
5797
5801
  string: { unit: "caractères", verb: "avoir" },
@@ -5916,7 +5920,7 @@ function fr_default() {
5916
5920
  localeError: error15()
5917
5921
  };
5918
5922
  }
5919
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/fr-CA.js
5923
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.js
5920
5924
  var error16 = () => {
5921
5925
  const Sizable = {
5922
5926
  string: { unit: "caractères", verb: "avoir" },
@@ -6023,7 +6027,7 @@ function fr_CA_default() {
6023
6027
  localeError: error16()
6024
6028
  };
6025
6029
  }
6026
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/he.js
6030
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/he.js
6027
6031
  var error17 = () => {
6028
6032
  const TypeNames = {
6029
6033
  string: { label: "מחרוזת", gender: "f" },
@@ -6216,7 +6220,7 @@ function he_default() {
6216
6220
  localeError: error17()
6217
6221
  };
6218
6222
  }
6219
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/hr.js
6223
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/hr.js
6220
6224
  var error18 = () => {
6221
6225
  const Sizable = {
6222
6226
  string: { unit: "znakova", verb: "imati" },
@@ -6338,7 +6342,7 @@ function hr_default() {
6338
6342
  localeError: error18()
6339
6343
  };
6340
6344
  }
6341
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/hu.js
6345
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/hu.js
6342
6346
  var error19 = () => {
6343
6347
  const Sizable = {
6344
6348
  string: { unit: "karakter", verb: "legyen" },
@@ -6446,7 +6450,7 @@ function hu_default() {
6446
6450
  localeError: error19()
6447
6451
  };
6448
6452
  }
6449
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/hy.js
6453
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/hy.js
6450
6454
  function getArmenianPlural(count, one, many) {
6451
6455
  return Math.abs(count) === 1 ? one : many;
6452
6456
  }
@@ -6593,7 +6597,7 @@ function hy_default() {
6593
6597
  localeError: error20()
6594
6598
  };
6595
6599
  }
6596
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/id.js
6600
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/id.js
6597
6601
  var error21 = () => {
6598
6602
  const Sizable = {
6599
6603
  string: { unit: "karakter", verb: "memiliki" },
@@ -6699,7 +6703,7 @@ function id_default() {
6699
6703
  localeError: error21()
6700
6704
  };
6701
6705
  }
6702
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/is.js
6706
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/is.js
6703
6707
  var error22 = () => {
6704
6708
  const Sizable = {
6705
6709
  string: { unit: "stafi", verb: "að hafa" },
@@ -6808,7 +6812,7 @@ function is_default() {
6808
6812
  localeError: error22()
6809
6813
  };
6810
6814
  }
6811
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/it.js
6815
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/it.js
6812
6816
  var error23 = () => {
6813
6817
  const Sizable = {
6814
6818
  string: { unit: "caratteri", verb: "avere" },
@@ -6916,7 +6920,7 @@ function it_default() {
6916
6920
  localeError: error23()
6917
6921
  };
6918
6922
  }
6919
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ja.js
6923
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ja.js
6920
6924
  var error24 = () => {
6921
6925
  const Sizable = {
6922
6926
  string: { unit: "文字", verb: "である" },
@@ -7023,7 +7027,7 @@ function ja_default() {
7023
7027
  localeError: error24()
7024
7028
  };
7025
7029
  }
7026
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ka.js
7030
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ka.js
7027
7031
  var error25 = () => {
7028
7032
  const Sizable = {
7029
7033
  string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
@@ -7135,7 +7139,7 @@ function ka_default() {
7135
7139
  localeError: error25()
7136
7140
  };
7137
7141
  }
7138
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/km.js
7142
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/km.js
7139
7143
  var error26 = () => {
7140
7144
  const Sizable = {
7141
7145
  string: { unit: "តួអក្សរ", verb: "គួរមាន" },
@@ -7246,11 +7250,11 @@ function km_default() {
7246
7250
  };
7247
7251
  }
7248
7252
 
7249
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/kh.js
7253
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/kh.js
7250
7254
  function kh_default() {
7251
7255
  return km_default();
7252
7256
  }
7253
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ko.js
7257
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ko.js
7254
7258
  var error27 = () => {
7255
7259
  const Sizable = {
7256
7260
  string: { unit: "문자", verb: "to have" },
@@ -7361,7 +7365,7 @@ function ko_default() {
7361
7365
  localeError: error27()
7362
7366
  };
7363
7367
  }
7364
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/lt.js
7368
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/lt.js
7365
7369
  var capitalizeFirstCharacter = (text) => {
7366
7370
  return text.charAt(0).toUpperCase() + text.slice(1);
7367
7371
  };
@@ -7564,7 +7568,7 @@ function lt_default() {
7564
7568
  localeError: error28()
7565
7569
  };
7566
7570
  }
7567
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/mk.js
7571
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/mk.js
7568
7572
  var error29 = () => {
7569
7573
  const Sizable = {
7570
7574
  string: { unit: "знаци", verb: "да имаат" },
@@ -7673,7 +7677,7 @@ function mk_default() {
7673
7677
  localeError: error29()
7674
7678
  };
7675
7679
  }
7676
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ms.js
7680
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ms.js
7677
7681
  var error30 = () => {
7678
7682
  const Sizable = {
7679
7683
  string: { unit: "aksara", verb: "mempunyai" },
@@ -7780,7 +7784,7 @@ function ms_default() {
7780
7784
  localeError: error30()
7781
7785
  };
7782
7786
  }
7783
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/nl.js
7787
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/nl.js
7784
7788
  var error31 = () => {
7785
7789
  const Sizable = {
7786
7790
  string: { unit: "tekens", verb: "heeft" },
@@ -7890,7 +7894,7 @@ function nl_default() {
7890
7894
  localeError: error31()
7891
7895
  };
7892
7896
  }
7893
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/no.js
7897
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/no.js
7894
7898
  var error32 = () => {
7895
7899
  const Sizable = {
7896
7900
  string: { unit: "tegn", verb: "å ha" },
@@ -7998,7 +8002,7 @@ function no_default() {
7998
8002
  localeError: error32()
7999
8003
  };
8000
8004
  }
8001
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ota.js
8005
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ota.js
8002
8006
  var error33 = () => {
8003
8007
  const Sizable = {
8004
8008
  string: { unit: "harf", verb: "olmalıdır" },
@@ -8107,7 +8111,7 @@ function ota_default() {
8107
8111
  localeError: error33()
8108
8112
  };
8109
8113
  }
8110
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ps.js
8114
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ps.js
8111
8115
  var error34 = () => {
8112
8116
  const Sizable = {
8113
8117
  string: { unit: "توکي", verb: "ولري" },
@@ -8221,7 +8225,7 @@ function ps_default() {
8221
8225
  localeError: error34()
8222
8226
  };
8223
8227
  }
8224
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/pl.js
8228
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/pl.js
8225
8229
  var error35 = () => {
8226
8230
  const Sizable = {
8227
8231
  string: { unit: "znaków", verb: "mieć" },
@@ -8330,7 +8334,7 @@ function pl_default() {
8330
8334
  localeError: error35()
8331
8335
  };
8332
8336
  }
8333
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/pt.js
8337
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/pt.js
8334
8338
  var error36 = () => {
8335
8339
  const Sizable = {
8336
8340
  string: { unit: "caracteres", verb: "ter" },
@@ -8438,7 +8442,7 @@ function pt_default() {
8438
8442
  localeError: error36()
8439
8443
  };
8440
8444
  }
8441
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ro.js
8445
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ro.js
8442
8446
  var error37 = () => {
8443
8447
  const Sizable = {
8444
8448
  string: { unit: "caractere", verb: "să aibă" },
@@ -8557,7 +8561,7 @@ function ro_default() {
8557
8561
  localeError: error37()
8558
8562
  };
8559
8563
  }
8560
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ru.js
8564
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ru.js
8561
8565
  function getRussianPlural(count, one, few, many) {
8562
8566
  const absCount = Math.abs(count);
8563
8567
  const lastDigit = absCount % 10;
@@ -8713,7 +8717,7 @@ function ru_default() {
8713
8717
  localeError: error38()
8714
8718
  };
8715
8719
  }
8716
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/sl.js
8720
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/sl.js
8717
8721
  var error39 = () => {
8718
8722
  const Sizable = {
8719
8723
  string: { unit: "znakov", verb: "imeti" },
@@ -8822,7 +8826,7 @@ function sl_default() {
8822
8826
  localeError: error39()
8823
8827
  };
8824
8828
  }
8825
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/sv.js
8829
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/sv.js
8826
8830
  var error40 = () => {
8827
8831
  const Sizable = {
8828
8832
  string: { unit: "tecken", verb: "att ha" },
@@ -8932,7 +8936,7 @@ function sv_default() {
8932
8936
  localeError: error40()
8933
8937
  };
8934
8938
  }
8935
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ta.js
8939
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ta.js
8936
8940
  var error41 = () => {
8937
8941
  const Sizable = {
8938
8942
  string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
@@ -9042,7 +9046,7 @@ function ta_default() {
9042
9046
  localeError: error41()
9043
9047
  };
9044
9048
  }
9045
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/th.js
9049
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/th.js
9046
9050
  var error42 = () => {
9047
9051
  const Sizable = {
9048
9052
  string: { unit: "ตัวอักษร", verb: "ควรมี" },
@@ -9152,7 +9156,7 @@ function th_default() {
9152
9156
  localeError: error42()
9153
9157
  };
9154
9158
  }
9155
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/tr.js
9159
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/tr.js
9156
9160
  var error43 = () => {
9157
9161
  const Sizable = {
9158
9162
  string: { unit: "karakter", verb: "olmalı" },
@@ -9257,7 +9261,7 @@ function tr_default() {
9257
9261
  localeError: error43()
9258
9262
  };
9259
9263
  }
9260
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/uk.js
9264
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/uk.js
9261
9265
  var error44 = () => {
9262
9266
  const Sizable = {
9263
9267
  string: { unit: "символів", verb: "матиме" },
@@ -9366,11 +9370,11 @@ function uk_default() {
9366
9370
  };
9367
9371
  }
9368
9372
 
9369
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ua.js
9373
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ua.js
9370
9374
  function ua_default() {
9371
9375
  return uk_default();
9372
9376
  }
9373
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/ur.js
9377
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ur.js
9374
9378
  var error45 = () => {
9375
9379
  const Sizable = {
9376
9380
  string: { unit: "حروف", verb: "ہونا" },
@@ -9480,7 +9484,7 @@ function ur_default() {
9480
9484
  localeError: error45()
9481
9485
  };
9482
9486
  }
9483
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/uz.js
9487
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/uz.js
9484
9488
  var error46 = () => {
9485
9489
  const Sizable = {
9486
9490
  string: { unit: "belgi", verb: "bo‘lishi kerak" },
@@ -9590,7 +9594,7 @@ function uz_default() {
9590
9594
  localeError: error46()
9591
9595
  };
9592
9596
  }
9593
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/vi.js
9597
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/vi.js
9594
9598
  var error47 = () => {
9595
9599
  const Sizable = {
9596
9600
  string: { unit: "ký tự", verb: "có" },
@@ -9698,7 +9702,7 @@ function vi_default() {
9698
9702
  localeError: error47()
9699
9703
  };
9700
9704
  }
9701
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/zh-CN.js
9705
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.js
9702
9706
  var error48 = () => {
9703
9707
  const Sizable = {
9704
9708
  string: { unit: "字符", verb: "包含" },
@@ -9807,7 +9811,7 @@ function zh_CN_default() {
9807
9811
  localeError: error48()
9808
9812
  };
9809
9813
  }
9810
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/zh-TW.js
9814
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.js
9811
9815
  var error49 = () => {
9812
9816
  const Sizable = {
9813
9817
  string: { unit: "字元", verb: "擁有" },
@@ -9914,7 +9918,7 @@ function zh_TW_default() {
9914
9918
  localeError: error49()
9915
9919
  };
9916
9920
  }
9917
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/locales/yo.js
9921
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/yo.js
9918
9922
  var error50 = () => {
9919
9923
  const Sizable = {
9920
9924
  string: { unit: "àmi", verb: "ní" },
@@ -10021,7 +10025,7 @@ function yo_default() {
10021
10025
  localeError: error50()
10022
10026
  };
10023
10027
  }
10024
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/registries.js
10028
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/registries.js
10025
10029
  var _a2;
10026
10030
  var $output = Symbol("ZodOutput");
10027
10031
  var $input = Symbol("ZodInput");
@@ -10071,7 +10075,7 @@ function registry() {
10071
10075
  }
10072
10076
  (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
10073
10077
  var globalRegistry = globalThis.__zod_globalRegistry;
10074
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/api.js
10078
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/api.js
10075
10079
  function _string(Class2, params) {
10076
10080
  return new Class2({
10077
10081
  type: "string",
@@ -10991,7 +10995,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
10991
10995
  const inst = new Class2(def);
10992
10996
  return inst;
10993
10997
  }
10994
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/to-json-schema.js
10998
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
10995
10999
  function initializeContext(params) {
10996
11000
  let target = params?.target ?? "draft-2020-12";
10997
11001
  if (target === "draft-4")
@@ -11343,7 +11347,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
11343
11347
  extractDefs(ctx, schema);
11344
11348
  return finalize(ctx, schema);
11345
11349
  };
11346
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/json-schema-processors.js
11350
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
11347
11351
  var formatMap = {
11348
11352
  guid: "uuid",
11349
11353
  url: "uri",
@@ -11881,7 +11885,7 @@ function toJSONSchema(input, params) {
11881
11885
  extractDefs(ctx, input);
11882
11886
  return finalize(ctx, input);
11883
11887
  }
11884
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/json-schema-generator.js
11888
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
11885
11889
  class JSONSchemaGenerator {
11886
11890
  get metadataRegistry() {
11887
11891
  return this.ctx.metadataRegistry;
@@ -11940,9 +11944,9 @@ class JSONSchemaGenerator {
11940
11944
  return plainResult;
11941
11945
  }
11942
11946
  }
11943
- // ../../../node_modules/.bun/zod@4.4.2/node_modules/zod/v4/core/json-schema.js
11947
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
11944
11948
  var exports_json_schema = {};
11945
- // src/define-step.ts
11949
+ // src/definitions/steps/define-step.ts
11946
11950
  var UNWRAP_TYPES = new Set(["optional", "nullable", "default"]);
11947
11951
  function unwrapZodType(schema) {
11948
11952
  while (UNWRAP_TYPES.has(schema._def.type)) {
@@ -11982,7 +11986,7 @@ function deriveSignalType(schema, path) {
11982
11986
  }
11983
11987
  }
11984
11988
  function defineStep(config2) {
11985
- return {
11989
+ const spec = {
11986
11990
  key: config2.key,
11987
11991
  name: config2.name,
11988
11992
  description: config2.description ?? null,
@@ -12008,7 +12012,1291 @@ function defineStep(config2) {
12008
12012
  })),
12009
12013
  opencodeMcpJson: config2.mcpServers ?? null
12010
12014
  };
12015
+ return spec;
12011
12016
  }
12017
+ // src/generated/core/bodySerializer.gen.ts
12018
+ var jsonBodySerializer = {
12019
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
12020
+ };
12021
+ // src/generated/core/params.gen.ts
12022
+ var extraPrefixesMap = {
12023
+ $body_: "body",
12024
+ $headers_: "headers",
12025
+ $path_: "path",
12026
+ $query_: "query"
12027
+ };
12028
+ var extraPrefixes = Object.entries(extraPrefixesMap);
12029
+ // src/generated/core/serverSentEvents.gen.ts
12030
+ var createSseClient = ({
12031
+ onRequest,
12032
+ onSseError,
12033
+ onSseEvent,
12034
+ responseTransformer,
12035
+ responseValidator,
12036
+ sseDefaultRetryDelay,
12037
+ sseMaxRetryAttempts,
12038
+ sseMaxRetryDelay,
12039
+ sseSleepFn,
12040
+ url,
12041
+ ...options
12042
+ }) => {
12043
+ let lastEventId;
12044
+ const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
12045
+ const createStream = async function* () {
12046
+ let retryDelay = sseDefaultRetryDelay ?? 3000;
12047
+ let attempt = 0;
12048
+ const signal = options.signal ?? new AbortController().signal;
12049
+ while (true) {
12050
+ if (signal.aborted)
12051
+ break;
12052
+ attempt++;
12053
+ const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
12054
+ if (lastEventId !== undefined) {
12055
+ headers.set("Last-Event-ID", lastEventId);
12056
+ }
12057
+ try {
12058
+ const requestInit = {
12059
+ redirect: "follow",
12060
+ ...options,
12061
+ body: options.serializedBody,
12062
+ headers,
12063
+ signal
12064
+ };
12065
+ let request = new Request(url, requestInit);
12066
+ if (onRequest) {
12067
+ request = await onRequest(url, requestInit);
12068
+ }
12069
+ const _fetch = options.fetch ?? globalThis.fetch;
12070
+ const response = await _fetch(request);
12071
+ if (!response.ok)
12072
+ throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
12073
+ if (!response.body)
12074
+ throw new Error("No body in SSE response");
12075
+ const reader = response.body.pipeThrough(new TextDecoderStream).getReader();
12076
+ let buffer = "";
12077
+ const abortHandler = () => {
12078
+ try {
12079
+ reader.cancel();
12080
+ } catch {}
12081
+ };
12082
+ signal.addEventListener("abort", abortHandler);
12083
+ try {
12084
+ while (true) {
12085
+ const { done, value } = await reader.read();
12086
+ if (done)
12087
+ break;
12088
+ buffer += value;
12089
+ buffer = buffer.replace(/\r\n/g, `
12090
+ `).replace(/\r/g, `
12091
+ `);
12092
+ const chunks = buffer.split(`
12093
+
12094
+ `);
12095
+ buffer = chunks.pop() ?? "";
12096
+ for (const chunk of chunks) {
12097
+ const lines = chunk.split(`
12098
+ `);
12099
+ const dataLines = [];
12100
+ let eventName;
12101
+ for (const line of lines) {
12102
+ if (line.startsWith("data:")) {
12103
+ dataLines.push(line.replace(/^data:\s*/, ""));
12104
+ } else if (line.startsWith("event:")) {
12105
+ eventName = line.replace(/^event:\s*/, "");
12106
+ } else if (line.startsWith("id:")) {
12107
+ lastEventId = line.replace(/^id:\s*/, "");
12108
+ } else if (line.startsWith("retry:")) {
12109
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
12110
+ if (!Number.isNaN(parsed)) {
12111
+ retryDelay = parsed;
12112
+ }
12113
+ }
12114
+ }
12115
+ let data;
12116
+ let parsedJson = false;
12117
+ if (dataLines.length) {
12118
+ const rawData = dataLines.join(`
12119
+ `);
12120
+ try {
12121
+ data = JSON.parse(rawData);
12122
+ parsedJson = true;
12123
+ } catch {
12124
+ data = rawData;
12125
+ }
12126
+ }
12127
+ if (parsedJson) {
12128
+ if (responseValidator) {
12129
+ await responseValidator(data);
12130
+ }
12131
+ if (responseTransformer) {
12132
+ data = await responseTransformer(data);
12133
+ }
12134
+ }
12135
+ onSseEvent?.({
12136
+ data,
12137
+ event: eventName,
12138
+ id: lastEventId,
12139
+ retry: retryDelay
12140
+ });
12141
+ if (dataLines.length) {
12142
+ yield data;
12143
+ }
12144
+ }
12145
+ }
12146
+ } finally {
12147
+ signal.removeEventListener("abort", abortHandler);
12148
+ reader.releaseLock();
12149
+ }
12150
+ break;
12151
+ } catch (error51) {
12152
+ onSseError?.(error51);
12153
+ if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
12154
+ break;
12155
+ }
12156
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);
12157
+ await sleep(backoff);
12158
+ }
12159
+ }
12160
+ };
12161
+ const stream = createStream();
12162
+ return { stream };
12163
+ };
12164
+
12165
+ // src/generated/core/pathSerializer.gen.ts
12166
+ var separatorArrayExplode = (style) => {
12167
+ switch (style) {
12168
+ case "label":
12169
+ return ".";
12170
+ case "matrix":
12171
+ return ";";
12172
+ case "simple":
12173
+ return ",";
12174
+ default:
12175
+ return "&";
12176
+ }
12177
+ };
12178
+ var separatorArrayNoExplode = (style) => {
12179
+ switch (style) {
12180
+ case "form":
12181
+ return ",";
12182
+ case "pipeDelimited":
12183
+ return "|";
12184
+ case "spaceDelimited":
12185
+ return "%20";
12186
+ default:
12187
+ return ",";
12188
+ }
12189
+ };
12190
+ var separatorObjectExplode = (style) => {
12191
+ switch (style) {
12192
+ case "label":
12193
+ return ".";
12194
+ case "matrix":
12195
+ return ";";
12196
+ case "simple":
12197
+ return ",";
12198
+ default:
12199
+ return "&";
12200
+ }
12201
+ };
12202
+ var serializeArrayParam = ({
12203
+ allowReserved,
12204
+ explode,
12205
+ name,
12206
+ style,
12207
+ value
12208
+ }) => {
12209
+ if (!explode) {
12210
+ const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
12211
+ switch (style) {
12212
+ case "label":
12213
+ return `.${joinedValues2}`;
12214
+ case "matrix":
12215
+ return `;${name}=${joinedValues2}`;
12216
+ case "simple":
12217
+ return joinedValues2;
12218
+ default:
12219
+ return `${name}=${joinedValues2}`;
12220
+ }
12221
+ }
12222
+ const separator = separatorArrayExplode(style);
12223
+ const joinedValues = value.map((v) => {
12224
+ if (style === "label" || style === "simple") {
12225
+ return allowReserved ? v : encodeURIComponent(v);
12226
+ }
12227
+ return serializePrimitiveParam({
12228
+ allowReserved,
12229
+ name,
12230
+ value: v
12231
+ });
12232
+ }).join(separator);
12233
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
12234
+ };
12235
+ var serializePrimitiveParam = ({
12236
+ allowReserved,
12237
+ name,
12238
+ value
12239
+ }) => {
12240
+ if (value === undefined || value === null) {
12241
+ return "";
12242
+ }
12243
+ if (typeof value === "object") {
12244
+ throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");
12245
+ }
12246
+ return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
12247
+ };
12248
+ var serializeObjectParam = ({
12249
+ allowReserved,
12250
+ explode,
12251
+ name,
12252
+ style,
12253
+ value,
12254
+ valueOnly
12255
+ }) => {
12256
+ if (value instanceof Date) {
12257
+ return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
12258
+ }
12259
+ if (style !== "deepObject" && !explode) {
12260
+ let values = [];
12261
+ Object.entries(value).forEach(([key, v]) => {
12262
+ values = [
12263
+ ...values,
12264
+ key,
12265
+ allowReserved ? v : encodeURIComponent(v)
12266
+ ];
12267
+ });
12268
+ const joinedValues2 = values.join(",");
12269
+ switch (style) {
12270
+ case "form":
12271
+ return `${name}=${joinedValues2}`;
12272
+ case "label":
12273
+ return `.${joinedValues2}`;
12274
+ case "matrix":
12275
+ return `;${name}=${joinedValues2}`;
12276
+ default:
12277
+ return joinedValues2;
12278
+ }
12279
+ }
12280
+ const separator = separatorObjectExplode(style);
12281
+ const joinedValues = Object.entries(value).map(([key, v]) => serializePrimitiveParam({
12282
+ allowReserved,
12283
+ name: style === "deepObject" ? `${name}[${key}]` : key,
12284
+ value: v
12285
+ })).join(separator);
12286
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
12287
+ };
12288
+
12289
+ // src/generated/core/utils.gen.ts
12290
+ var PATH_PARAM_RE = /\{[^{}]+\}/g;
12291
+ var defaultPathSerializer = ({ path, url: _url2 }) => {
12292
+ let url = _url2;
12293
+ const matches = _url2.match(PATH_PARAM_RE);
12294
+ if (matches) {
12295
+ for (const match of matches) {
12296
+ let explode = false;
12297
+ let name = match.substring(1, match.length - 1);
12298
+ let style = "simple";
12299
+ if (name.endsWith("*")) {
12300
+ explode = true;
12301
+ name = name.substring(0, name.length - 1);
12302
+ }
12303
+ if (name.startsWith(".")) {
12304
+ name = name.substring(1);
12305
+ style = "label";
12306
+ } else if (name.startsWith(";")) {
12307
+ name = name.substring(1);
12308
+ style = "matrix";
12309
+ }
12310
+ const value = path[name];
12311
+ if (value === undefined || value === null) {
12312
+ continue;
12313
+ }
12314
+ if (Array.isArray(value)) {
12315
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
12316
+ continue;
12317
+ }
12318
+ if (typeof value === "object") {
12319
+ url = url.replace(match, serializeObjectParam({
12320
+ explode,
12321
+ name,
12322
+ style,
12323
+ value,
12324
+ valueOnly: true
12325
+ }));
12326
+ continue;
12327
+ }
12328
+ if (style === "matrix") {
12329
+ url = url.replace(match, `;${serializePrimitiveParam({
12330
+ name,
12331
+ value
12332
+ })}`);
12333
+ continue;
12334
+ }
12335
+ const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
12336
+ url = url.replace(match, replaceValue);
12337
+ }
12338
+ }
12339
+ return url;
12340
+ };
12341
+ var getUrl = ({
12342
+ baseUrl,
12343
+ path,
12344
+ query,
12345
+ querySerializer,
12346
+ url: _url2
12347
+ }) => {
12348
+ const pathUrl = _url2.startsWith("/") ? _url2 : `/${_url2}`;
12349
+ let url = (baseUrl ?? "") + pathUrl;
12350
+ if (path) {
12351
+ url = defaultPathSerializer({ path, url });
12352
+ }
12353
+ let search = query ? querySerializer(query) : "";
12354
+ if (search.startsWith("?")) {
12355
+ search = search.substring(1);
12356
+ }
12357
+ if (search) {
12358
+ url += `?${search}`;
12359
+ }
12360
+ return url;
12361
+ };
12362
+ function getValidRequestBody(options) {
12363
+ const hasBody = options.body !== undefined;
12364
+ const isSerializedBody = hasBody && options.bodySerializer;
12365
+ if (isSerializedBody) {
12366
+ if ("serializedBody" in options) {
12367
+ const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== "";
12368
+ return hasSerializedBody ? options.serializedBody : null;
12369
+ }
12370
+ return options.body !== "" ? options.body : null;
12371
+ }
12372
+ if (hasBody) {
12373
+ return options.body;
12374
+ }
12375
+ return;
12376
+ }
12377
+
12378
+ // src/generated/core/auth.gen.ts
12379
+ var getAuthToken = async (auth, callback) => {
12380
+ const token = typeof callback === "function" ? await callback(auth) : callback;
12381
+ if (!token) {
12382
+ return;
12383
+ }
12384
+ if (auth.scheme === "bearer") {
12385
+ return `Bearer ${token}`;
12386
+ }
12387
+ if (auth.scheme === "basic") {
12388
+ return `Basic ${btoa(token)}`;
12389
+ }
12390
+ return token;
12391
+ };
12392
+
12393
+ // src/generated/client/utils.gen.ts
12394
+ var createQuerySerializer = ({
12395
+ parameters = {},
12396
+ ...args
12397
+ } = {}) => {
12398
+ const querySerializer = (queryParams) => {
12399
+ const search = [];
12400
+ if (queryParams && typeof queryParams === "object") {
12401
+ for (const name in queryParams) {
12402
+ const value = queryParams[name];
12403
+ if (value === undefined || value === null) {
12404
+ continue;
12405
+ }
12406
+ const options = parameters[name] || args;
12407
+ if (Array.isArray(value)) {
12408
+ const serializedArray = serializeArrayParam({
12409
+ allowReserved: options.allowReserved,
12410
+ explode: true,
12411
+ name,
12412
+ style: "form",
12413
+ value,
12414
+ ...options.array
12415
+ });
12416
+ if (serializedArray)
12417
+ search.push(serializedArray);
12418
+ } else if (typeof value === "object") {
12419
+ const serializedObject = serializeObjectParam({
12420
+ allowReserved: options.allowReserved,
12421
+ explode: true,
12422
+ name,
12423
+ style: "deepObject",
12424
+ value,
12425
+ ...options.object
12426
+ });
12427
+ if (serializedObject)
12428
+ search.push(serializedObject);
12429
+ } else {
12430
+ const serializedPrimitive = serializePrimitiveParam({
12431
+ allowReserved: options.allowReserved,
12432
+ name,
12433
+ value
12434
+ });
12435
+ if (serializedPrimitive)
12436
+ search.push(serializedPrimitive);
12437
+ }
12438
+ }
12439
+ }
12440
+ return search.join("&");
12441
+ };
12442
+ return querySerializer;
12443
+ };
12444
+ var getParseAs = (contentType) => {
12445
+ if (!contentType) {
12446
+ return "stream";
12447
+ }
12448
+ const cleanContent = contentType.split(";")[0]?.trim();
12449
+ if (!cleanContent) {
12450
+ return;
12451
+ }
12452
+ if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
12453
+ return "json";
12454
+ }
12455
+ if (cleanContent === "multipart/form-data") {
12456
+ return "formData";
12457
+ }
12458
+ if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
12459
+ return "blob";
12460
+ }
12461
+ if (cleanContent.startsWith("text/")) {
12462
+ return "text";
12463
+ }
12464
+ return;
12465
+ };
12466
+ var checkForExistence = (options, name) => {
12467
+ if (!name) {
12468
+ return false;
12469
+ }
12470
+ if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
12471
+ return true;
12472
+ }
12473
+ return false;
12474
+ };
12475
+ var setAuthParams = async ({
12476
+ security,
12477
+ ...options
12478
+ }) => {
12479
+ for (const auth of security) {
12480
+ if (checkForExistence(options, auth.name)) {
12481
+ continue;
12482
+ }
12483
+ const token = await getAuthToken(auth, options.auth);
12484
+ if (!token) {
12485
+ continue;
12486
+ }
12487
+ const name = auth.name ?? "Authorization";
12488
+ switch (auth.in) {
12489
+ case "query":
12490
+ if (!options.query) {
12491
+ options.query = {};
12492
+ }
12493
+ options.query[name] = token;
12494
+ break;
12495
+ case "cookie":
12496
+ options.headers.append("Cookie", `${name}=${token}`);
12497
+ break;
12498
+ case "header":
12499
+ default:
12500
+ options.headers.set(name, token);
12501
+ break;
12502
+ }
12503
+ }
12504
+ };
12505
+ var buildUrl = (options) => getUrl({
12506
+ baseUrl: options.baseUrl,
12507
+ path: options.path,
12508
+ query: options.query,
12509
+ querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
12510
+ url: options.url
12511
+ });
12512
+ var mergeConfigs = (a, b) => {
12513
+ const config2 = { ...a, ...b };
12514
+ if (config2.baseUrl?.endsWith("/")) {
12515
+ config2.baseUrl = config2.baseUrl.substring(0, config2.baseUrl.length - 1);
12516
+ }
12517
+ config2.headers = mergeHeaders(a.headers, b.headers);
12518
+ return config2;
12519
+ };
12520
+ var headersEntries = (headers) => {
12521
+ const entries = [];
12522
+ headers.forEach((value, key) => {
12523
+ entries.push([key, value]);
12524
+ });
12525
+ return entries;
12526
+ };
12527
+ var mergeHeaders = (...headers) => {
12528
+ const mergedHeaders = new Headers;
12529
+ for (const header of headers) {
12530
+ if (!header) {
12531
+ continue;
12532
+ }
12533
+ const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
12534
+ for (const [key, value] of iterator) {
12535
+ if (value === null) {
12536
+ mergedHeaders.delete(key);
12537
+ } else if (Array.isArray(value)) {
12538
+ for (const v of value) {
12539
+ mergedHeaders.append(key, v);
12540
+ }
12541
+ } else if (value !== undefined) {
12542
+ mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
12543
+ }
12544
+ }
12545
+ }
12546
+ return mergedHeaders;
12547
+ };
12548
+
12549
+ class Interceptors {
12550
+ fns = [];
12551
+ clear() {
12552
+ this.fns = [];
12553
+ }
12554
+ eject(id) {
12555
+ const index = this.getInterceptorIndex(id);
12556
+ if (this.fns[index]) {
12557
+ this.fns[index] = null;
12558
+ }
12559
+ }
12560
+ exists(id) {
12561
+ const index = this.getInterceptorIndex(id);
12562
+ return Boolean(this.fns[index]);
12563
+ }
12564
+ getInterceptorIndex(id) {
12565
+ if (typeof id === "number") {
12566
+ return this.fns[id] ? id : -1;
12567
+ }
12568
+ return this.fns.indexOf(id);
12569
+ }
12570
+ update(id, fn) {
12571
+ const index = this.getInterceptorIndex(id);
12572
+ if (this.fns[index]) {
12573
+ this.fns[index] = fn;
12574
+ return id;
12575
+ }
12576
+ return false;
12577
+ }
12578
+ use(fn) {
12579
+ this.fns.push(fn);
12580
+ return this.fns.length - 1;
12581
+ }
12582
+ }
12583
+ var createInterceptors = () => ({
12584
+ error: new Interceptors,
12585
+ request: new Interceptors,
12586
+ response: new Interceptors
12587
+ });
12588
+ var defaultQuerySerializer = createQuerySerializer({
12589
+ allowReserved: false,
12590
+ array: {
12591
+ explode: true,
12592
+ style: "form"
12593
+ },
12594
+ object: {
12595
+ explode: true,
12596
+ style: "deepObject"
12597
+ }
12598
+ });
12599
+ var defaultHeaders = {
12600
+ "Content-Type": "application/json"
12601
+ };
12602
+ var createConfig = (override = {}) => ({
12603
+ ...jsonBodySerializer,
12604
+ headers: defaultHeaders,
12605
+ parseAs: "auto",
12606
+ querySerializer: defaultQuerySerializer,
12607
+ ...override
12608
+ });
12609
+
12610
+ // src/generated/client/client.gen.ts
12611
+ var createClient = (config2 = {}) => {
12612
+ let _config = mergeConfigs(createConfig(), config2);
12613
+ const getConfig = () => ({ ..._config });
12614
+ const setConfig = (config3) => {
12615
+ _config = mergeConfigs(_config, config3);
12616
+ return getConfig();
12617
+ };
12618
+ const interceptors = createInterceptors();
12619
+ const beforeRequest = async (options) => {
12620
+ const opts = {
12621
+ ..._config,
12622
+ ...options,
12623
+ fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
12624
+ headers: mergeHeaders(_config.headers, options.headers),
12625
+ serializedBody: undefined
12626
+ };
12627
+ if (opts.security) {
12628
+ await setAuthParams({
12629
+ ...opts,
12630
+ security: opts.security
12631
+ });
12632
+ }
12633
+ if (opts.requestValidator) {
12634
+ await opts.requestValidator(opts);
12635
+ }
12636
+ if (opts.body !== undefined && opts.bodySerializer) {
12637
+ opts.serializedBody = opts.bodySerializer(opts.body);
12638
+ }
12639
+ if (opts.body === undefined || opts.serializedBody === "") {
12640
+ opts.headers.delete("Content-Type");
12641
+ }
12642
+ const url = buildUrl(opts);
12643
+ return { opts, url };
12644
+ };
12645
+ const request = async (options) => {
12646
+ const { opts, url } = await beforeRequest(options);
12647
+ const requestInit = {
12648
+ redirect: "follow",
12649
+ ...opts,
12650
+ body: getValidRequestBody(opts)
12651
+ };
12652
+ let request2 = new Request(url, requestInit);
12653
+ for (const fn of interceptors.request.fns) {
12654
+ if (fn) {
12655
+ request2 = await fn(request2, opts);
12656
+ }
12657
+ }
12658
+ const _fetch = opts.fetch;
12659
+ let response;
12660
+ try {
12661
+ response = await _fetch(request2);
12662
+ } catch (error52) {
12663
+ let finalError2 = error52;
12664
+ for (const fn of interceptors.error.fns) {
12665
+ if (fn) {
12666
+ finalError2 = await fn(error52, undefined, request2, opts);
12667
+ }
12668
+ }
12669
+ finalError2 = finalError2 || {};
12670
+ if (opts.throwOnError) {
12671
+ throw finalError2;
12672
+ }
12673
+ return opts.responseStyle === "data" ? undefined : {
12674
+ error: finalError2,
12675
+ request: request2,
12676
+ response: undefined
12677
+ };
12678
+ }
12679
+ for (const fn of interceptors.response.fns) {
12680
+ if (fn) {
12681
+ response = await fn(response, request2, opts);
12682
+ }
12683
+ }
12684
+ const result = {
12685
+ request: request2,
12686
+ response
12687
+ };
12688
+ if (response.ok) {
12689
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
12690
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
12691
+ let emptyData;
12692
+ switch (parseAs) {
12693
+ case "arrayBuffer":
12694
+ case "blob":
12695
+ case "text":
12696
+ emptyData = await response[parseAs]();
12697
+ break;
12698
+ case "formData":
12699
+ emptyData = new FormData;
12700
+ break;
12701
+ case "stream":
12702
+ emptyData = response.body;
12703
+ break;
12704
+ case "json":
12705
+ default:
12706
+ emptyData = {};
12707
+ break;
12708
+ }
12709
+ return opts.responseStyle === "data" ? emptyData : {
12710
+ data: emptyData,
12711
+ ...result
12712
+ };
12713
+ }
12714
+ let data;
12715
+ switch (parseAs) {
12716
+ case "arrayBuffer":
12717
+ case "blob":
12718
+ case "formData":
12719
+ case "text":
12720
+ data = await response[parseAs]();
12721
+ break;
12722
+ case "json": {
12723
+ const text = await response.text();
12724
+ data = text ? JSON.parse(text) : {};
12725
+ break;
12726
+ }
12727
+ case "stream":
12728
+ return opts.responseStyle === "data" ? response.body : {
12729
+ data: response.body,
12730
+ ...result
12731
+ };
12732
+ }
12733
+ if (parseAs === "json") {
12734
+ if (opts.responseValidator) {
12735
+ await opts.responseValidator(data);
12736
+ }
12737
+ if (opts.responseTransformer) {
12738
+ data = await opts.responseTransformer(data);
12739
+ }
12740
+ }
12741
+ return opts.responseStyle === "data" ? data : {
12742
+ data,
12743
+ ...result
12744
+ };
12745
+ }
12746
+ const textError = await response.text();
12747
+ let jsonError;
12748
+ try {
12749
+ jsonError = JSON.parse(textError);
12750
+ } catch {}
12751
+ const error51 = jsonError ?? textError;
12752
+ let finalError = error51;
12753
+ for (const fn of interceptors.error.fns) {
12754
+ if (fn) {
12755
+ finalError = await fn(error51, response, request2, opts);
12756
+ }
12757
+ }
12758
+ finalError = finalError || {};
12759
+ if (opts.throwOnError) {
12760
+ throw finalError;
12761
+ }
12762
+ return opts.responseStyle === "data" ? undefined : {
12763
+ error: finalError,
12764
+ ...result
12765
+ };
12766
+ };
12767
+ const makeMethodFn = (method) => (options) => request({ ...options, method });
12768
+ const makeSseFn = (method) => async (options) => {
12769
+ const { opts, url } = await beforeRequest(options);
12770
+ return createSseClient({
12771
+ ...opts,
12772
+ body: opts.body,
12773
+ headers: opts.headers,
12774
+ method,
12775
+ onRequest: async (url2, init) => {
12776
+ let request2 = new Request(url2, init);
12777
+ for (const fn of interceptors.request.fns) {
12778
+ if (fn) {
12779
+ request2 = await fn(request2, opts);
12780
+ }
12781
+ }
12782
+ return request2;
12783
+ },
12784
+ serializedBody: getValidRequestBody(opts),
12785
+ url
12786
+ });
12787
+ };
12788
+ return {
12789
+ buildUrl,
12790
+ connect: makeMethodFn("CONNECT"),
12791
+ delete: makeMethodFn("DELETE"),
12792
+ get: makeMethodFn("GET"),
12793
+ getConfig,
12794
+ head: makeMethodFn("HEAD"),
12795
+ interceptors,
12796
+ options: makeMethodFn("OPTIONS"),
12797
+ patch: makeMethodFn("PATCH"),
12798
+ post: makeMethodFn("POST"),
12799
+ put: makeMethodFn("PUT"),
12800
+ request,
12801
+ setConfig,
12802
+ sse: {
12803
+ connect: makeSseFn("CONNECT"),
12804
+ delete: makeSseFn("DELETE"),
12805
+ get: makeSseFn("GET"),
12806
+ head: makeSseFn("HEAD"),
12807
+ options: makeSseFn("OPTIONS"),
12808
+ patch: makeSseFn("PATCH"),
12809
+ post: makeSseFn("POST"),
12810
+ put: makeSseFn("PUT"),
12811
+ trace: makeSseFn("TRACE")
12812
+ },
12813
+ trace: makeMethodFn("TRACE")
12814
+ };
12815
+ };
12816
+ // src/generated/client.gen.ts
12817
+ var client = createClient(createConfig());
12818
+
12819
+ // src/generated/sdk.gen.ts
12820
+ class HeyApiClient {
12821
+ client;
12822
+ constructor(args) {
12823
+ this.client = args?.client ?? client;
12824
+ }
12825
+ }
12826
+
12827
+ class HeyApiRegistry {
12828
+ defaultKey = "default";
12829
+ instances = new Map;
12830
+ get(key) {
12831
+ const instance = this.instances.get(key ?? this.defaultKey);
12832
+ if (!instance) {
12833
+ throw new Error(`No SDK client found. Create one with "new BoboddyClient()" to fix this error.`);
12834
+ }
12835
+ return instance;
12836
+ }
12837
+ set(value, key) {
12838
+ this.instances.set(key ?? this.defaultKey, value);
12839
+ }
12840
+ }
12841
+
12842
+ class Api extends HeyApiClient {
12843
+ "allApiApiAuth*"(options) {
12844
+ return (options?.client ?? this.client).delete({ url: "/api/api/auth/*", ...options });
12845
+ }
12846
+ "allApiApiAuth*2"(options) {
12847
+ return (options?.client ?? this.client).get({ url: "/api/api/auth/*", ...options });
12848
+ }
12849
+ "allApiApiAuth*3"(options) {
12850
+ return (options?.client ?? this.client).head({ url: "/api/api/auth/*", ...options });
12851
+ }
12852
+ "allApiApiAuth*4"(options) {
12853
+ return (options?.client ?? this.client).options({ url: "/api/api/auth/*", ...options });
12854
+ }
12855
+ "allApiApiAuth*5"(options) {
12856
+ return (options?.client ?? this.client).patch({ url: "/api/api/auth/*", ...options });
12857
+ }
12858
+ "allApiApiAuth*6"(options) {
12859
+ return (options?.client ?? this.client).post({ url: "/api/api/auth/*", ...options });
12860
+ }
12861
+ "allApiApiAuth*7"(options) {
12862
+ return (options?.client ?? this.client).put({ url: "/api/api/auth/*", ...options });
12863
+ }
12864
+ "allApiApiAuth*8"(options) {
12865
+ return (options?.client ?? this.client).trace({ url: "/api/api/auth/*", ...options });
12866
+ }
12867
+ }
12868
+
12869
+ class Projects extends HeyApiClient {
12870
+ listProjects(options) {
12871
+ return (options?.client ?? this.client).get({ url: "/api/projects", ...options });
12872
+ }
12873
+ createProject(options) {
12874
+ return (options.client ?? this.client).post({
12875
+ url: "/api/projects",
12876
+ ...options,
12877
+ headers: {
12878
+ "Content-Type": "application/json",
12879
+ ...options.headers
12880
+ }
12881
+ });
12882
+ }
12883
+ listProjectWorkItems(options) {
12884
+ return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/work-items", ...options });
12885
+ }
12886
+ getProject(options) {
12887
+ return (options.client ?? this.client).get({ url: "/api/projects/{projectId}", ...options });
12888
+ }
12889
+ updateProjectMemberPermissions(options) {
12890
+ return (options.client ?? this.client).put({ url: "/api/projects/{projectId}/members/{userId}/permissions", ...options });
12891
+ }
12892
+ }
12893
+
12894
+ class StepDefinitions extends HeyApiClient {
12895
+ listStepDefinitions(options) {
12896
+ return (options.client ?? this.client).get({ url: "/api/step-definitions", ...options });
12897
+ }
12898
+ createStepDefinition(options) {
12899
+ return (options.client ?? this.client).post({
12900
+ url: "/api/step-definitions",
12901
+ ...options,
12902
+ headers: {
12903
+ "Content-Type": "application/json",
12904
+ ...options.headers
12905
+ }
12906
+ });
12907
+ }
12908
+ getStepDefinition(options) {
12909
+ return (options.client ?? this.client).get({ url: "/api/step-definitions/{stepDefinitionId}", ...options });
12910
+ }
12911
+ updateStepDefinition(options) {
12912
+ return (options.client ?? this.client).put({
12913
+ url: "/api/step-definitions/{stepDefinitionId}",
12914
+ ...options,
12915
+ headers: {
12916
+ "Content-Type": "application/json",
12917
+ ...options.headers
12918
+ }
12919
+ });
12920
+ }
12921
+ archiveStepDefinition(options) {
12922
+ return (options.client ?? this.client).put({ url: "/api/step-definitions/{stepDefinitionId}/archive", ...options });
12923
+ }
12924
+ }
12925
+
12926
+ class StepExecutions extends HeyApiClient {
12927
+ claimStepExecutions(options) {
12928
+ return (options.client ?? this.client).post({
12929
+ url: "/api/step-executions/claims",
12930
+ ...options,
12931
+ headers: {
12932
+ "Content-Type": "application/json",
12933
+ ...options.headers
12934
+ }
12935
+ });
12936
+ }
12937
+ listStepExecutions(options) {
12938
+ return (options.client ?? this.client).get({ url: "/api/step-executions", ...options });
12939
+ }
12940
+ createStepExecution(options) {
12941
+ return (options.client ?? this.client).post({
12942
+ url: "/api/step-executions",
12943
+ ...options,
12944
+ headers: {
12945
+ "Content-Type": "application/json",
12946
+ ...options.headers
12947
+ }
12948
+ });
12949
+ }
12950
+ heartbeatStepExecution(options) {
12951
+ return (options.client ?? this.client).put({
12952
+ url: "/api/step-executions/{stepExecutionId}/heartbeat",
12953
+ ...options,
12954
+ headers: {
12955
+ "Content-Type": "application/json",
12956
+ ...options.headers
12957
+ }
12958
+ });
12959
+ }
12960
+ getStepExecutionWorkerContext(options) {
12961
+ return (options.client ?? this.client).post({
12962
+ url: "/api/step-executions/{stepExecutionId}/worker-context",
12963
+ ...options,
12964
+ headers: {
12965
+ "Content-Type": "application/json",
12966
+ ...options.headers
12967
+ }
12968
+ });
12969
+ }
12970
+ completeStepExecution(options) {
12971
+ return (options.client ?? this.client).post({
12972
+ url: "/api/step-executions/{stepExecutionId}/completions",
12973
+ ...options,
12974
+ headers: {
12975
+ "Content-Type": "application/json",
12976
+ ...options.headers
12977
+ }
12978
+ });
12979
+ }
12980
+ markStepExecutionRunning(options) {
12981
+ return (options.client ?? this.client).put({ url: "/api/step-executions/{stepExecutionId}/running", ...options });
12982
+ }
12983
+ createStepExecutionResult(options) {
12984
+ return (options.client ?? this.client).post({
12985
+ url: "/api/step-execution-results",
12986
+ ...options,
12987
+ headers: {
12988
+ "Content-Type": "application/json",
12989
+ ...options.headers
12990
+ }
12991
+ });
12992
+ }
12993
+ extractStepExecutionSignals(options) {
12994
+ return (options.client ?? this.client).post({ url: "/api/step-execution-results/{stepExecutionResultId}/signals/extract", ...options });
12995
+ }
12996
+ getStepExecution(options) {
12997
+ return (options.client ?? this.client).get({ url: "/api/step-executions/{stepExecutionId}", ...options });
12998
+ }
12999
+ }
13000
+
13001
+ class PipelineDefinitions extends HeyApiClient {
13002
+ listPipelineDefinitions(options) {
13003
+ return (options.client ?? this.client).get({ url: "/api/linear-pipeline-definitions", ...options });
13004
+ }
13005
+ createPipelineDefinition(options) {
13006
+ return (options?.client ?? this.client).post({ url: "/api/linear-pipeline-definitions", ...options });
13007
+ }
13008
+ getPipelineDefinition(options) {
13009
+ return (options.client ?? this.client).get({ url: "/api/linear-pipeline-definitions/{linearPipelineDefinitionId}", ...options });
13010
+ }
13011
+ updatePipelineDefinition(options) {
13012
+ return (options.client ?? this.client).put({
13013
+ url: "/api/linear-pipeline-definitions/{linearPipelineDefinitionId}",
13014
+ ...options,
13015
+ headers: {
13016
+ "Content-Type": "application/json",
13017
+ ...options.headers
13018
+ }
13019
+ });
13020
+ }
13021
+ archivePipelineDefinition(options) {
13022
+ return (options.client ?? this.client).put({ url: "/api/linear-pipeline-definitions/{linearPipelineDefinitionId}/archive", ...options });
13023
+ }
13024
+ addPipelineStep(options) {
13025
+ return (options.client ?? this.client).post({ url: "/api/linear-pipeline-definitions/{linearPipelineDefinitionId}/steps", ...options });
13026
+ }
13027
+ removePipelineStep(options) {
13028
+ return (options.client ?? this.client).delete({ url: "/api/linear-pipeline-definitions/{linearPipelineDefinitionId}/steps/{linearPipelineStepDefinitionId}", ...options });
13029
+ }
13030
+ updatePipelineStep(options) {
13031
+ return (options.client ?? this.client).put({ url: "/api/linear-pipeline-definitions/{linearPipelineDefinitionId}/steps/{linearPipelineStepDefinitionId}", ...options });
13032
+ }
13033
+ setPipelineStepAdvancementPolicy(options) {
13034
+ return (options.client ?? this.client).put({ url: "/api/linear-pipeline-definitions/{linearPipelineDefinitionId}/steps/{linearPipelineStepDefinitionId}/advancement-policy", ...options });
13035
+ }
13036
+ }
13037
+
13038
+ class PipelineExecutions extends HeyApiClient {
13039
+ listPipelineExecutions(options) {
13040
+ return (options.client ?? this.client).get({ url: "/api/linear-pipeline-executions", ...options });
13041
+ }
13042
+ createPipelineExecution(options) {
13043
+ return (options.client ?? this.client).post({
13044
+ url: "/api/linear-pipeline-executions",
13045
+ ...options,
13046
+ headers: {
13047
+ "Content-Type": "application/json",
13048
+ ...options.headers
13049
+ }
13050
+ });
13051
+ }
13052
+ startPipelineExecution(options) {
13053
+ return (options.client ?? this.client).put({ url: "/api/linear-pipeline-executions/{linearPipelineExecutionId}/start", ...options });
13054
+ }
13055
+ queueFirstPipelineStepRun(options) {
13056
+ return (options.client ?? this.client).post({ url: "/api/linear-pipeline-executions/{linearPipelineExecutionId}/step-runs/first", ...options });
13057
+ }
13058
+ createPipelineStepRunAttempt(options) {
13059
+ return (options.client ?? this.client).post({ url: "/api/linear-pipeline-executions/{linearPipelineExecutionId}/step-runs/{linearPipelineStepRunId}/attempts", ...options });
13060
+ }
13061
+ markPipelineStepRunAttemptRunning(options) {
13062
+ return (options.client ?? this.client).put({ url: "/api/linear-pipeline-executions/{linearPipelineExecutionId}/step-runs/{linearPipelineStepRunId}/attempts/{linearPipelineStepRunAttemptId}/running", ...options });
13063
+ }
13064
+ applyPipelineStepResult(options) {
13065
+ return (options.client ?? this.client).post({
13066
+ url: "/api/linear-pipeline-executions/{linearPipelineExecutionId}/step-runs/{linearPipelineStepRunId}/attempts/{linearPipelineStepRunAttemptId}/results",
13067
+ ...options,
13068
+ headers: {
13069
+ "Content-Type": "application/json",
13070
+ ...options.headers
13071
+ }
13072
+ });
13073
+ }
13074
+ acceptPipelineStepRun(options) {
13075
+ return (options.client ?? this.client).post({
13076
+ url: "/api/linear-pipeline-executions/{linearPipelineExecutionId}/step-runs/{linearPipelineStepRunId}/accept",
13077
+ ...options,
13078
+ headers: {
13079
+ "Content-Type": "application/json",
13080
+ ...options.headers
13081
+ }
13082
+ });
13083
+ }
13084
+ retriggerPipelineStepRun(options) {
13085
+ return (options.client ?? this.client).post({
13086
+ url: "/api/linear-pipeline-executions/{linearPipelineExecutionId}/step-runs/{linearPipelineStepRunId}/retrigger",
13087
+ ...options,
13088
+ headers: {
13089
+ "Content-Type": "application/json",
13090
+ ...options.headers
13091
+ }
13092
+ });
13093
+ }
13094
+ cancelPipelineExecution(options) {
13095
+ return (options.client ?? this.client).put({ url: "/api/linear-pipeline-executions/{linearPipelineExecutionId}/cancel", ...options });
13096
+ }
13097
+ getPipelineExecution(options) {
13098
+ return (options.client ?? this.client).get({ url: "/api/linear-pipeline-executions/{linearPipelineExecutionId}", ...options });
13099
+ }
13100
+ listPipelineExecutionsByDefinition(options) {
13101
+ return (options.client ?? this.client).get({ url: "/api/linear-pipeline-executions/by-definition/{linearPipelineDefinitionId}", ...options });
13102
+ }
13103
+ }
13104
+
13105
+ class WorkItems extends HeyApiClient {
13106
+ createWorkItem(options) {
13107
+ return (options.client ?? this.client).post({
13108
+ url: "/api/work-items",
13109
+ ...options,
13110
+ headers: {
13111
+ "Content-Type": "application/json",
13112
+ ...options.headers
13113
+ }
13114
+ });
13115
+ }
13116
+ upsertWorkItem(options) {
13117
+ return (options.client ?? this.client).put({
13118
+ url: "/api/work-items",
13119
+ ...options,
13120
+ headers: {
13121
+ "Content-Type": "application/json",
13122
+ ...options.headers
13123
+ }
13124
+ });
13125
+ }
13126
+ deleteWorkItems(options) {
13127
+ return (options.client ?? this.client).delete({
13128
+ url: "/api/work-items/batch",
13129
+ ...options,
13130
+ headers: {
13131
+ "Content-Type": "application/json",
13132
+ ...options.headers
13133
+ }
13134
+ });
13135
+ }
13136
+ getWorkItems(options) {
13137
+ return (options.client ?? this.client).get({ url: "/api/work-items/batch", ...options });
13138
+ }
13139
+ createWorkItems(options) {
13140
+ return (options.client ?? this.client).post({
13141
+ url: "/api/work-items/batch",
13142
+ ...options,
13143
+ headers: {
13144
+ "Content-Type": "application/json",
13145
+ ...options.headers
13146
+ }
13147
+ });
13148
+ }
13149
+ upsertWorkItems(options) {
13150
+ return (options.client ?? this.client).put({
13151
+ url: "/api/work-items/batch",
13152
+ ...options,
13153
+ headers: {
13154
+ "Content-Type": "application/json",
13155
+ ...options.headers
13156
+ }
13157
+ });
13158
+ }
13159
+ deleteWorkItem(options) {
13160
+ return (options.client ?? this.client).delete({ url: "/api/work-items/{workItemId}", ...options });
13161
+ }
13162
+ getWorkItem(options) {
13163
+ return (options.client ?? this.client).get({ url: "/api/work-items/{workItemId}", ...options });
13164
+ }
13165
+ }
13166
+
13167
+ class ProjectContext extends HeyApiClient {
13168
+ listProjectContextEntries(options) {
13169
+ return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/context-entries", ...options });
13170
+ }
13171
+ createProjectContextEntry(options) {
13172
+ return (options.client ?? this.client).post({
13173
+ url: "/api/projects/{projectId}/context-entries",
13174
+ ...options,
13175
+ headers: {
13176
+ "Content-Type": "application/json",
13177
+ ...options.headers
13178
+ }
13179
+ });
13180
+ }
13181
+ deleteProjectContextEntry(options) {
13182
+ return (options.client ?? this.client).delete({ url: "/api/projects/{projectId}/context-entries/{entryId}", ...options });
13183
+ }
13184
+ }
13185
+
13186
+ class FeedbackRequests extends HeyApiClient {
13187
+ listFeedbackRequests(options) {
13188
+ return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/step-signals/{stepSignalId}/feedback-requests", ...options });
13189
+ }
13190
+ declineFeedbackRequest(options) {
13191
+ return (options.client ?? this.client).post({ url: "/api/projects/{projectId}/feedback-requests/{feedbackRequestId}/decline", ...options });
13192
+ }
13193
+ }
13194
+
13195
+ class StepDefinitionTemplates extends HeyApiClient {
13196
+ listStepDefinitionTemplates(options) {
13197
+ return (options?.client ?? this.client).get({ url: "/api/step-definition-templates", ...options });
13198
+ }
13199
+ getStepDefinitionTemplate(options) {
13200
+ return (options.client ?? this.client).get({ url: "/api/step-definition-templates/{stepDefinitionTemplateId}", ...options });
13201
+ }
13202
+ instantiateStepDefinitionTemplate(options) {
13203
+ return (options.client ?? this.client).post({
13204
+ url: "/api/step-definition-templates/{stepDefinitionTemplateId}/instantiate",
13205
+ ...options,
13206
+ headers: {
13207
+ "Content-Type": "application/json",
13208
+ ...options.headers
13209
+ }
13210
+ });
13211
+ }
13212
+ }
13213
+
13214
+ class BoboddyClient extends HeyApiClient {
13215
+ static __registry = new HeyApiRegistry;
13216
+ constructor(args) {
13217
+ super(args);
13218
+ BoboddyClient.__registry.set(this, args?.key);
13219
+ }
13220
+ _api;
13221
+ get api() {
13222
+ return this._api ??= new Api({ client: this.client });
13223
+ }
13224
+ _projects;
13225
+ get projects() {
13226
+ return this._projects ??= new Projects({ client: this.client });
13227
+ }
13228
+ _stepDefinitions;
13229
+ get stepDefinitions() {
13230
+ return this._stepDefinitions ??= new StepDefinitions({ client: this.client });
13231
+ }
13232
+ _stepExecutions;
13233
+ get stepExecutions() {
13234
+ return this._stepExecutions ??= new StepExecutions({ client: this.client });
13235
+ }
13236
+ _pipelineDefinitions;
13237
+ get pipelineDefinitions() {
13238
+ return this._pipelineDefinitions ??= new PipelineDefinitions({ client: this.client });
13239
+ }
13240
+ _pipelineExecutions;
13241
+ get pipelineExecutions() {
13242
+ return this._pipelineExecutions ??= new PipelineExecutions({ client: this.client });
13243
+ }
13244
+ _workItems;
13245
+ get workItems() {
13246
+ return this._workItems ??= new WorkItems({ client: this.client });
13247
+ }
13248
+ _projectContext;
13249
+ get projectContext() {
13250
+ return this._projectContext ??= new ProjectContext({ client: this.client });
13251
+ }
13252
+ _feedbackRequests;
13253
+ get feedbackRequests() {
13254
+ return this._feedbackRequests ??= new FeedbackRequests({ client: this.client });
13255
+ }
13256
+ _stepDefinitionTemplates;
13257
+ get stepDefinitionTemplates() {
13258
+ return this._stepDefinitionTemplates ??= new StepDefinitionTemplates({ client: this.client });
13259
+ }
13260
+ }
13261
+
13262
+ // src/definitions/steps/step-definitions-client.ts
13263
+ function createStepDefinitionsClient(baseUrl) {
13264
+ const client2 = createClient({ baseUrl });
13265
+ return buildStepDefinitionsClient(new StepDefinitions({ client: client2 }));
13266
+ }
13267
+ var buildStepDefinitionsClient = (stepDefinitions) => {
13268
+ return {
13269
+ listByProjectId: async (projectId, options) => {
13270
+ const result = await stepDefinitions.listStepDefinitions({
13271
+ query: { projectId },
13272
+ headers: options?.headers
13273
+ });
13274
+ if (result.error)
13275
+ throw new Error(JSON.stringify(result.error));
13276
+ return result.data;
13277
+ },
13278
+ create: async (body, options) => {
13279
+ const result = await stepDefinitions.createStepDefinition({
13280
+ body,
13281
+ headers: options?.headers
13282
+ });
13283
+ if (result.error)
13284
+ throw new Error(JSON.stringify(result.error));
13285
+ return result.data;
13286
+ },
13287
+ update: async (stepDefinitionId, body, options) => {
13288
+ const result = await stepDefinitions.updateStepDefinition({
13289
+ path: { stepDefinitionId },
13290
+ body,
13291
+ headers: options?.headers
13292
+ });
13293
+ if (result.error)
13294
+ throw new Error(JSON.stringify(result.error));
13295
+ return result.data;
13296
+ }
13297
+ };
13298
+ };
12012
13299
  export {
12013
- defineStep
13300
+ defineStep,
13301
+ createStepDefinitionsClient
12014
13302
  };