@fragment-dev/cli 2026.10.22-5 → 2026.10.22-9

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.
Files changed (83) hide show
  1. package/README.md +10 -14
  2. package/dist/{chunk-ND7QZR7R.js → chunk-5GP3GUTJ.js} +2 -2
  3. package/dist/{chunk-YJGBEX5B.js → chunk-5J7GO2LD.js} +2 -2
  4. package/dist/{chunk-WWLP4HPC.js → chunk-5MNVNPOL.js} +2 -2
  5. package/dist/{chunk-AO62X3BO.js → chunk-5OKT5EMG.js} +5 -3
  6. package/dist/{chunk-ZA2L64JN.js → chunk-67DUFD6P.js} +1 -1
  7. package/dist/{chunk-PIQ6WUMK.js → chunk-AGSUHPTK.js} +4 -4
  8. package/dist/{chunk-E5P6XCQL.js → chunk-B23ACFAK.js} +2 -2
  9. package/dist/{chunk-5SZAIV6H.js → chunk-DF3U6ZLT.js} +1 -1
  10. package/dist/{chunk-OXHLKGQ5.js → chunk-EA4PQ3Q6.js} +15 -17
  11. package/dist/{chunk-TXZYFCBO.js → chunk-FGNF2UZU.js} +1 -1
  12. package/dist/{chunk-3FYCTUQG.js → chunk-FJHK32F7.js} +2 -2
  13. package/dist/{chunk-CSTRC57Q.js → chunk-GMESN77F.js} +4 -4
  14. package/dist/{chunk-2ZOSYPMG.js → chunk-GP4YLGE7.js} +1 -1
  15. package/dist/{chunk-MSTL4SGM.js → chunk-GSRBM4QF.js} +2 -2
  16. package/dist/{chunk-RXZ4S2ZQ.js → chunk-H55MKRZS.js} +25 -25
  17. package/dist/{chunk-5ZNQLL3D.js → chunk-HOGDV2YN.js} +3 -3
  18. package/dist/{chunk-7UQY3FIG.js → chunk-IDAIGTVO.js} +1 -1
  19. package/dist/{chunk-KEPMDY7V.js → chunk-J5VE25EA.js} +1 -1
  20. package/dist/{chunk-JMBVKYGC.js → chunk-JKZUZUAV.js} +1 -1
  21. package/dist/{chunk-Z6NR5CSS.js → chunk-JLXUB5H5.js} +18 -19
  22. package/dist/chunk-K2C7FOE6.js +1477 -0
  23. package/dist/{chunk-I55F4IDB.js → chunk-LR3ZGFUV.js} +2 -2
  24. package/dist/{chunk-4OP66KOV.js → chunk-M2C3IDIY.js} +1 -1
  25. package/dist/{chunk-HUH6X4FR.js → chunk-MM46JBHF.js} +3 -3
  26. package/dist/{chunk-DQKSSCGB.js → chunk-MODGIOPG.js} +38 -11
  27. package/dist/{chunk-N2IUAYUD.js → chunk-MVAJNY4X.js} +2 -2
  28. package/dist/{chunk-WSCCYKTK.js → chunk-N66WU3TN.js} +2 -2
  29. package/dist/{chunk-W7NFIOVK.js → chunk-OA3SUDZN.js} +2 -2
  30. package/dist/{chunk-DRY3QBRK.js → chunk-OCY2MVO7.js} +1 -1
  31. package/dist/{chunk-JYXPC5JP.js → chunk-OKMRVQTQ.js} +5 -5
  32. package/dist/{chunk-XZ6O5DO6.js → chunk-QFH4ECMN.js} +7 -5
  33. package/dist/{chunk-AQYXSJII.js → chunk-R6VUCOQM.js} +2 -2
  34. package/dist/{chunk-XL3PNDE7.js → chunk-RGB7H5GE.js} +1 -1
  35. package/dist/{chunk-TK6OCIYG.js → chunk-RPKBDFB4.js} +2 -2
  36. package/dist/{chunk-NL2ECIET.js → chunk-RWQZFXSF.js} +2 -1470
  37. package/dist/{chunk-M3W6IZD4.js → chunk-SPIU7ZUZ.js} +2 -2
  38. package/dist/chunk-T3EXEEYL.js +104 -0
  39. package/dist/{chunk-45ANXGMD.js → chunk-VCN774BB.js} +1 -1
  40. package/dist/{chunk-ELTMQLAC.js → chunk-VPOARVKJ.js} +10 -5
  41. package/dist/{chunk-CXCEORCL.js → chunk-WDUCGD5M.js} +1 -1
  42. package/dist/{chunk-AB4ADA3B.js → chunk-WKMNNG4S.js} +2 -2
  43. package/dist/{chunk-AIYVYJL6.js → chunk-XWCVZGAX.js} +1 -1
  44. package/dist/commands/add-ledger-entry.js +6 -6
  45. package/dist/commands/api-client/create.js +8 -6
  46. package/dist/commands/create-custom-link.js +6 -6
  47. package/dist/commands/create-ledger.js +6 -6
  48. package/dist/commands/delete-custom-txs.js +6 -6
  49. package/dist/commands/delete-ledger.js +6 -6
  50. package/dist/commands/delete-schema.js +6 -6
  51. package/dist/commands/gen-graphql.js +11 -10
  52. package/dist/commands/get-schema.js +7 -7
  53. package/dist/commands/init.js +5 -5
  54. package/dist/commands/login.js +9 -7
  55. package/dist/commands/migrate-ledger-entry.js +6 -6
  56. package/dist/commands/query/ledgerAccounts.js +6 -6
  57. package/dist/commands/query/ledgers.js +6 -6
  58. package/dist/commands/query/schema.js +6 -6
  59. package/dist/commands/query/schemas.js +6 -6
  60. package/dist/commands/reverse-ledger-entry.js +6 -6
  61. package/dist/commands/start.js +5 -5
  62. package/dist/commands/store-schema.js +6 -6
  63. package/dist/commands/token.js +6 -6
  64. package/dist/commands/update-ledger-account.js +6 -6
  65. package/dist/commands/update.js +6 -6
  66. package/dist/commands/verify-schema.js +12 -11
  67. package/dist/commands/version.js +5 -5
  68. package/dist/commands/workspace.js +6 -6
  69. package/dist/commands.js +42 -40
  70. package/dist/graphql.js +4 -3
  71. package/dist/index.js +42 -40
  72. package/dist/lib/auth.js +2 -2
  73. package/dist/lib/authenticatedCommand.js +5 -5
  74. package/dist/lib/baseCommand.js +4 -4
  75. package/dist/lib/browserAuth.js +3 -1
  76. package/dist/lib/browserLogin.js +13 -0
  77. package/dist/lib/constants.js +5 -5
  78. package/dist/utils/formatValidationErrors.js +3 -2
  79. package/dist/utils/schemaBackCompat.js +7 -6
  80. package/dist/utils/schemaValidation.js +6 -5
  81. package/dist/version.js +2 -2
  82. package/oclif.manifest.json +1 -17
  83. package/package.json +1 -1
@@ -0,0 +1,1477 @@
1
+ import {
2
+ z
3
+ } from "./chunk-RWQZFXSF.js";
4
+ import {
5
+ __commonJS,
6
+ __require,
7
+ __toESM,
8
+ init_cjs_shims
9
+ } from "./chunk-7GH3YGSC.js";
10
+
11
+ // ../../node_modules/assert-plus/assert.js
12
+ var require_assert = __commonJS({
13
+ "../../node_modules/assert-plus/assert.js"(exports, module) {
14
+ init_cjs_shims();
15
+ var assert2 = __require("assert");
16
+ var Stream = __require("stream").Stream;
17
+ var util = __require("util");
18
+ var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
19
+ function _capitalize(str) {
20
+ return str.charAt(0).toUpperCase() + str.slice(1);
21
+ }
22
+ function _toss(name, expected, oper, arg, actual) {
23
+ throw new assert2.AssertionError({
24
+ message: util.format("%s (%s) is required", name, expected),
25
+ actual: actual === void 0 ? typeof arg : actual(arg),
26
+ expected,
27
+ operator: oper || "===",
28
+ stackStartFunction: _toss.caller
29
+ });
30
+ }
31
+ function _getClass(arg) {
32
+ return Object.prototype.toString.call(arg).slice(8, -1);
33
+ }
34
+ function noop() {
35
+ }
36
+ var types = {
37
+ bool: {
38
+ check: function(arg) {
39
+ return typeof arg === "boolean";
40
+ }
41
+ },
42
+ func: {
43
+ check: function(arg) {
44
+ return typeof arg === "function";
45
+ }
46
+ },
47
+ string: {
48
+ check: function(arg) {
49
+ return typeof arg === "string";
50
+ }
51
+ },
52
+ object: {
53
+ check: function(arg) {
54
+ return typeof arg === "object" && arg !== null;
55
+ }
56
+ },
57
+ number: {
58
+ check: function(arg) {
59
+ return typeof arg === "number" && !isNaN(arg);
60
+ }
61
+ },
62
+ finite: {
63
+ check: function(arg) {
64
+ return typeof arg === "number" && !isNaN(arg) && isFinite(arg);
65
+ }
66
+ },
67
+ buffer: {
68
+ check: function(arg) {
69
+ return Buffer.isBuffer(arg);
70
+ },
71
+ operator: "Buffer.isBuffer"
72
+ },
73
+ array: {
74
+ check: function(arg) {
75
+ return Array.isArray(arg);
76
+ },
77
+ operator: "Array.isArray"
78
+ },
79
+ stream: {
80
+ check: function(arg) {
81
+ return arg instanceof Stream;
82
+ },
83
+ operator: "instanceof",
84
+ actual: _getClass
85
+ },
86
+ date: {
87
+ check: function(arg) {
88
+ return arg instanceof Date;
89
+ },
90
+ operator: "instanceof",
91
+ actual: _getClass
92
+ },
93
+ regexp: {
94
+ check: function(arg) {
95
+ return arg instanceof RegExp;
96
+ },
97
+ operator: "instanceof",
98
+ actual: _getClass
99
+ },
100
+ uuid: {
101
+ check: function(arg) {
102
+ return typeof arg === "string" && UUID_REGEXP.test(arg);
103
+ },
104
+ operator: "isUUID"
105
+ }
106
+ };
107
+ function _setExports(ndebug) {
108
+ var keys = Object.keys(types);
109
+ var out;
110
+ if (process.env.NODE_NDEBUG) {
111
+ out = noop;
112
+ } else {
113
+ out = function(arg, msg) {
114
+ if (!arg) {
115
+ _toss(msg, "true", arg);
116
+ }
117
+ };
118
+ }
119
+ keys.forEach(function(k) {
120
+ if (ndebug) {
121
+ out[k] = noop;
122
+ return;
123
+ }
124
+ var type = types[k];
125
+ out[k] = function(arg, msg) {
126
+ if (!type.check(arg)) {
127
+ _toss(msg, k, type.operator, arg, type.actual);
128
+ }
129
+ };
130
+ });
131
+ keys.forEach(function(k) {
132
+ var name = "optional" + _capitalize(k);
133
+ if (ndebug) {
134
+ out[name] = noop;
135
+ return;
136
+ }
137
+ var type = types[k];
138
+ out[name] = function(arg, msg) {
139
+ if (arg === void 0 || arg === null) {
140
+ return;
141
+ }
142
+ if (!type.check(arg)) {
143
+ _toss(msg, k, type.operator, arg, type.actual);
144
+ }
145
+ };
146
+ });
147
+ keys.forEach(function(k) {
148
+ var name = "arrayOf" + _capitalize(k);
149
+ if (ndebug) {
150
+ out[name] = noop;
151
+ return;
152
+ }
153
+ var type = types[k];
154
+ var expected = "[" + k + "]";
155
+ out[name] = function(arg, msg) {
156
+ if (!Array.isArray(arg)) {
157
+ _toss(msg, expected, type.operator, arg, type.actual);
158
+ }
159
+ var i;
160
+ for (i = 0; i < arg.length; i++) {
161
+ if (!type.check(arg[i])) {
162
+ _toss(msg, expected, type.operator, arg, type.actual);
163
+ }
164
+ }
165
+ };
166
+ });
167
+ keys.forEach(function(k) {
168
+ var name = "optionalArrayOf" + _capitalize(k);
169
+ if (ndebug) {
170
+ out[name] = noop;
171
+ return;
172
+ }
173
+ var type = types[k];
174
+ var expected = "[" + k + "]";
175
+ out[name] = function(arg, msg) {
176
+ if (arg === void 0 || arg === null) {
177
+ return;
178
+ }
179
+ if (!Array.isArray(arg)) {
180
+ _toss(msg, expected, type.operator, arg, type.actual);
181
+ }
182
+ var i;
183
+ for (i = 0; i < arg.length; i++) {
184
+ if (!type.check(arg[i])) {
185
+ _toss(msg, expected, type.operator, arg, type.actual);
186
+ }
187
+ }
188
+ };
189
+ });
190
+ Object.keys(assert2).forEach(function(k) {
191
+ if (k === "AssertionError") {
192
+ out[k] = assert2[k];
193
+ return;
194
+ }
195
+ if (ndebug) {
196
+ out[k] = noop;
197
+ return;
198
+ }
199
+ out[k] = assert2[k];
200
+ });
201
+ out._setExports = _setExports;
202
+ return out;
203
+ }
204
+ module.exports = _setExports(process.env.NODE_NDEBUG);
205
+ }
206
+ });
207
+
208
+ // ../../node_modules/extsprintf/lib/extsprintf.js
209
+ var require_extsprintf = __commonJS({
210
+ "../../node_modules/extsprintf/lib/extsprintf.js"(exports) {
211
+ init_cjs_shims();
212
+ var mod_assert = __require("assert");
213
+ var mod_util = __require("util");
214
+ exports.sprintf = jsSprintf;
215
+ exports.printf = jsPrintf;
216
+ exports.fprintf = jsFprintf;
217
+ function jsSprintf(ofmt) {
218
+ var regex = [
219
+ "([^%]*)",
220
+ /* normal text */
221
+ "%",
222
+ /* start of format */
223
+ "(['\\-+ #0]*?)",
224
+ /* flags (optional) */
225
+ "([1-9]\\d*)?",
226
+ /* width (optional) */
227
+ "(\\.([1-9]\\d*))?",
228
+ /* precision (optional) */
229
+ "[lhjztL]*?",
230
+ /* length mods (ignored) */
231
+ "([diouxXfFeEgGaAcCsSp%jr])"
232
+ /* conversion */
233
+ ].join("");
234
+ var re = new RegExp(regex);
235
+ var args = Array.prototype.slice.call(arguments, 1);
236
+ var fmt = ofmt;
237
+ var flags, width, precision, conversion;
238
+ var left, pad, sign, arg, match;
239
+ var ret = "";
240
+ var argn = 1;
241
+ var posn = 0;
242
+ var convposn;
243
+ var curconv;
244
+ mod_assert.equal(
245
+ "string",
246
+ typeof fmt,
247
+ "first argument must be a format string"
248
+ );
249
+ while ((match = re.exec(fmt)) !== null) {
250
+ ret += match[1];
251
+ fmt = fmt.substring(match[0].length);
252
+ curconv = match[0].substring(match[1].length);
253
+ convposn = posn + match[1].length + 1;
254
+ posn += match[0].length;
255
+ flags = match[2] || "";
256
+ width = match[3] || 0;
257
+ precision = match[4] || "";
258
+ conversion = match[6];
259
+ left = false;
260
+ sign = false;
261
+ pad = " ";
262
+ if (conversion == "%") {
263
+ ret += "%";
264
+ continue;
265
+ }
266
+ if (args.length === 0) {
267
+ throw jsError(
268
+ ofmt,
269
+ convposn,
270
+ curconv,
271
+ "has no matching argument (too few arguments passed)"
272
+ );
273
+ }
274
+ arg = args.shift();
275
+ argn++;
276
+ if (flags.match(/[\' #]/)) {
277
+ throw jsError(
278
+ ofmt,
279
+ convposn,
280
+ curconv,
281
+ "uses unsupported flags"
282
+ );
283
+ }
284
+ if (precision.length > 0) {
285
+ throw jsError(
286
+ ofmt,
287
+ convposn,
288
+ curconv,
289
+ "uses non-zero precision (not supported)"
290
+ );
291
+ }
292
+ if (flags.match(/-/))
293
+ left = true;
294
+ if (flags.match(/0/))
295
+ pad = "0";
296
+ if (flags.match(/\+/))
297
+ sign = true;
298
+ switch (conversion) {
299
+ case "s":
300
+ if (arg === void 0 || arg === null) {
301
+ throw jsError(
302
+ ofmt,
303
+ convposn,
304
+ curconv,
305
+ "attempted to print undefined or null as a string (argument " + argn + " to sprintf)"
306
+ );
307
+ }
308
+ ret += doPad(pad, width, left, arg.toString());
309
+ break;
310
+ case "d":
311
+ arg = Math.floor(arg);
312
+ case "f":
313
+ sign = sign && arg > 0 ? "+" : "";
314
+ ret += sign + doPad(
315
+ pad,
316
+ width,
317
+ left,
318
+ arg.toString()
319
+ );
320
+ break;
321
+ case "x":
322
+ ret += doPad(pad, width, left, arg.toString(16));
323
+ break;
324
+ case "j":
325
+ if (width === 0)
326
+ width = 10;
327
+ ret += mod_util.inspect(arg, false, width);
328
+ break;
329
+ case "r":
330
+ ret += dumpException(arg);
331
+ break;
332
+ default:
333
+ throw jsError(
334
+ ofmt,
335
+ convposn,
336
+ curconv,
337
+ "is not supported"
338
+ );
339
+ }
340
+ }
341
+ ret += fmt;
342
+ return ret;
343
+ }
344
+ function jsError(fmtstr, convposn, curconv, reason) {
345
+ mod_assert.equal(typeof fmtstr, "string");
346
+ mod_assert.equal(typeof curconv, "string");
347
+ mod_assert.equal(typeof convposn, "number");
348
+ mod_assert.equal(typeof reason, "string");
349
+ return new Error('format string "' + fmtstr + '": conversion specifier "' + curconv + '" at character ' + convposn + " " + reason);
350
+ }
351
+ function jsPrintf() {
352
+ var args = Array.prototype.slice.call(arguments);
353
+ args.unshift(process.stdout);
354
+ jsFprintf.apply(null, args);
355
+ }
356
+ function jsFprintf(stream) {
357
+ var args = Array.prototype.slice.call(arguments, 1);
358
+ return stream.write(jsSprintf.apply(this, args));
359
+ }
360
+ function doPad(chr, width, left, str) {
361
+ var ret = str;
362
+ while (ret.length < width) {
363
+ if (left)
364
+ ret += chr;
365
+ else
366
+ ret = chr + ret;
367
+ }
368
+ return ret;
369
+ }
370
+ function dumpException(ex) {
371
+ var ret;
372
+ if (!(ex instanceof Error))
373
+ throw new Error(jsSprintf("invalid type for %%r: %j", ex));
374
+ ret = "EXCEPTION: " + ex.constructor.name + ": " + ex.stack;
375
+ if (ex.cause && typeof ex.cause === "function") {
376
+ var cex = ex.cause();
377
+ if (cex) {
378
+ ret += "\nCaused by: " + dumpException(cex);
379
+ }
380
+ }
381
+ return ret;
382
+ }
383
+ }
384
+ });
385
+
386
+ // ../../node_modules/verror/node_modules/core-util-is/lib/util.js
387
+ var require_util = __commonJS({
388
+ "../../node_modules/verror/node_modules/core-util-is/lib/util.js"(exports) {
389
+ init_cjs_shims();
390
+ function isArray(arg) {
391
+ if (Array.isArray) {
392
+ return Array.isArray(arg);
393
+ }
394
+ return objectToString(arg) === "[object Array]";
395
+ }
396
+ exports.isArray = isArray;
397
+ function isBoolean(arg) {
398
+ return typeof arg === "boolean";
399
+ }
400
+ exports.isBoolean = isBoolean;
401
+ function isNull(arg) {
402
+ return arg === null;
403
+ }
404
+ exports.isNull = isNull;
405
+ function isNullOrUndefined(arg) {
406
+ return arg == null;
407
+ }
408
+ exports.isNullOrUndefined = isNullOrUndefined;
409
+ function isNumber(arg) {
410
+ return typeof arg === "number";
411
+ }
412
+ exports.isNumber = isNumber;
413
+ function isString(arg) {
414
+ return typeof arg === "string";
415
+ }
416
+ exports.isString = isString;
417
+ function isSymbol(arg) {
418
+ return typeof arg === "symbol";
419
+ }
420
+ exports.isSymbol = isSymbol;
421
+ function isUndefined(arg) {
422
+ return arg === void 0;
423
+ }
424
+ exports.isUndefined = isUndefined;
425
+ function isRegExp(re) {
426
+ return objectToString(re) === "[object RegExp]";
427
+ }
428
+ exports.isRegExp = isRegExp;
429
+ function isObject(arg) {
430
+ return typeof arg === "object" && arg !== null;
431
+ }
432
+ exports.isObject = isObject;
433
+ function isDate(d) {
434
+ return objectToString(d) === "[object Date]";
435
+ }
436
+ exports.isDate = isDate;
437
+ function isError(e) {
438
+ return objectToString(e) === "[object Error]" || e instanceof Error;
439
+ }
440
+ exports.isError = isError;
441
+ function isFunction(arg) {
442
+ return typeof arg === "function";
443
+ }
444
+ exports.isFunction = isFunction;
445
+ function isPrimitive(arg) {
446
+ return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
447
+ typeof arg === "undefined";
448
+ }
449
+ exports.isPrimitive = isPrimitive;
450
+ exports.isBuffer = Buffer.isBuffer;
451
+ function objectToString(o) {
452
+ return Object.prototype.toString.call(o);
453
+ }
454
+ }
455
+ });
456
+
457
+ // ../../node_modules/verror/lib/verror.js
458
+ var require_verror = __commonJS({
459
+ "../../node_modules/verror/lib/verror.js"(exports, module) {
460
+ init_cjs_shims();
461
+ var mod_assertplus = require_assert();
462
+ var mod_util = __require("util");
463
+ var mod_extsprintf = require_extsprintf();
464
+ var mod_isError = require_util().isError;
465
+ var sprintf = mod_extsprintf.sprintf;
466
+ module.exports = VError;
467
+ VError.VError = VError;
468
+ VError.SError = SError;
469
+ VError.WError = WError;
470
+ VError.MultiError = MultiError;
471
+ function parseConstructorArguments(args) {
472
+ var argv, options, sprintf_args, shortmessage, k;
473
+ mod_assertplus.object(args, "args");
474
+ mod_assertplus.bool(args.strict, "args.strict");
475
+ mod_assertplus.array(args.argv, "args.argv");
476
+ argv = args.argv;
477
+ if (argv.length === 0) {
478
+ options = {};
479
+ sprintf_args = [];
480
+ } else if (mod_isError(argv[0])) {
481
+ options = { "cause": argv[0] };
482
+ sprintf_args = argv.slice(1);
483
+ } else if (typeof argv[0] === "object") {
484
+ options = {};
485
+ for (k in argv[0]) {
486
+ options[k] = argv[0][k];
487
+ }
488
+ sprintf_args = argv.slice(1);
489
+ } else {
490
+ mod_assertplus.string(
491
+ argv[0],
492
+ "first argument to VError, SError, or WError constructor must be a string, object, or Error"
493
+ );
494
+ options = {};
495
+ sprintf_args = argv;
496
+ }
497
+ mod_assertplus.object(options);
498
+ if (!options.strict && !args.strict) {
499
+ sprintf_args = sprintf_args.map(function(a) {
500
+ return a === null ? "null" : a === void 0 ? "undefined" : a;
501
+ });
502
+ }
503
+ if (sprintf_args.length === 0) {
504
+ shortmessage = "";
505
+ } else {
506
+ shortmessage = sprintf.apply(null, sprintf_args);
507
+ }
508
+ return {
509
+ "options": options,
510
+ "shortmessage": shortmessage
511
+ };
512
+ }
513
+ function VError() {
514
+ var args, obj, parsed, cause, ctor, message, k;
515
+ args = Array.prototype.slice.call(arguments, 0);
516
+ if (!(this instanceof VError)) {
517
+ obj = Object.create(VError.prototype);
518
+ VError.apply(obj, arguments);
519
+ return obj;
520
+ }
521
+ parsed = parseConstructorArguments({
522
+ "argv": args,
523
+ "strict": false
524
+ });
525
+ if (parsed.options.name) {
526
+ mod_assertplus.string(
527
+ parsed.options.name,
528
+ `error's "name" must be a string`
529
+ );
530
+ this.name = parsed.options.name;
531
+ }
532
+ this.jse_shortmsg = parsed.shortmessage;
533
+ message = parsed.shortmessage;
534
+ cause = parsed.options.cause;
535
+ if (cause) {
536
+ mod_assertplus.ok(mod_isError(cause), "cause is not an Error");
537
+ this.jse_cause = cause;
538
+ if (!parsed.options.skipCauseMessage) {
539
+ message += ": " + cause.message;
540
+ }
541
+ }
542
+ this.jse_info = {};
543
+ if (parsed.options.info) {
544
+ for (k in parsed.options.info) {
545
+ this.jse_info[k] = parsed.options.info[k];
546
+ }
547
+ }
548
+ this.message = message;
549
+ Error.call(this, message);
550
+ if (Error.captureStackTrace) {
551
+ ctor = parsed.options.constructorOpt || this.constructor;
552
+ Error.captureStackTrace(this, ctor);
553
+ }
554
+ return this;
555
+ }
556
+ mod_util.inherits(VError, Error);
557
+ VError.prototype.name = "VError";
558
+ VError.prototype.toString = function ve_toString() {
559
+ var str = this.hasOwnProperty("name") && this.name || this.constructor.name || this.constructor.prototype.name;
560
+ if (this.message)
561
+ str += ": " + this.message;
562
+ return str;
563
+ };
564
+ VError.prototype.cause = function ve_cause() {
565
+ var cause = VError.cause(this);
566
+ return cause === null ? void 0 : cause;
567
+ };
568
+ VError.cause = function(err) {
569
+ mod_assertplus.ok(mod_isError(err), "err must be an Error");
570
+ return mod_isError(err.jse_cause) ? err.jse_cause : null;
571
+ };
572
+ VError.info = function(err) {
573
+ var rv, cause, k;
574
+ mod_assertplus.ok(mod_isError(err), "err must be an Error");
575
+ cause = VError.cause(err);
576
+ if (cause !== null) {
577
+ rv = VError.info(cause);
578
+ } else {
579
+ rv = {};
580
+ }
581
+ if (typeof err.jse_info == "object" && err.jse_info !== null) {
582
+ for (k in err.jse_info) {
583
+ rv[k] = err.jse_info[k];
584
+ }
585
+ }
586
+ return rv;
587
+ };
588
+ VError.findCauseByName = function(err, name) {
589
+ var cause;
590
+ mod_assertplus.ok(mod_isError(err), "err must be an Error");
591
+ mod_assertplus.string(name, "name");
592
+ mod_assertplus.ok(name.length > 0, "name cannot be empty");
593
+ for (cause = err; cause !== null; cause = VError.cause(cause)) {
594
+ mod_assertplus.ok(mod_isError(cause));
595
+ if (cause.name == name) {
596
+ return cause;
597
+ }
598
+ }
599
+ return null;
600
+ };
601
+ VError.hasCauseWithName = function(err, name) {
602
+ return VError.findCauseByName(err, name) !== null;
603
+ };
604
+ VError.fullStack = function(err) {
605
+ mod_assertplus.ok(mod_isError(err), "err must be an Error");
606
+ var cause = VError.cause(err);
607
+ if (cause) {
608
+ return err.stack + "\ncaused by: " + VError.fullStack(cause);
609
+ }
610
+ return err.stack;
611
+ };
612
+ VError.errorFromList = function(errors) {
613
+ mod_assertplus.arrayOfObject(errors, "errors");
614
+ if (errors.length === 0) {
615
+ return null;
616
+ }
617
+ errors.forEach(function(e) {
618
+ mod_assertplus.ok(mod_isError(e));
619
+ });
620
+ if (errors.length == 1) {
621
+ return errors[0];
622
+ }
623
+ return new MultiError(errors);
624
+ };
625
+ VError.errorForEach = function(err, func) {
626
+ mod_assertplus.ok(mod_isError(err), "err must be an Error");
627
+ mod_assertplus.func(func, "func");
628
+ if (err instanceof MultiError) {
629
+ err.errors().forEach(function iterError(e) {
630
+ func(e);
631
+ });
632
+ } else {
633
+ func(err);
634
+ }
635
+ };
636
+ function SError() {
637
+ var args, obj, parsed, options;
638
+ args = Array.prototype.slice.call(arguments, 0);
639
+ if (!(this instanceof SError)) {
640
+ obj = Object.create(SError.prototype);
641
+ SError.apply(obj, arguments);
642
+ return obj;
643
+ }
644
+ parsed = parseConstructorArguments({
645
+ "argv": args,
646
+ "strict": true
647
+ });
648
+ options = parsed.options;
649
+ VError.call(this, options, "%s", parsed.shortmessage);
650
+ return this;
651
+ }
652
+ mod_util.inherits(SError, VError);
653
+ function MultiError(errors) {
654
+ mod_assertplus.array(errors, "list of errors");
655
+ mod_assertplus.ok(errors.length > 0, "must be at least one error");
656
+ this.ase_errors = errors;
657
+ VError.call(this, {
658
+ "cause": errors[0]
659
+ }, "first of %d error%s", errors.length, errors.length == 1 ? "" : "s");
660
+ }
661
+ mod_util.inherits(MultiError, VError);
662
+ MultiError.prototype.name = "MultiError";
663
+ MultiError.prototype.errors = function me_errors() {
664
+ return this.ase_errors.slice(0);
665
+ };
666
+ function WError() {
667
+ var args, obj, parsed, options;
668
+ args = Array.prototype.slice.call(arguments, 0);
669
+ if (!(this instanceof WError)) {
670
+ obj = Object.create(WError.prototype);
671
+ WError.apply(obj, args);
672
+ return obj;
673
+ }
674
+ parsed = parseConstructorArguments({
675
+ "argv": args,
676
+ "strict": false
677
+ });
678
+ options = parsed.options;
679
+ options["skipCauseMessage"] = true;
680
+ VError.call(this, options, "%s", parsed.shortmessage);
681
+ return this;
682
+ }
683
+ mod_util.inherits(WError, VError);
684
+ WError.prototype.name = "WError";
685
+ WError.prototype.toString = function we_toString() {
686
+ var str = this.hasOwnProperty("name") && this.name || this.constructor.name || this.constructor.prototype.name;
687
+ if (this.message)
688
+ str += ": " + this.message;
689
+ if (this.jse_cause && this.jse_cause.message)
690
+ str += "; caused by " + this.jse_cause.toString();
691
+ return str;
692
+ };
693
+ WError.prototype.cause = function we_cause(c) {
694
+ if (mod_isError(c))
695
+ this.jse_cause = c;
696
+ return this.jse_cause;
697
+ };
698
+ }
699
+ });
700
+
701
+ // ../../libs/error-utils/errors.ts
702
+ init_cjs_shims();
703
+
704
+ // ../../libs/error-utils/HttpError.ts
705
+ init_cjs_shims();
706
+ var import_verror = __toESM(require_verror(), 1);
707
+ var VErrorConstructor = import_verror.default.VError || import_verror.default;
708
+ var HttpError = class _HttpError extends VErrorConstructor {
709
+ constructor(...args) {
710
+ const parsed = _HttpError.parseArgs(args);
711
+ const vErrorOptions = {};
712
+ if (parsed.cause) {
713
+ vErrorOptions.cause = parsed.cause;
714
+ }
715
+ if (parsed.info && Object.keys(parsed.info).length > 0) {
716
+ vErrorOptions.info = parsed.info;
717
+ }
718
+ super(vErrorOptions);
719
+ Object.setPrototypeOf(this, new.target.prototype);
720
+ this.name = this.constructor.name;
721
+ this.message = parsed.message || "";
722
+ this.statusCode = parsed.statusCode || this.constructor.prototype.statusCode || 500;
723
+ this.code = parsed.code || this.constructor.prototype.code || this.name.replace(/Error$/, "");
724
+ const bodyCode = parsed.code || this.name.replace(/Error$/, "");
725
+ this.body = {
726
+ code: bodyCode,
727
+ message: parsed.message || ""
728
+ };
729
+ }
730
+ /**
731
+ * Parse constructor arguments into a normalized format.
732
+ * Handles variadic signatures similar to restify-errors.
733
+ */
734
+ static parseArgs(args) {
735
+ if (args.length === 0) {
736
+ return { message: "" };
737
+ }
738
+ const first = args[0];
739
+ const second = args[1];
740
+ if (first instanceof Error) {
741
+ if (typeof second === "object" && second !== null && !Array.isArray(second)) {
742
+ const opts = second;
743
+ return {
744
+ cause: first,
745
+ info: opts.info,
746
+ statusCode: opts.statusCode,
747
+ code: opts.code,
748
+ message: opts.message || first.message
749
+ };
750
+ }
751
+ if (typeof second === "string") {
752
+ return {
753
+ cause: first,
754
+ message: second
755
+ };
756
+ }
757
+ return {
758
+ cause: first,
759
+ message: first.message
760
+ };
761
+ }
762
+ if (typeof first === "object" && first !== null && !Array.isArray(first)) {
763
+ const opts = first;
764
+ const message = typeof second === "string" ? second : opts.message || "";
765
+ return {
766
+ cause: opts.cause,
767
+ info: opts.info,
768
+ statusCode: opts.statusCode,
769
+ code: opts.code,
770
+ message
771
+ };
772
+ }
773
+ if (typeof first === "string") {
774
+ return {
775
+ message: first
776
+ };
777
+ }
778
+ return { message: "" };
779
+ }
780
+ /**
781
+ * Serialize error to JSON format.
782
+ * Compatible with restify-errors toJSON behavior.
783
+ */
784
+ toJSON() {
785
+ let { message } = this.body;
786
+ const causeMethod = this.cause;
787
+ if (causeMethod && typeof causeMethod === "function") {
788
+ try {
789
+ const causeError = causeMethod();
790
+ if (causeError) {
791
+ const fullString = this.toString();
792
+ const colonIndex = fullString.indexOf(":");
793
+ if (colonIndex !== -1) {
794
+ message = fullString.substring(colonIndex + 1).trim();
795
+ }
796
+ }
797
+ } catch {
798
+ }
799
+ }
800
+ return {
801
+ code: this.body.code,
802
+ message
803
+ };
804
+ }
805
+ /**
806
+ * Get context/info object (compatibility with restify-errors)
807
+ */
808
+ get context() {
809
+ return VErrorConstructor.info(this);
810
+ }
811
+ };
812
+ HttpError.prototype.name = "HttpError";
813
+ HttpError.prototype.statusCode = 500;
814
+ HttpError.prototype.code = "Error";
815
+
816
+ // ../../libs/error-utils/errors.ts
817
+ var InternalError = class extends HttpError {
818
+ constructor(...args) {
819
+ super(...args);
820
+ this.name = "InternalError";
821
+ }
822
+ };
823
+ InternalError.prototype.statusCode = 500;
824
+ InternalError.prototype.code = "Error";
825
+ var BadRequestError = class extends HttpError {
826
+ constructor(...args) {
827
+ super(...args);
828
+ this.name = "BadRequestError";
829
+ }
830
+ };
831
+ BadRequestError.prototype.statusCode = 400;
832
+ BadRequestError.prototype.code = "BadRequest";
833
+ var NotFoundError = class extends HttpError {
834
+ constructor(...args) {
835
+ super(...args);
836
+ this.name = "NotFoundError";
837
+ }
838
+ };
839
+ NotFoundError.prototype.statusCode = 404;
840
+ NotFoundError.prototype.code = "NotFound";
841
+ var ConflictError = class extends HttpError {
842
+ constructor(...args) {
843
+ super(...args);
844
+ this.name = "ConflictError";
845
+ }
846
+ };
847
+ ConflictError.prototype.statusCode = 409;
848
+ ConflictError.prototype.code = "Conflict";
849
+ var NotAuthorizedError = class extends HttpError {
850
+ constructor(...args) {
851
+ super(...args);
852
+ this.name = "NotAuthorizedError";
853
+ }
854
+ };
855
+ NotAuthorizedError.prototype.statusCode = 401;
856
+ NotAuthorizedError.prototype.code = "NotAuthorized";
857
+ var RequestThrottledError = class extends HttpError {
858
+ constructor(...args) {
859
+ super(...args);
860
+ this.name = "RequestThrottledError";
861
+ }
862
+ };
863
+ RequestThrottledError.prototype.statusCode = 429;
864
+ RequestThrottledError.prototype.code = "TooManyRequests";
865
+
866
+ // ../../libs/error-utils/index.ts
867
+ init_cjs_shims();
868
+
869
+ // ../../libs/error-utils/serializer.ts
870
+ init_cjs_shims();
871
+ var RestError = class extends HttpError {
872
+ constructor(...args) {
873
+ super(...args);
874
+ this.name = "RestError";
875
+ }
876
+ };
877
+ RestError.prototype.statusCode = 500;
878
+ RestError.prototype.code = "Error";
879
+
880
+ // ../../libs/error-utils/assert.ts
881
+ init_cjs_shims();
882
+ import assert from "assert";
883
+
884
+ // ../../libs/types/index.ts
885
+ init_cjs_shims();
886
+
887
+ // ../../libs/types/accountTypes.ts
888
+ init_cjs_shims();
889
+ var ledgerAccountTypes = [
890
+ "asset",
891
+ "liability",
892
+ "income",
893
+ "expense"
894
+ ];
895
+ var LedgerAccountTypeSchema = z.enum(ledgerAccountTypes);
896
+
897
+ // ../../libs/types/workspaceTypes.ts
898
+ init_cjs_shims();
899
+ var workspaceTypes = [
900
+ "ledger",
901
+ "payments",
902
+ "free_tier_ledger"
903
+ ];
904
+ var WorkspaceTypeSchema = z.enum(workspaceTypes);
905
+
906
+ // ../../libs/types/stripeModes.ts
907
+ init_cjs_shims();
908
+ var stripeModes = ["test", "live"];
909
+ var StripeModeSchema = z.enum(stripeModes);
910
+
911
+ // ../../libs/types/currencyCodes.ts
912
+ init_cjs_shims();
913
+ var nonISOCurrencyCodes = [
914
+ // Crypto currencies
915
+ "ADA",
916
+ "BTC",
917
+ "DAI",
918
+ "ETH",
919
+ "SOL",
920
+ "USDC",
921
+ "USDT",
922
+ "USDG",
923
+ "EURC",
924
+ "CADC",
925
+ "CADT",
926
+ "XLM",
927
+ "UNI",
928
+ "BCH",
929
+ "LTC",
930
+ "AAVE",
931
+ "LINK",
932
+ "MATIC",
933
+ "PTS"
934
+ ];
935
+ var ISOCurrencyCodes = [
936
+ // Fiat currencies
937
+ "AED",
938
+ "AFN",
939
+ "ALL",
940
+ "AMD",
941
+ "ANG",
942
+ "AOA",
943
+ "ARS",
944
+ "AUD",
945
+ "AWG",
946
+ "AZN",
947
+ "BAM",
948
+ "BBD",
949
+ "BDT",
950
+ "BGN",
951
+ "BHD",
952
+ "BIF",
953
+ "BMD",
954
+ "BND",
955
+ "BOB",
956
+ "BRL",
957
+ "BSD",
958
+ "BTN",
959
+ "BWP",
960
+ "BYR",
961
+ "BZD",
962
+ "CAD",
963
+ "CDF",
964
+ "CHF",
965
+ "CLP",
966
+ "CNY",
967
+ "COP",
968
+ "CRC",
969
+ "CUC",
970
+ "CUP",
971
+ "CVE",
972
+ "CZK",
973
+ "DJF",
974
+ "DKK",
975
+ "DOP",
976
+ "DZD",
977
+ "EGP",
978
+ "ERN",
979
+ "ETB",
980
+ "EUR",
981
+ "FJD",
982
+ "FKP",
983
+ "GBP",
984
+ "GEL",
985
+ "GGP",
986
+ "GHS",
987
+ "GIP",
988
+ "GMD",
989
+ "GNF",
990
+ "GTQ",
991
+ "GYD",
992
+ "HKD",
993
+ "HNL",
994
+ "HRK",
995
+ "HTG",
996
+ "HUF",
997
+ "IDR",
998
+ "ILS",
999
+ "IMP",
1000
+ "INR",
1001
+ "IQD",
1002
+ "IRR",
1003
+ "ISK",
1004
+ "JMD",
1005
+ "JOD",
1006
+ "JPY",
1007
+ "KES",
1008
+ "KGS",
1009
+ "KHR",
1010
+ "KMF",
1011
+ "KPW",
1012
+ "KRW",
1013
+ "KWD",
1014
+ "KYD",
1015
+ "KZT",
1016
+ "LAK",
1017
+ "LBP",
1018
+ "LKR",
1019
+ "LRD",
1020
+ "LSL",
1021
+ "LYD",
1022
+ "MAD",
1023
+ "MDL",
1024
+ "MGA",
1025
+ "MKD",
1026
+ "MMK",
1027
+ "MNT",
1028
+ "MOP",
1029
+ "MUR",
1030
+ "MVR",
1031
+ "MWK",
1032
+ "MXN",
1033
+ "MYR",
1034
+ "MZN",
1035
+ "NAD",
1036
+ "NGN",
1037
+ "NIO",
1038
+ "NOK",
1039
+ "NPR",
1040
+ "NZD",
1041
+ "OMR",
1042
+ "PAB",
1043
+ "PEN",
1044
+ "PGK",
1045
+ "PHP",
1046
+ "PKR",
1047
+ "PLN",
1048
+ "PYG",
1049
+ "QAR",
1050
+ "RON",
1051
+ "RSD",
1052
+ "RUB",
1053
+ "RWF",
1054
+ "SAR",
1055
+ "SBD",
1056
+ "SCR",
1057
+ "SDG",
1058
+ "SEK",
1059
+ "SGD",
1060
+ "SHP",
1061
+ "SLE",
1062
+ "SLL",
1063
+ "SOS",
1064
+ "SPL",
1065
+ "SRD",
1066
+ "SVC",
1067
+ "SYP",
1068
+ "STN",
1069
+ "SZL",
1070
+ "THB",
1071
+ "TJS",
1072
+ "TMT",
1073
+ "TND",
1074
+ "TOP",
1075
+ "TRY",
1076
+ "TTD",
1077
+ "TVD",
1078
+ "TWD",
1079
+ "TZS",
1080
+ "UAH",
1081
+ "UGX",
1082
+ "USD",
1083
+ "UYU",
1084
+ "UZS",
1085
+ "VEF",
1086
+ "VND",
1087
+ "VUV",
1088
+ "WST",
1089
+ "XAF",
1090
+ "XCD",
1091
+ "XOF",
1092
+ "XPF",
1093
+ "YER",
1094
+ "ZAR",
1095
+ "ZMW"
1096
+ ];
1097
+ var currencyCodes = [
1098
+ ...nonISOCurrencyCodes,
1099
+ ...ISOCurrencyCodes,
1100
+ "LOGICAL",
1101
+ "CUSTOM"
1102
+ ];
1103
+ var accountCurrencyCodes = [...currencyCodes, "MULTI"];
1104
+ var currencyModes = ["single", "multi"];
1105
+ var CurrencyModeSchema = z.enum(currencyModes);
1106
+ var CurrencyCodeSchema = z.enum(currencyCodes);
1107
+ var AccountCurrencyCodeSchema = z.enum(accountCurrencyCodes);
1108
+ var CurrencyMatchInputSchema = z.object({
1109
+ customCurrencyId: z.optional(z.string()),
1110
+ code: CurrencyCodeSchema
1111
+ });
1112
+
1113
+ // ../../libs/types/principals.ts
1114
+ init_cjs_shims();
1115
+ var PrincipalTypeEnum = z.enum([
1116
+ "human",
1117
+ "service",
1118
+ "customer_api_client",
1119
+ "mcp_client"
1120
+ ]);
1121
+ var PrincipalTypeSchema = PrincipalTypeEnum.brand();
1122
+ var PrincipalType = {
1123
+ human: PrincipalTypeSchema.parse(PrincipalTypeEnum.enum.human),
1124
+ service: PrincipalTypeSchema.parse(PrincipalTypeEnum.enum.service),
1125
+ customer_api_client: PrincipalTypeSchema.parse(
1126
+ PrincipalTypeEnum.enum.customer_api_client
1127
+ ),
1128
+ mcp_client: PrincipalTypeSchema.parse(PrincipalTypeEnum.enum.mcp_client)
1129
+ };
1130
+ var principalTypes = PrincipalTypeEnum.options;
1131
+
1132
+ // ../../libs/types/idp.ts
1133
+ init_cjs_shims();
1134
+ var Idp = {
1135
+ auth0: "auth0",
1136
+ cognito: "cognito"
1137
+ };
1138
+ var idps = Object.values(Idp);
1139
+
1140
+ // ../../libs/types/time.ts
1141
+ init_cjs_shims();
1142
+ var quarterMap = {
1143
+ Q1: ["01", "02", "03"],
1144
+ Q2: ["04", "05", "06"],
1145
+ Q3: ["07", "08", "09"],
1146
+ Q4: ["10", "11", "12"]
1147
+ };
1148
+ var quarters = Object.keys(quarterMap);
1149
+ var months = [
1150
+ "01",
1151
+ "02",
1152
+ "03",
1153
+ "04",
1154
+ "05",
1155
+ "06",
1156
+ "07",
1157
+ "08",
1158
+ "09",
1159
+ "10",
1160
+ "11",
1161
+ "12"
1162
+ ];
1163
+ var MonthSchema = z.enum(months);
1164
+ var YearSchema = z.string().regex(/^\d{4}$/, 'Expected a 4-digit year, e.g. "2026"');
1165
+ var PeriodFilterSchema = z.discriminatedUnion("type", [
1166
+ z.object({ type: z.literal("year"), year: YearSchema }).strict(),
1167
+ z.object({ type: z.literal("month"), year: YearSchema, month: MonthSchema }).strict()
1168
+ ]);
1169
+
1170
+ // ../../libs/error-utils/assert.ts
1171
+ function assertError(predicate, CustomError, options) {
1172
+ if (CustomError === void 0) {
1173
+ throw new InternalError("you must pass in CustomError to assert");
1174
+ }
1175
+ try {
1176
+ assert(!!predicate);
1177
+ } catch (cause) {
1178
+ const opts = typeof options === "function" ? options() : options;
1179
+ throw new CustomError(
1180
+ {
1181
+ ...opts,
1182
+ cause
1183
+ },
1184
+ opts.message
1185
+ );
1186
+ }
1187
+ }
1188
+ var assert_default = assertError;
1189
+ function assertIsError(value, options = {}) {
1190
+ if (!(value instanceof Error)) {
1191
+ throw new InternalError({
1192
+ ...options,
1193
+ info: {
1194
+ ...options.info,
1195
+ error: value
1196
+ },
1197
+ message: "value is not an Error"
1198
+ });
1199
+ }
1200
+ }
1201
+
1202
+ // ../../libs/error-utils/codes.ts
1203
+ init_cjs_shims();
1204
+ var codes = {
1205
+ dark_reads: {
1206
+ mismatch: "dark_reads_mismatch",
1207
+ mismatch_count: "dark_reads_mismatch_count",
1208
+ gsi_recent_mismatch: "dark_reads_gsi_recent_mismatch"
1209
+ },
1210
+ request: {
1211
+ incompatible_filters: `incompatible_filters`,
1212
+ no_update_provided: `no_update_provided`,
1213
+ no_txs_provided: `no_txs_provided`,
1214
+ too_many_txs: `too_many_txs`,
1215
+ concurrent_request_conflict: `concurrent_request_conflict`,
1216
+ too_many_items_in_list_filter: `too_many_items_in_list_filter`,
1217
+ invalid_input_provided: `invalid_input_provided`,
1218
+ amount_must_be_integer: `amount_must_be_integer`,
1219
+ period_filter_day_not_supported: `period_filter_day_not_supported`,
1220
+ unsupported_period_filter: `unsupported_period_filter`,
1221
+ bad_cursor: "bad_cursor",
1222
+ invalid_page_size: "request_invalid_page_size"
1223
+ },
1224
+ balances: {
1225
+ invalid_duration: `invalid_duration`,
1226
+ invalid_time_range: `invalid_time_range`,
1227
+ unsupported_period_type: `unsupported_period_type`,
1228
+ currency_mismatch: `currency_mismatch`,
1229
+ multi_currency_account_missing_currency: `multi_currency_account_missing_currency`,
1230
+ granularity_not_supported: `granularity_not_supported`,
1231
+ failed_to_get_balance_docs: `failed_to_get_balance_docs`,
1232
+ historical_balances_disabled: `historical_balances_disabled`
1233
+ },
1234
+ ik: {
1235
+ request_body_mismatch: "ik_request_body_mismatch",
1236
+ concurrent_reverse_ledger_entry_request: "ik_concurrent_reverse_ledger_entry_request",
1237
+ repost_not_enabled: "ik_repost_not_enabled",
1238
+ duplicate_ik_in_batch: "ik_duplicate_ik_in_batch",
1239
+ reserved_prefix: "ik_reserved_prefix",
1240
+ too_long: "ik_too_long"
1241
+ },
1242
+ ledger: {
1243
+ not_found: "ledger_not_found",
1244
+ not_provided: "ledger_not_provided",
1245
+ recently_deleted: "ledger_recently_deleted",
1246
+ migration_in_progress: "ledger_migration_in_progress",
1247
+ version_conflict: "ledger_version_conflict",
1248
+ delete_failed: "ledger_delete_failed",
1249
+ delete_in_production: "ledger_delete_in_production",
1250
+ missing_modified_timestamp: "ledger_missing_modified_timestamp",
1251
+ invalid_name: "ledger_invalid_name",
1252
+ name_too_long: "ledger_name_too_long"
1253
+ },
1254
+ ledger_account: {
1255
+ not_found: "ledger_account_not_found",
1256
+ not_templated: "ledger_account_not_templated",
1257
+ invalid_path: "ledger_account_invalid_path",
1258
+ incorrect_ledger: "ledger_account_incorrect_ledger",
1259
+ disabled_status: `ledger_account_disabled`,
1260
+ archived_status: `ledger_account_archived`,
1261
+ multiple_categories: "ledger_account_multiple_categories"
1262
+ },
1263
+ payment: {
1264
+ too_many_attempts: "payment_too_many_attempts",
1265
+ already_accepted: "payment_already_accepted",
1266
+ no_attempt_to_retry: "payment_no_attempt_to_retry",
1267
+ attempt_in_progress: "payment_attempt_in_progress",
1268
+ attempt_changed: "payment_attempt_changed",
1269
+ method_required: "payment_method_required",
1270
+ account_not_verified: "payment_account_not_verified",
1271
+ amount_below_minimum: "payment_amount_below_minimum",
1272
+ amount_above_maximum: "payment_amount_above_maximum",
1273
+ amount_too_large: "payment_amount_too_large",
1274
+ schema_key_not_found: "payment_schema_key_not_found",
1275
+ type_not_found: "payment_type_not_found",
1276
+ missing_parameters: "payment_missing_parameters",
1277
+ unknown_parameters: "payment_unknown_parameters",
1278
+ reserved_parameters: "payment_reserved_parameters",
1279
+ invalid_request: "payment_invalid_request",
1280
+ not_refundable: "payment_not_refundable",
1281
+ refund_amount_too_large: "payment_refund_amount_too_large"
1282
+ },
1283
+ payment_method: {
1284
+ invalid_id: "payment_method_invalid_id",
1285
+ not_found: "payment_method_not_found",
1286
+ expired: "payment_method_expired"
1287
+ },
1288
+ payment_method_setup: {
1289
+ invalid_id: "payment_method_setup_invalid_id",
1290
+ not_found: "payment_method_setup_not_found",
1291
+ invalid_request: "payment_method_setup_invalid_request",
1292
+ confirmation_rejected: "payment_method_setup_confirmation_rejected"
1293
+ },
1294
+ payment_account: {
1295
+ not_provisioned: "payment_account_not_provisioned",
1296
+ direct_posting_disallowed: `payment_account_direct_posting_disallowed`,
1297
+ only_with_schema: "payment_account_only_with_schema",
1298
+ not_jit_allowed: "payment_account_not_jit_allowed",
1299
+ not_found: "payment_account_not_found"
1300
+ },
1301
+ payment_entry: {
1302
+ cannot_reverse: "payment_entry_cannot_reverse",
1303
+ cannot_migrate: "payment_entry_cannot_migrate",
1304
+ cannot_update: "payment_entry_cannot_update"
1305
+ },
1306
+ ledger_entry: {
1307
+ invalid_id_provided: `ledger_entry_invalid_id_provided`,
1308
+ not_found: `ledger_entry_not_found`,
1309
+ too_many_lines: `ledger_entry_too_many_lines`,
1310
+ too_many_batch_lines: `ledger_entry_too_many_batch_lines`,
1311
+ not_provided: `ledger_entry_not_provided`,
1312
+ schema_key_not_found: `ledger_entry_schema_key_not_found`,
1313
+ update_version_mismatch: `ledger_entry_update_version_mismatch`,
1314
+ already_reversed: `ledger_entry_already_reversed`,
1315
+ reversal_linked_account_not_supported: `ledger_entry_reversal_linked_account_not_supported`,
1316
+ invalid_entry_version: `ledger_entry_invalid_entry_version`,
1317
+ recently_reversed: `ledger_entry_recently_reversed`,
1318
+ conflicting_tag_update: `ledger_entry_conflicting_tag_update`,
1319
+ tags_not_provided: `ledger_entry_tags_not_provided`,
1320
+ groups_not_provided: `ledger_entry_groups_not_provided`,
1321
+ migration_not_allowed: `ledger_entry_migration_not_allowed`,
1322
+ entry_type_disabled: `ledger_entry_entry_type_disabled`,
1323
+ entry_cannot_have_multiple_pre_or_postconditions_on_same_account: `ledger_entry_entry_cannot_have_multiple_pre_or_postconditions_on_same_account`,
1324
+ no_lines: `ledger_entry_no_lines`,
1325
+ too_many_transaction_items: `ledger_entry_too_many_transaction_items`,
1326
+ duplicate_tx_reconciliation_in_batch: `ledger_entry_duplicate_tx_reconciliation_in_batch`,
1327
+ reverse_and_reconcile_in_batch: `ledger_entry_reverse_and_reconcile_in_batch`,
1328
+ batch_aborted_by_peer_condition: `ledger_entry_batch_aborted_by_peer_condition`,
1329
+ batch_rolled_back_by_peer: `ledger_entry_batch_rolled_back_by_peer`,
1330
+ unsatisfiable_batch_condition: `ledger_entry_unsatisfiable_batch_condition`,
1331
+ batch_operation_failed: `ledger_entry_batch_operation_failed`
1332
+ },
1333
+ ledger_entry_history: {
1334
+ no_history_for_ik: `no_ledger_entry_history_for_ik`
1335
+ },
1336
+ ledger_line: {
1337
+ not_found: `ledger_line_not_found`,
1338
+ invalid_line_key: `ledger_line_invalid_line_key`,
1339
+ not_provided: `ledger_line_not_provided`,
1340
+ tags_not_provided: `ledger_line_tags_not_provided`,
1341
+ conflicting_tag_update: `ledger_line_conflicting_tag_update`,
1342
+ duplicate_line_update: `ledger_line_duplicate_line_update`
1343
+ },
1344
+ schema: {
1345
+ not_found: "schema_not_found",
1346
+ entry_type_not_found: "schema_entry_type_not_found",
1347
+ max_size_exceeded: "schema_max_size_exceeded",
1348
+ payments_not_enabled: "payments_not_enabled",
1349
+ refunds_not_enabled: "refunds_not_enabled",
1350
+ production_schema_limit: "production_schema_limit",
1351
+ production_payment_ledger_limit: "production_payment_ledger_limit"
1352
+ },
1353
+ schema_ledger: {
1354
+ not_found: "schema_ledger_not_found"
1355
+ },
1356
+ external_account: {
1357
+ not_found: `external_account_not_found`
1358
+ },
1359
+ invites: {
1360
+ invalid_invite: `invalid_invite`,
1361
+ expired: `invite_expired`,
1362
+ delete_used_invite: `delete_used_invite`,
1363
+ no_invites: `no_invites`,
1364
+ too_many_invites: `too_many_invites`,
1365
+ inviting_existing_member: `inviting_existing_member`
1366
+ },
1367
+ link: {
1368
+ not_found: `link_not_found`,
1369
+ unit_not_supported: `link_unit_not_supported`
1370
+ },
1371
+ tx: {
1372
+ tx_max_reconciled_entries: `tx_max_reconciled_entries`,
1373
+ missing_currency: `tx_missing_currency`,
1374
+ missing_account: `tx_missing_account`,
1375
+ invalid_posted_value: `tx_invalid_posted_value`,
1376
+ external_id_too_long: `tx_external_id_too_long`,
1377
+ description_empty: `tx_description_empty`,
1378
+ description_too_long: `tx_description_too_long`,
1379
+ reconciliation_disallowed: `tx_reconciliation_disallowed`,
1380
+ has_reconciled_ledger_entries: `tx_has_reconciled_ledger_entries`,
1381
+ not_found: `tx_not_found`,
1382
+ already_reconciled: `tx_already_reconciled`
1383
+ },
1384
+ sync_custom_txs: {
1385
+ received_duplicate_tx_external_ids: `received_duplicate_tx_external_ids`
1386
+ },
1387
+ add_ledger_entry: {
1388
+ linked_accounts_disallowed: `linked_accounts_disallowed`
1389
+ },
1390
+ migrate_ledger_entry: {
1391
+ ledger_mismatch: `migrate_ledger_entry_ledger_mismatch`
1392
+ },
1393
+ reconcile_tx: {
1394
+ invalid_posted_timestamp: `invalid_posted_timestamp`,
1395
+ no_tx_lines_provided: `no_tx_lines_provided`,
1396
+ too_many_tx_lines_provided: `too_many_tx_lines_provided`,
1397
+ invalid_ledger_account: `invalid_ledger_account`
1398
+ },
1399
+ billing: {
1400
+ invoice_service_unavailable: "invoice_service_unavailable"
1401
+ },
1402
+ data_export: {
1403
+ connection_failed: "data_export_connection_failed"
1404
+ },
1405
+ custom_currency: {
1406
+ name_empty: "custom_currency_name_empty",
1407
+ id_empty: "custom_currency_id_empty",
1408
+ code_empty: "custom_currency_code_empty",
1409
+ id_too_long: "custom_currency_id_too_long",
1410
+ code_too_long: "custom_currency_code_too_long",
1411
+ precision_must_be_non_negative: "custom_currency_precision_must_be_non_negative",
1412
+ name_too_long: "custom_currency_name_too_long"
1413
+ },
1414
+ payments_onboarding: {
1415
+ business_cdd_not_found: "business_cdd_not_found",
1416
+ business_entity_not_found: "payments_onboarding_business_entity_not_found",
1417
+ bt_token_update_failed: "payments_onboarding_bt_token_update_failed",
1418
+ entity_missing_pii_token: "payments_onboarding_entity_missing_pii_token",
1419
+ entity_not_found: "payments_onboarding_entity_not_found",
1420
+ entity_not_submittable: "payments_onboarding_entity_not_submittable",
1421
+ entity_type_mismatch: "payments_onboarding_entity_type_mismatch",
1422
+ entity_type_not_supported: "payments_onboarding_entity_type_not_supported",
1423
+ invalid_prong: "payments_onboarding_invalid_prong",
1424
+ missing_api_keys: "payments_onboarding_missing_api_keys",
1425
+ missing_oscilar_endpoint_url: "payments_onboarding_missing_oscilar_endpoint_url",
1426
+ oscilar_submission_failed: "payments_onboarding_oscilar_submission_failed"
1427
+ },
1428
+ authorizer: {
1429
+ workspace_access_not_found: "authorizer_workspace_access_not_found",
1430
+ workspace_access_ambiguous: "authorizer_workspace_access_ambiguous"
1431
+ },
1432
+ workspace: {
1433
+ workspace_not_found: "workspace_not_found",
1434
+ already_exists: "workspace_already_exists",
1435
+ free_tier_entry_limit: "workspace_free_tier_entry_limit",
1436
+ type_not_allowed: "workspace_type_not_allowed",
1437
+ parent_required: "workspace_parent_required",
1438
+ parent_not_found: "workspace_parent_not_found",
1439
+ parent_access_needed: "workspace_parent_access_needed",
1440
+ parent_not_paid: "workspace_parent_not_paid",
1441
+ parent_stripe_customer_missing: "workspace_parent_stripe_customer_missing"
1442
+ },
1443
+ workspace_access: {
1444
+ already_exists: "workspace_access_already_exists"
1445
+ },
1446
+ workspace_member: {
1447
+ cap_limit_exceeded: "cap_limit_exceeded"
1448
+ },
1449
+ api_client: {
1450
+ invalid_role: "api_client_invalid_role"
1451
+ },
1452
+ user: {
1453
+ user_not_found: "user_not_found",
1454
+ user_not_belong_to_workspace: "user_not_belong_to_workspace",
1455
+ user_cannot_change_own_role: "user_cannot_change_own_role",
1456
+ role_not_assignable: "role_not_assignable",
1457
+ invalid_email: "user_invalid_email"
1458
+ },
1459
+ conditional_request_failed: "conditional_request_failed",
1460
+ parameterization_failed: "parameterization_failed",
1461
+ schema_not_found: "schema_not_found",
1462
+ not_authorized: "not_authorized",
1463
+ role_exceeds_granter: "role_exceeds_granter",
1464
+ throttling_error: "throttling_error"
1465
+ };
1466
+
1467
+ export {
1468
+ InternalError,
1469
+ BadRequestError,
1470
+ LedgerAccountTypeSchema,
1471
+ currencyCodes,
1472
+ CurrencyModeSchema,
1473
+ CurrencyMatchInputSchema,
1474
+ assert_default,
1475
+ assertIsError,
1476
+ codes
1477
+ };