@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.
- package/README.md +10 -14
- package/dist/{chunk-ND7QZR7R.js → chunk-5GP3GUTJ.js} +2 -2
- package/dist/{chunk-YJGBEX5B.js → chunk-5J7GO2LD.js} +2 -2
- package/dist/{chunk-WWLP4HPC.js → chunk-5MNVNPOL.js} +2 -2
- package/dist/{chunk-AO62X3BO.js → chunk-5OKT5EMG.js} +5 -3
- package/dist/{chunk-ZA2L64JN.js → chunk-67DUFD6P.js} +1 -1
- package/dist/{chunk-PIQ6WUMK.js → chunk-AGSUHPTK.js} +4 -4
- package/dist/{chunk-E5P6XCQL.js → chunk-B23ACFAK.js} +2 -2
- package/dist/{chunk-5SZAIV6H.js → chunk-DF3U6ZLT.js} +1 -1
- package/dist/{chunk-OXHLKGQ5.js → chunk-EA4PQ3Q6.js} +15 -17
- package/dist/{chunk-TXZYFCBO.js → chunk-FGNF2UZU.js} +1 -1
- package/dist/{chunk-3FYCTUQG.js → chunk-FJHK32F7.js} +2 -2
- package/dist/{chunk-CSTRC57Q.js → chunk-GMESN77F.js} +4 -4
- package/dist/{chunk-2ZOSYPMG.js → chunk-GP4YLGE7.js} +1 -1
- package/dist/{chunk-MSTL4SGM.js → chunk-GSRBM4QF.js} +2 -2
- package/dist/{chunk-RXZ4S2ZQ.js → chunk-H55MKRZS.js} +25 -25
- package/dist/{chunk-5ZNQLL3D.js → chunk-HOGDV2YN.js} +3 -3
- package/dist/{chunk-7UQY3FIG.js → chunk-IDAIGTVO.js} +1 -1
- package/dist/{chunk-KEPMDY7V.js → chunk-J5VE25EA.js} +1 -1
- package/dist/{chunk-JMBVKYGC.js → chunk-JKZUZUAV.js} +1 -1
- package/dist/{chunk-Z6NR5CSS.js → chunk-JLXUB5H5.js} +18 -19
- package/dist/chunk-K2C7FOE6.js +1477 -0
- package/dist/{chunk-I55F4IDB.js → chunk-LR3ZGFUV.js} +2 -2
- package/dist/{chunk-4OP66KOV.js → chunk-M2C3IDIY.js} +1 -1
- package/dist/{chunk-HUH6X4FR.js → chunk-MM46JBHF.js} +3 -3
- package/dist/{chunk-DQKSSCGB.js → chunk-MODGIOPG.js} +38 -11
- package/dist/{chunk-N2IUAYUD.js → chunk-MVAJNY4X.js} +2 -2
- package/dist/{chunk-WSCCYKTK.js → chunk-N66WU3TN.js} +2 -2
- package/dist/{chunk-W7NFIOVK.js → chunk-OA3SUDZN.js} +2 -2
- package/dist/{chunk-DRY3QBRK.js → chunk-OCY2MVO7.js} +1 -1
- package/dist/{chunk-JYXPC5JP.js → chunk-OKMRVQTQ.js} +5 -5
- package/dist/{chunk-XZ6O5DO6.js → chunk-QFH4ECMN.js} +7 -5
- package/dist/{chunk-AQYXSJII.js → chunk-R6VUCOQM.js} +2 -2
- package/dist/{chunk-XL3PNDE7.js → chunk-RGB7H5GE.js} +1 -1
- package/dist/{chunk-TK6OCIYG.js → chunk-RPKBDFB4.js} +2 -2
- package/dist/{chunk-NL2ECIET.js → chunk-RWQZFXSF.js} +2 -1470
- package/dist/{chunk-M3W6IZD4.js → chunk-SPIU7ZUZ.js} +2 -2
- package/dist/chunk-T3EXEEYL.js +104 -0
- package/dist/{chunk-45ANXGMD.js → chunk-VCN774BB.js} +1 -1
- package/dist/{chunk-ELTMQLAC.js → chunk-VPOARVKJ.js} +10 -5
- package/dist/{chunk-CXCEORCL.js → chunk-WDUCGD5M.js} +1 -1
- package/dist/{chunk-AB4ADA3B.js → chunk-WKMNNG4S.js} +2 -2
- package/dist/{chunk-AIYVYJL6.js → chunk-XWCVZGAX.js} +1 -1
- package/dist/commands/add-ledger-entry.js +6 -6
- package/dist/commands/api-client/create.js +8 -6
- package/dist/commands/create-custom-link.js +6 -6
- package/dist/commands/create-ledger.js +6 -6
- package/dist/commands/delete-custom-txs.js +6 -6
- package/dist/commands/delete-ledger.js +6 -6
- package/dist/commands/delete-schema.js +6 -6
- package/dist/commands/gen-graphql.js +11 -10
- package/dist/commands/get-schema.js +7 -7
- package/dist/commands/init.js +5 -5
- package/dist/commands/login.js +9 -7
- package/dist/commands/migrate-ledger-entry.js +6 -6
- package/dist/commands/query/ledgerAccounts.js +6 -6
- package/dist/commands/query/ledgers.js +6 -6
- package/dist/commands/query/schema.js +6 -6
- package/dist/commands/query/schemas.js +6 -6
- package/dist/commands/reverse-ledger-entry.js +6 -6
- package/dist/commands/start.js +5 -5
- package/dist/commands/store-schema.js +6 -6
- package/dist/commands/token.js +6 -6
- package/dist/commands/update-ledger-account.js +6 -6
- package/dist/commands/update.js +6 -6
- package/dist/commands/verify-schema.js +12 -11
- package/dist/commands/version.js +5 -5
- package/dist/commands/workspace.js +6 -6
- package/dist/commands.js +42 -40
- package/dist/graphql.js +4 -3
- package/dist/index.js +42 -40
- package/dist/lib/auth.js +2 -2
- package/dist/lib/authenticatedCommand.js +5 -5
- package/dist/lib/baseCommand.js +4 -4
- package/dist/lib/browserAuth.js +3 -1
- package/dist/lib/browserLogin.js +13 -0
- package/dist/lib/constants.js +5 -5
- package/dist/utils/formatValidationErrors.js +3 -2
- package/dist/utils/schemaBackCompat.js +7 -6
- package/dist/utils/schemaValidation.js +6 -5
- package/dist/version.js +2 -2
- package/oclif.manifest.json +1 -17
- package/package.json +1 -1
|
@@ -1,887 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
__commonJS,
|
|
3
|
-
__require,
|
|
4
|
-
__toESM,
|
|
5
2
|
init_cjs_shims
|
|
6
3
|
} from "./chunk-7GH3YGSC.js";
|
|
7
4
|
|
|
8
|
-
// ../../
|
|
9
|
-
var require_assert = __commonJS({
|
|
10
|
-
"../../node_modules/assert-plus/assert.js"(exports, module) {
|
|
11
|
-
init_cjs_shims();
|
|
12
|
-
var assert2 = __require("assert");
|
|
13
|
-
var Stream = __require("stream").Stream;
|
|
14
|
-
var util2 = __require("util");
|
|
15
|
-
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}$/;
|
|
16
|
-
function _capitalize(str) {
|
|
17
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
18
|
-
}
|
|
19
|
-
function _toss(name, expected, oper, arg, actual) {
|
|
20
|
-
throw new assert2.AssertionError({
|
|
21
|
-
message: util2.format("%s (%s) is required", name, expected),
|
|
22
|
-
actual: actual === void 0 ? typeof arg : actual(arg),
|
|
23
|
-
expected,
|
|
24
|
-
operator: oper || "===",
|
|
25
|
-
stackStartFunction: _toss.caller
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
function _getClass(arg) {
|
|
29
|
-
return Object.prototype.toString.call(arg).slice(8, -1);
|
|
30
|
-
}
|
|
31
|
-
function noop() {
|
|
32
|
-
}
|
|
33
|
-
var types = {
|
|
34
|
-
bool: {
|
|
35
|
-
check: function(arg) {
|
|
36
|
-
return typeof arg === "boolean";
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
func: {
|
|
40
|
-
check: function(arg) {
|
|
41
|
-
return typeof arg === "function";
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
string: {
|
|
45
|
-
check: function(arg) {
|
|
46
|
-
return typeof arg === "string";
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
object: {
|
|
50
|
-
check: function(arg) {
|
|
51
|
-
return typeof arg === "object" && arg !== null;
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
number: {
|
|
55
|
-
check: function(arg) {
|
|
56
|
-
return typeof arg === "number" && !isNaN(arg);
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
finite: {
|
|
60
|
-
check: function(arg) {
|
|
61
|
-
return typeof arg === "number" && !isNaN(arg) && isFinite(arg);
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
buffer: {
|
|
65
|
-
check: function(arg) {
|
|
66
|
-
return Buffer.isBuffer(arg);
|
|
67
|
-
},
|
|
68
|
-
operator: "Buffer.isBuffer"
|
|
69
|
-
},
|
|
70
|
-
array: {
|
|
71
|
-
check: function(arg) {
|
|
72
|
-
return Array.isArray(arg);
|
|
73
|
-
},
|
|
74
|
-
operator: "Array.isArray"
|
|
75
|
-
},
|
|
76
|
-
stream: {
|
|
77
|
-
check: function(arg) {
|
|
78
|
-
return arg instanceof Stream;
|
|
79
|
-
},
|
|
80
|
-
operator: "instanceof",
|
|
81
|
-
actual: _getClass
|
|
82
|
-
},
|
|
83
|
-
date: {
|
|
84
|
-
check: function(arg) {
|
|
85
|
-
return arg instanceof Date;
|
|
86
|
-
},
|
|
87
|
-
operator: "instanceof",
|
|
88
|
-
actual: _getClass
|
|
89
|
-
},
|
|
90
|
-
regexp: {
|
|
91
|
-
check: function(arg) {
|
|
92
|
-
return arg instanceof RegExp;
|
|
93
|
-
},
|
|
94
|
-
operator: "instanceof",
|
|
95
|
-
actual: _getClass
|
|
96
|
-
},
|
|
97
|
-
uuid: {
|
|
98
|
-
check: function(arg) {
|
|
99
|
-
return typeof arg === "string" && UUID_REGEXP.test(arg);
|
|
100
|
-
},
|
|
101
|
-
operator: "isUUID"
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
function _setExports(ndebug) {
|
|
105
|
-
var keys = Object.keys(types);
|
|
106
|
-
var out;
|
|
107
|
-
if (process.env.NODE_NDEBUG) {
|
|
108
|
-
out = noop;
|
|
109
|
-
} else {
|
|
110
|
-
out = function(arg, msg) {
|
|
111
|
-
if (!arg) {
|
|
112
|
-
_toss(msg, "true", arg);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
keys.forEach(function(k) {
|
|
117
|
-
if (ndebug) {
|
|
118
|
-
out[k] = noop;
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
var type = types[k];
|
|
122
|
-
out[k] = function(arg, msg) {
|
|
123
|
-
if (!type.check(arg)) {
|
|
124
|
-
_toss(msg, k, type.operator, arg, type.actual);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
});
|
|
128
|
-
keys.forEach(function(k) {
|
|
129
|
-
var name = "optional" + _capitalize(k);
|
|
130
|
-
if (ndebug) {
|
|
131
|
-
out[name] = noop;
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
var type = types[k];
|
|
135
|
-
out[name] = function(arg, msg) {
|
|
136
|
-
if (arg === void 0 || arg === null) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
if (!type.check(arg)) {
|
|
140
|
-
_toss(msg, k, type.operator, arg, type.actual);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
});
|
|
144
|
-
keys.forEach(function(k) {
|
|
145
|
-
var name = "arrayOf" + _capitalize(k);
|
|
146
|
-
if (ndebug) {
|
|
147
|
-
out[name] = noop;
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
var type = types[k];
|
|
151
|
-
var expected = "[" + k + "]";
|
|
152
|
-
out[name] = function(arg, msg) {
|
|
153
|
-
if (!Array.isArray(arg)) {
|
|
154
|
-
_toss(msg, expected, type.operator, arg, type.actual);
|
|
155
|
-
}
|
|
156
|
-
var i;
|
|
157
|
-
for (i = 0; i < arg.length; i++) {
|
|
158
|
-
if (!type.check(arg[i])) {
|
|
159
|
-
_toss(msg, expected, type.operator, arg, type.actual);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
});
|
|
164
|
-
keys.forEach(function(k) {
|
|
165
|
-
var name = "optionalArrayOf" + _capitalize(k);
|
|
166
|
-
if (ndebug) {
|
|
167
|
-
out[name] = noop;
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
var type = types[k];
|
|
171
|
-
var expected = "[" + k + "]";
|
|
172
|
-
out[name] = function(arg, msg) {
|
|
173
|
-
if (arg === void 0 || arg === null) {
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
if (!Array.isArray(arg)) {
|
|
177
|
-
_toss(msg, expected, type.operator, arg, type.actual);
|
|
178
|
-
}
|
|
179
|
-
var i;
|
|
180
|
-
for (i = 0; i < arg.length; i++) {
|
|
181
|
-
if (!type.check(arg[i])) {
|
|
182
|
-
_toss(msg, expected, type.operator, arg, type.actual);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
});
|
|
187
|
-
Object.keys(assert2).forEach(function(k) {
|
|
188
|
-
if (k === "AssertionError") {
|
|
189
|
-
out[k] = assert2[k];
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
if (ndebug) {
|
|
193
|
-
out[k] = noop;
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
out[k] = assert2[k];
|
|
197
|
-
});
|
|
198
|
-
out._setExports = _setExports;
|
|
199
|
-
return out;
|
|
200
|
-
}
|
|
201
|
-
module.exports = _setExports(process.env.NODE_NDEBUG);
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
// ../../node_modules/extsprintf/lib/extsprintf.js
|
|
206
|
-
var require_extsprintf = __commonJS({
|
|
207
|
-
"../../node_modules/extsprintf/lib/extsprintf.js"(exports) {
|
|
208
|
-
init_cjs_shims();
|
|
209
|
-
var mod_assert = __require("assert");
|
|
210
|
-
var mod_util = __require("util");
|
|
211
|
-
exports.sprintf = jsSprintf;
|
|
212
|
-
exports.printf = jsPrintf;
|
|
213
|
-
exports.fprintf = jsFprintf;
|
|
214
|
-
function jsSprintf(ofmt) {
|
|
215
|
-
var regex = [
|
|
216
|
-
"([^%]*)",
|
|
217
|
-
/* normal text */
|
|
218
|
-
"%",
|
|
219
|
-
/* start of format */
|
|
220
|
-
"(['\\-+ #0]*?)",
|
|
221
|
-
/* flags (optional) */
|
|
222
|
-
"([1-9]\\d*)?",
|
|
223
|
-
/* width (optional) */
|
|
224
|
-
"(\\.([1-9]\\d*))?",
|
|
225
|
-
/* precision (optional) */
|
|
226
|
-
"[lhjztL]*?",
|
|
227
|
-
/* length mods (ignored) */
|
|
228
|
-
"([diouxXfFeEgGaAcCsSp%jr])"
|
|
229
|
-
/* conversion */
|
|
230
|
-
].join("");
|
|
231
|
-
var re = new RegExp(regex);
|
|
232
|
-
var args = Array.prototype.slice.call(arguments, 1);
|
|
233
|
-
var fmt = ofmt;
|
|
234
|
-
var flags, width, precision, conversion;
|
|
235
|
-
var left, pad, sign, arg, match;
|
|
236
|
-
var ret = "";
|
|
237
|
-
var argn = 1;
|
|
238
|
-
var posn = 0;
|
|
239
|
-
var convposn;
|
|
240
|
-
var curconv;
|
|
241
|
-
mod_assert.equal(
|
|
242
|
-
"string",
|
|
243
|
-
typeof fmt,
|
|
244
|
-
"first argument must be a format string"
|
|
245
|
-
);
|
|
246
|
-
while ((match = re.exec(fmt)) !== null) {
|
|
247
|
-
ret += match[1];
|
|
248
|
-
fmt = fmt.substring(match[0].length);
|
|
249
|
-
curconv = match[0].substring(match[1].length);
|
|
250
|
-
convposn = posn + match[1].length + 1;
|
|
251
|
-
posn += match[0].length;
|
|
252
|
-
flags = match[2] || "";
|
|
253
|
-
width = match[3] || 0;
|
|
254
|
-
precision = match[4] || "";
|
|
255
|
-
conversion = match[6];
|
|
256
|
-
left = false;
|
|
257
|
-
sign = false;
|
|
258
|
-
pad = " ";
|
|
259
|
-
if (conversion == "%") {
|
|
260
|
-
ret += "%";
|
|
261
|
-
continue;
|
|
262
|
-
}
|
|
263
|
-
if (args.length === 0) {
|
|
264
|
-
throw jsError(
|
|
265
|
-
ofmt,
|
|
266
|
-
convposn,
|
|
267
|
-
curconv,
|
|
268
|
-
"has no matching argument (too few arguments passed)"
|
|
269
|
-
);
|
|
270
|
-
}
|
|
271
|
-
arg = args.shift();
|
|
272
|
-
argn++;
|
|
273
|
-
if (flags.match(/[\' #]/)) {
|
|
274
|
-
throw jsError(
|
|
275
|
-
ofmt,
|
|
276
|
-
convposn,
|
|
277
|
-
curconv,
|
|
278
|
-
"uses unsupported flags"
|
|
279
|
-
);
|
|
280
|
-
}
|
|
281
|
-
if (precision.length > 0) {
|
|
282
|
-
throw jsError(
|
|
283
|
-
ofmt,
|
|
284
|
-
convposn,
|
|
285
|
-
curconv,
|
|
286
|
-
"uses non-zero precision (not supported)"
|
|
287
|
-
);
|
|
288
|
-
}
|
|
289
|
-
if (flags.match(/-/))
|
|
290
|
-
left = true;
|
|
291
|
-
if (flags.match(/0/))
|
|
292
|
-
pad = "0";
|
|
293
|
-
if (flags.match(/\+/))
|
|
294
|
-
sign = true;
|
|
295
|
-
switch (conversion) {
|
|
296
|
-
case "s":
|
|
297
|
-
if (arg === void 0 || arg === null) {
|
|
298
|
-
throw jsError(
|
|
299
|
-
ofmt,
|
|
300
|
-
convposn,
|
|
301
|
-
curconv,
|
|
302
|
-
"attempted to print undefined or null as a string (argument " + argn + " to sprintf)"
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
ret += doPad(pad, width, left, arg.toString());
|
|
306
|
-
break;
|
|
307
|
-
case "d":
|
|
308
|
-
arg = Math.floor(arg);
|
|
309
|
-
case "f":
|
|
310
|
-
sign = sign && arg > 0 ? "+" : "";
|
|
311
|
-
ret += sign + doPad(
|
|
312
|
-
pad,
|
|
313
|
-
width,
|
|
314
|
-
left,
|
|
315
|
-
arg.toString()
|
|
316
|
-
);
|
|
317
|
-
break;
|
|
318
|
-
case "x":
|
|
319
|
-
ret += doPad(pad, width, left, arg.toString(16));
|
|
320
|
-
break;
|
|
321
|
-
case "j":
|
|
322
|
-
if (width === 0)
|
|
323
|
-
width = 10;
|
|
324
|
-
ret += mod_util.inspect(arg, false, width);
|
|
325
|
-
break;
|
|
326
|
-
case "r":
|
|
327
|
-
ret += dumpException(arg);
|
|
328
|
-
break;
|
|
329
|
-
default:
|
|
330
|
-
throw jsError(
|
|
331
|
-
ofmt,
|
|
332
|
-
convposn,
|
|
333
|
-
curconv,
|
|
334
|
-
"is not supported"
|
|
335
|
-
);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
ret += fmt;
|
|
339
|
-
return ret;
|
|
340
|
-
}
|
|
341
|
-
function jsError(fmtstr, convposn, curconv, reason) {
|
|
342
|
-
mod_assert.equal(typeof fmtstr, "string");
|
|
343
|
-
mod_assert.equal(typeof curconv, "string");
|
|
344
|
-
mod_assert.equal(typeof convposn, "number");
|
|
345
|
-
mod_assert.equal(typeof reason, "string");
|
|
346
|
-
return new Error('format string "' + fmtstr + '": conversion specifier "' + curconv + '" at character ' + convposn + " " + reason);
|
|
347
|
-
}
|
|
348
|
-
function jsPrintf() {
|
|
349
|
-
var args = Array.prototype.slice.call(arguments);
|
|
350
|
-
args.unshift(process.stdout);
|
|
351
|
-
jsFprintf.apply(null, args);
|
|
352
|
-
}
|
|
353
|
-
function jsFprintf(stream) {
|
|
354
|
-
var args = Array.prototype.slice.call(arguments, 1);
|
|
355
|
-
return stream.write(jsSprintf.apply(this, args));
|
|
356
|
-
}
|
|
357
|
-
function doPad(chr, width, left, str) {
|
|
358
|
-
var ret = str;
|
|
359
|
-
while (ret.length < width) {
|
|
360
|
-
if (left)
|
|
361
|
-
ret += chr;
|
|
362
|
-
else
|
|
363
|
-
ret = chr + ret;
|
|
364
|
-
}
|
|
365
|
-
return ret;
|
|
366
|
-
}
|
|
367
|
-
function dumpException(ex) {
|
|
368
|
-
var ret;
|
|
369
|
-
if (!(ex instanceof Error))
|
|
370
|
-
throw new Error(jsSprintf("invalid type for %%r: %j", ex));
|
|
371
|
-
ret = "EXCEPTION: " + ex.constructor.name + ": " + ex.stack;
|
|
372
|
-
if (ex.cause && typeof ex.cause === "function") {
|
|
373
|
-
var cex = ex.cause();
|
|
374
|
-
if (cex) {
|
|
375
|
-
ret += "\nCaused by: " + dumpException(cex);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
return ret;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
|
|
383
|
-
// ../../node_modules/verror/node_modules/core-util-is/lib/util.js
|
|
384
|
-
var require_util = __commonJS({
|
|
385
|
-
"../../node_modules/verror/node_modules/core-util-is/lib/util.js"(exports) {
|
|
386
|
-
init_cjs_shims();
|
|
387
|
-
function isArray(arg) {
|
|
388
|
-
if (Array.isArray) {
|
|
389
|
-
return Array.isArray(arg);
|
|
390
|
-
}
|
|
391
|
-
return objectToString(arg) === "[object Array]";
|
|
392
|
-
}
|
|
393
|
-
exports.isArray = isArray;
|
|
394
|
-
function isBoolean(arg) {
|
|
395
|
-
return typeof arg === "boolean";
|
|
396
|
-
}
|
|
397
|
-
exports.isBoolean = isBoolean;
|
|
398
|
-
function isNull(arg) {
|
|
399
|
-
return arg === null;
|
|
400
|
-
}
|
|
401
|
-
exports.isNull = isNull;
|
|
402
|
-
function isNullOrUndefined(arg) {
|
|
403
|
-
return arg == null;
|
|
404
|
-
}
|
|
405
|
-
exports.isNullOrUndefined = isNullOrUndefined;
|
|
406
|
-
function isNumber(arg) {
|
|
407
|
-
return typeof arg === "number";
|
|
408
|
-
}
|
|
409
|
-
exports.isNumber = isNumber;
|
|
410
|
-
function isString(arg) {
|
|
411
|
-
return typeof arg === "string";
|
|
412
|
-
}
|
|
413
|
-
exports.isString = isString;
|
|
414
|
-
function isSymbol(arg) {
|
|
415
|
-
return typeof arg === "symbol";
|
|
416
|
-
}
|
|
417
|
-
exports.isSymbol = isSymbol;
|
|
418
|
-
function isUndefined(arg) {
|
|
419
|
-
return arg === void 0;
|
|
420
|
-
}
|
|
421
|
-
exports.isUndefined = isUndefined;
|
|
422
|
-
function isRegExp(re) {
|
|
423
|
-
return objectToString(re) === "[object RegExp]";
|
|
424
|
-
}
|
|
425
|
-
exports.isRegExp = isRegExp;
|
|
426
|
-
function isObject(arg) {
|
|
427
|
-
return typeof arg === "object" && arg !== null;
|
|
428
|
-
}
|
|
429
|
-
exports.isObject = isObject;
|
|
430
|
-
function isDate(d) {
|
|
431
|
-
return objectToString(d) === "[object Date]";
|
|
432
|
-
}
|
|
433
|
-
exports.isDate = isDate;
|
|
434
|
-
function isError(e) {
|
|
435
|
-
return objectToString(e) === "[object Error]" || e instanceof Error;
|
|
436
|
-
}
|
|
437
|
-
exports.isError = isError;
|
|
438
|
-
function isFunction(arg) {
|
|
439
|
-
return typeof arg === "function";
|
|
440
|
-
}
|
|
441
|
-
exports.isFunction = isFunction;
|
|
442
|
-
function isPrimitive(arg) {
|
|
443
|
-
return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
|
|
444
|
-
typeof arg === "undefined";
|
|
445
|
-
}
|
|
446
|
-
exports.isPrimitive = isPrimitive;
|
|
447
|
-
exports.isBuffer = Buffer.isBuffer;
|
|
448
|
-
function objectToString(o) {
|
|
449
|
-
return Object.prototype.toString.call(o);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
|
|
454
|
-
// ../../node_modules/verror/lib/verror.js
|
|
455
|
-
var require_verror = __commonJS({
|
|
456
|
-
"../../node_modules/verror/lib/verror.js"(exports, module) {
|
|
457
|
-
init_cjs_shims();
|
|
458
|
-
var mod_assertplus = require_assert();
|
|
459
|
-
var mod_util = __require("util");
|
|
460
|
-
var mod_extsprintf = require_extsprintf();
|
|
461
|
-
var mod_isError = require_util().isError;
|
|
462
|
-
var sprintf = mod_extsprintf.sprintf;
|
|
463
|
-
module.exports = VError;
|
|
464
|
-
VError.VError = VError;
|
|
465
|
-
VError.SError = SError;
|
|
466
|
-
VError.WError = WError;
|
|
467
|
-
VError.MultiError = MultiError;
|
|
468
|
-
function parseConstructorArguments(args) {
|
|
469
|
-
var argv, options, sprintf_args, shortmessage, k;
|
|
470
|
-
mod_assertplus.object(args, "args");
|
|
471
|
-
mod_assertplus.bool(args.strict, "args.strict");
|
|
472
|
-
mod_assertplus.array(args.argv, "args.argv");
|
|
473
|
-
argv = args.argv;
|
|
474
|
-
if (argv.length === 0) {
|
|
475
|
-
options = {};
|
|
476
|
-
sprintf_args = [];
|
|
477
|
-
} else if (mod_isError(argv[0])) {
|
|
478
|
-
options = { "cause": argv[0] };
|
|
479
|
-
sprintf_args = argv.slice(1);
|
|
480
|
-
} else if (typeof argv[0] === "object") {
|
|
481
|
-
options = {};
|
|
482
|
-
for (k in argv[0]) {
|
|
483
|
-
options[k] = argv[0][k];
|
|
484
|
-
}
|
|
485
|
-
sprintf_args = argv.slice(1);
|
|
486
|
-
} else {
|
|
487
|
-
mod_assertplus.string(
|
|
488
|
-
argv[0],
|
|
489
|
-
"first argument to VError, SError, or WError constructor must be a string, object, or Error"
|
|
490
|
-
);
|
|
491
|
-
options = {};
|
|
492
|
-
sprintf_args = argv;
|
|
493
|
-
}
|
|
494
|
-
mod_assertplus.object(options);
|
|
495
|
-
if (!options.strict && !args.strict) {
|
|
496
|
-
sprintf_args = sprintf_args.map(function(a) {
|
|
497
|
-
return a === null ? "null" : a === void 0 ? "undefined" : a;
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
if (sprintf_args.length === 0) {
|
|
501
|
-
shortmessage = "";
|
|
502
|
-
} else {
|
|
503
|
-
shortmessage = sprintf.apply(null, sprintf_args);
|
|
504
|
-
}
|
|
505
|
-
return {
|
|
506
|
-
"options": options,
|
|
507
|
-
"shortmessage": shortmessage
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
function VError() {
|
|
511
|
-
var args, obj, parsed, cause, ctor, message, k;
|
|
512
|
-
args = Array.prototype.slice.call(arguments, 0);
|
|
513
|
-
if (!(this instanceof VError)) {
|
|
514
|
-
obj = Object.create(VError.prototype);
|
|
515
|
-
VError.apply(obj, arguments);
|
|
516
|
-
return obj;
|
|
517
|
-
}
|
|
518
|
-
parsed = parseConstructorArguments({
|
|
519
|
-
"argv": args,
|
|
520
|
-
"strict": false
|
|
521
|
-
});
|
|
522
|
-
if (parsed.options.name) {
|
|
523
|
-
mod_assertplus.string(
|
|
524
|
-
parsed.options.name,
|
|
525
|
-
`error's "name" must be a string`
|
|
526
|
-
);
|
|
527
|
-
this.name = parsed.options.name;
|
|
528
|
-
}
|
|
529
|
-
this.jse_shortmsg = parsed.shortmessage;
|
|
530
|
-
message = parsed.shortmessage;
|
|
531
|
-
cause = parsed.options.cause;
|
|
532
|
-
if (cause) {
|
|
533
|
-
mod_assertplus.ok(mod_isError(cause), "cause is not an Error");
|
|
534
|
-
this.jse_cause = cause;
|
|
535
|
-
if (!parsed.options.skipCauseMessage) {
|
|
536
|
-
message += ": " + cause.message;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
this.jse_info = {};
|
|
540
|
-
if (parsed.options.info) {
|
|
541
|
-
for (k in parsed.options.info) {
|
|
542
|
-
this.jse_info[k] = parsed.options.info[k];
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
this.message = message;
|
|
546
|
-
Error.call(this, message);
|
|
547
|
-
if (Error.captureStackTrace) {
|
|
548
|
-
ctor = parsed.options.constructorOpt || this.constructor;
|
|
549
|
-
Error.captureStackTrace(this, ctor);
|
|
550
|
-
}
|
|
551
|
-
return this;
|
|
552
|
-
}
|
|
553
|
-
mod_util.inherits(VError, Error);
|
|
554
|
-
VError.prototype.name = "VError";
|
|
555
|
-
VError.prototype.toString = function ve_toString() {
|
|
556
|
-
var str = this.hasOwnProperty("name") && this.name || this.constructor.name || this.constructor.prototype.name;
|
|
557
|
-
if (this.message)
|
|
558
|
-
str += ": " + this.message;
|
|
559
|
-
return str;
|
|
560
|
-
};
|
|
561
|
-
VError.prototype.cause = function ve_cause() {
|
|
562
|
-
var cause = VError.cause(this);
|
|
563
|
-
return cause === null ? void 0 : cause;
|
|
564
|
-
};
|
|
565
|
-
VError.cause = function(err) {
|
|
566
|
-
mod_assertplus.ok(mod_isError(err), "err must be an Error");
|
|
567
|
-
return mod_isError(err.jse_cause) ? err.jse_cause : null;
|
|
568
|
-
};
|
|
569
|
-
VError.info = function(err) {
|
|
570
|
-
var rv, cause, k;
|
|
571
|
-
mod_assertplus.ok(mod_isError(err), "err must be an Error");
|
|
572
|
-
cause = VError.cause(err);
|
|
573
|
-
if (cause !== null) {
|
|
574
|
-
rv = VError.info(cause);
|
|
575
|
-
} else {
|
|
576
|
-
rv = {};
|
|
577
|
-
}
|
|
578
|
-
if (typeof err.jse_info == "object" && err.jse_info !== null) {
|
|
579
|
-
for (k in err.jse_info) {
|
|
580
|
-
rv[k] = err.jse_info[k];
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
return rv;
|
|
584
|
-
};
|
|
585
|
-
VError.findCauseByName = function(err, name) {
|
|
586
|
-
var cause;
|
|
587
|
-
mod_assertplus.ok(mod_isError(err), "err must be an Error");
|
|
588
|
-
mod_assertplus.string(name, "name");
|
|
589
|
-
mod_assertplus.ok(name.length > 0, "name cannot be empty");
|
|
590
|
-
for (cause = err; cause !== null; cause = VError.cause(cause)) {
|
|
591
|
-
mod_assertplus.ok(mod_isError(cause));
|
|
592
|
-
if (cause.name == name) {
|
|
593
|
-
return cause;
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
return null;
|
|
597
|
-
};
|
|
598
|
-
VError.hasCauseWithName = function(err, name) {
|
|
599
|
-
return VError.findCauseByName(err, name) !== null;
|
|
600
|
-
};
|
|
601
|
-
VError.fullStack = function(err) {
|
|
602
|
-
mod_assertplus.ok(mod_isError(err), "err must be an Error");
|
|
603
|
-
var cause = VError.cause(err);
|
|
604
|
-
if (cause) {
|
|
605
|
-
return err.stack + "\ncaused by: " + VError.fullStack(cause);
|
|
606
|
-
}
|
|
607
|
-
return err.stack;
|
|
608
|
-
};
|
|
609
|
-
VError.errorFromList = function(errors) {
|
|
610
|
-
mod_assertplus.arrayOfObject(errors, "errors");
|
|
611
|
-
if (errors.length === 0) {
|
|
612
|
-
return null;
|
|
613
|
-
}
|
|
614
|
-
errors.forEach(function(e) {
|
|
615
|
-
mod_assertplus.ok(mod_isError(e));
|
|
616
|
-
});
|
|
617
|
-
if (errors.length == 1) {
|
|
618
|
-
return errors[0];
|
|
619
|
-
}
|
|
620
|
-
return new MultiError(errors);
|
|
621
|
-
};
|
|
622
|
-
VError.errorForEach = function(err, func) {
|
|
623
|
-
mod_assertplus.ok(mod_isError(err), "err must be an Error");
|
|
624
|
-
mod_assertplus.func(func, "func");
|
|
625
|
-
if (err instanceof MultiError) {
|
|
626
|
-
err.errors().forEach(function iterError(e) {
|
|
627
|
-
func(e);
|
|
628
|
-
});
|
|
629
|
-
} else {
|
|
630
|
-
func(err);
|
|
631
|
-
}
|
|
632
|
-
};
|
|
633
|
-
function SError() {
|
|
634
|
-
var args, obj, parsed, options;
|
|
635
|
-
args = Array.prototype.slice.call(arguments, 0);
|
|
636
|
-
if (!(this instanceof SError)) {
|
|
637
|
-
obj = Object.create(SError.prototype);
|
|
638
|
-
SError.apply(obj, arguments);
|
|
639
|
-
return obj;
|
|
640
|
-
}
|
|
641
|
-
parsed = parseConstructorArguments({
|
|
642
|
-
"argv": args,
|
|
643
|
-
"strict": true
|
|
644
|
-
});
|
|
645
|
-
options = parsed.options;
|
|
646
|
-
VError.call(this, options, "%s", parsed.shortmessage);
|
|
647
|
-
return this;
|
|
648
|
-
}
|
|
649
|
-
mod_util.inherits(SError, VError);
|
|
650
|
-
function MultiError(errors) {
|
|
651
|
-
mod_assertplus.array(errors, "list of errors");
|
|
652
|
-
mod_assertplus.ok(errors.length > 0, "must be at least one error");
|
|
653
|
-
this.ase_errors = errors;
|
|
654
|
-
VError.call(this, {
|
|
655
|
-
"cause": errors[0]
|
|
656
|
-
}, "first of %d error%s", errors.length, errors.length == 1 ? "" : "s");
|
|
657
|
-
}
|
|
658
|
-
mod_util.inherits(MultiError, VError);
|
|
659
|
-
MultiError.prototype.name = "MultiError";
|
|
660
|
-
MultiError.prototype.errors = function me_errors() {
|
|
661
|
-
return this.ase_errors.slice(0);
|
|
662
|
-
};
|
|
663
|
-
function WError() {
|
|
664
|
-
var args, obj, parsed, options;
|
|
665
|
-
args = Array.prototype.slice.call(arguments, 0);
|
|
666
|
-
if (!(this instanceof WError)) {
|
|
667
|
-
obj = Object.create(WError.prototype);
|
|
668
|
-
WError.apply(obj, args);
|
|
669
|
-
return obj;
|
|
670
|
-
}
|
|
671
|
-
parsed = parseConstructorArguments({
|
|
672
|
-
"argv": args,
|
|
673
|
-
"strict": false
|
|
674
|
-
});
|
|
675
|
-
options = parsed.options;
|
|
676
|
-
options["skipCauseMessage"] = true;
|
|
677
|
-
VError.call(this, options, "%s", parsed.shortmessage);
|
|
678
|
-
return this;
|
|
679
|
-
}
|
|
680
|
-
mod_util.inherits(WError, VError);
|
|
681
|
-
WError.prototype.name = "WError";
|
|
682
|
-
WError.prototype.toString = function we_toString() {
|
|
683
|
-
var str = this.hasOwnProperty("name") && this.name || this.constructor.name || this.constructor.prototype.name;
|
|
684
|
-
if (this.message)
|
|
685
|
-
str += ": " + this.message;
|
|
686
|
-
if (this.jse_cause && this.jse_cause.message)
|
|
687
|
-
str += "; caused by " + this.jse_cause.toString();
|
|
688
|
-
return str;
|
|
689
|
-
};
|
|
690
|
-
WError.prototype.cause = function we_cause(c) {
|
|
691
|
-
if (mod_isError(c))
|
|
692
|
-
this.jse_cause = c;
|
|
693
|
-
return this.jse_cause;
|
|
694
|
-
};
|
|
695
|
-
}
|
|
696
|
-
});
|
|
697
|
-
|
|
698
|
-
// ../../libs/error-utils/errors.ts
|
|
699
|
-
init_cjs_shims();
|
|
700
|
-
|
|
701
|
-
// ../../libs/error-utils/HttpError.ts
|
|
702
|
-
init_cjs_shims();
|
|
703
|
-
var import_verror = __toESM(require_verror(), 1);
|
|
704
|
-
var VErrorConstructor = import_verror.default.VError || import_verror.default;
|
|
705
|
-
var HttpError = class _HttpError extends VErrorConstructor {
|
|
706
|
-
constructor(...args) {
|
|
707
|
-
const parsed = _HttpError.parseArgs(args);
|
|
708
|
-
const vErrorOptions = {};
|
|
709
|
-
if (parsed.cause) {
|
|
710
|
-
vErrorOptions.cause = parsed.cause;
|
|
711
|
-
}
|
|
712
|
-
if (parsed.info && Object.keys(parsed.info).length > 0) {
|
|
713
|
-
vErrorOptions.info = parsed.info;
|
|
714
|
-
}
|
|
715
|
-
super(vErrorOptions);
|
|
716
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
717
|
-
this.name = this.constructor.name;
|
|
718
|
-
this.message = parsed.message || "";
|
|
719
|
-
this.statusCode = parsed.statusCode || this.constructor.prototype.statusCode || 500;
|
|
720
|
-
this.code = parsed.code || this.constructor.prototype.code || this.name.replace(/Error$/, "");
|
|
721
|
-
const bodyCode = parsed.code || this.name.replace(/Error$/, "");
|
|
722
|
-
this.body = {
|
|
723
|
-
code: bodyCode,
|
|
724
|
-
message: parsed.message || ""
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
/**
|
|
728
|
-
* Parse constructor arguments into a normalized format.
|
|
729
|
-
* Handles variadic signatures similar to restify-errors.
|
|
730
|
-
*/
|
|
731
|
-
static parseArgs(args) {
|
|
732
|
-
if (args.length === 0) {
|
|
733
|
-
return { message: "" };
|
|
734
|
-
}
|
|
735
|
-
const first = args[0];
|
|
736
|
-
const second = args[1];
|
|
737
|
-
if (first instanceof Error) {
|
|
738
|
-
if (typeof second === "object" && second !== null && !Array.isArray(second)) {
|
|
739
|
-
const opts = second;
|
|
740
|
-
return {
|
|
741
|
-
cause: first,
|
|
742
|
-
info: opts.info,
|
|
743
|
-
statusCode: opts.statusCode,
|
|
744
|
-
code: opts.code,
|
|
745
|
-
message: opts.message || first.message
|
|
746
|
-
};
|
|
747
|
-
}
|
|
748
|
-
if (typeof second === "string") {
|
|
749
|
-
return {
|
|
750
|
-
cause: first,
|
|
751
|
-
message: second
|
|
752
|
-
};
|
|
753
|
-
}
|
|
754
|
-
return {
|
|
755
|
-
cause: first,
|
|
756
|
-
message: first.message
|
|
757
|
-
};
|
|
758
|
-
}
|
|
759
|
-
if (typeof first === "object" && first !== null && !Array.isArray(first)) {
|
|
760
|
-
const opts = first;
|
|
761
|
-
const message = typeof second === "string" ? second : opts.message || "";
|
|
762
|
-
return {
|
|
763
|
-
cause: opts.cause,
|
|
764
|
-
info: opts.info,
|
|
765
|
-
statusCode: opts.statusCode,
|
|
766
|
-
code: opts.code,
|
|
767
|
-
message
|
|
768
|
-
};
|
|
769
|
-
}
|
|
770
|
-
if (typeof first === "string") {
|
|
771
|
-
return {
|
|
772
|
-
message: first
|
|
773
|
-
};
|
|
774
|
-
}
|
|
775
|
-
return { message: "" };
|
|
776
|
-
}
|
|
777
|
-
/**
|
|
778
|
-
* Serialize error to JSON format.
|
|
779
|
-
* Compatible with restify-errors toJSON behavior.
|
|
780
|
-
*/
|
|
781
|
-
toJSON() {
|
|
782
|
-
let { message } = this.body;
|
|
783
|
-
const causeMethod = this.cause;
|
|
784
|
-
if (causeMethod && typeof causeMethod === "function") {
|
|
785
|
-
try {
|
|
786
|
-
const causeError = causeMethod();
|
|
787
|
-
if (causeError) {
|
|
788
|
-
const fullString = this.toString();
|
|
789
|
-
const colonIndex = fullString.indexOf(":");
|
|
790
|
-
if (colonIndex !== -1) {
|
|
791
|
-
message = fullString.substring(colonIndex + 1).trim();
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
} catch {
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
return {
|
|
798
|
-
code: this.body.code,
|
|
799
|
-
message
|
|
800
|
-
};
|
|
801
|
-
}
|
|
802
|
-
/**
|
|
803
|
-
* Get context/info object (compatibility with restify-errors)
|
|
804
|
-
*/
|
|
805
|
-
get context() {
|
|
806
|
-
return VErrorConstructor.info(this);
|
|
807
|
-
}
|
|
808
|
-
};
|
|
809
|
-
HttpError.prototype.name = "HttpError";
|
|
810
|
-
HttpError.prototype.statusCode = 500;
|
|
811
|
-
HttpError.prototype.code = "Error";
|
|
812
|
-
|
|
813
|
-
// ../../libs/error-utils/errors.ts
|
|
814
|
-
var InternalError = class extends HttpError {
|
|
815
|
-
constructor(...args) {
|
|
816
|
-
super(...args);
|
|
817
|
-
this.name = "InternalError";
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
InternalError.prototype.statusCode = 500;
|
|
821
|
-
InternalError.prototype.code = "Error";
|
|
822
|
-
var BadRequestError = class extends HttpError {
|
|
823
|
-
constructor(...args) {
|
|
824
|
-
super(...args);
|
|
825
|
-
this.name = "BadRequestError";
|
|
826
|
-
}
|
|
827
|
-
};
|
|
828
|
-
BadRequestError.prototype.statusCode = 400;
|
|
829
|
-
BadRequestError.prototype.code = "BadRequest";
|
|
830
|
-
var NotFoundError = class extends HttpError {
|
|
831
|
-
constructor(...args) {
|
|
832
|
-
super(...args);
|
|
833
|
-
this.name = "NotFoundError";
|
|
834
|
-
}
|
|
835
|
-
};
|
|
836
|
-
NotFoundError.prototype.statusCode = 404;
|
|
837
|
-
NotFoundError.prototype.code = "NotFound";
|
|
838
|
-
var ConflictError = class extends HttpError {
|
|
839
|
-
constructor(...args) {
|
|
840
|
-
super(...args);
|
|
841
|
-
this.name = "ConflictError";
|
|
842
|
-
}
|
|
843
|
-
};
|
|
844
|
-
ConflictError.prototype.statusCode = 409;
|
|
845
|
-
ConflictError.prototype.code = "Conflict";
|
|
846
|
-
var NotAuthorizedError = class extends HttpError {
|
|
847
|
-
constructor(...args) {
|
|
848
|
-
super(...args);
|
|
849
|
-
this.name = "NotAuthorizedError";
|
|
850
|
-
}
|
|
851
|
-
};
|
|
852
|
-
NotAuthorizedError.prototype.statusCode = 401;
|
|
853
|
-
NotAuthorizedError.prototype.code = "NotAuthorized";
|
|
854
|
-
var RequestThrottledError = class extends HttpError {
|
|
855
|
-
constructor(...args) {
|
|
856
|
-
super(...args);
|
|
857
|
-
this.name = "RequestThrottledError";
|
|
858
|
-
}
|
|
859
|
-
};
|
|
860
|
-
RequestThrottledError.prototype.statusCode = 429;
|
|
861
|
-
RequestThrottledError.prototype.code = "TooManyRequests";
|
|
862
|
-
|
|
863
|
-
// ../../libs/error-utils/index.ts
|
|
864
|
-
init_cjs_shims();
|
|
865
|
-
|
|
866
|
-
// ../../libs/error-utils/serializer.ts
|
|
867
|
-
init_cjs_shims();
|
|
868
|
-
var RestError = class extends HttpError {
|
|
869
|
-
constructor(...args) {
|
|
870
|
-
super(...args);
|
|
871
|
-
this.name = "RestError";
|
|
872
|
-
}
|
|
873
|
-
};
|
|
874
|
-
RestError.prototype.statusCode = 500;
|
|
875
|
-
RestError.prototype.code = "Error";
|
|
876
|
-
|
|
877
|
-
// ../../libs/error-utils/assert.ts
|
|
878
|
-
init_cjs_shims();
|
|
879
|
-
import assert from "assert";
|
|
880
|
-
|
|
881
|
-
// ../../libs/types/index.ts
|
|
882
|
-
init_cjs_shims();
|
|
883
|
-
|
|
884
|
-
// ../../libs/types/accountTypes.ts
|
|
5
|
+
// ../../libs/types/strings.ts
|
|
885
6
|
init_cjs_shims();
|
|
886
7
|
|
|
887
8
|
// ../../node_modules/zod/lib/index.mjs
|
|
@@ -4935,233 +4056,7 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
4935
4056
|
ZodError
|
|
4936
4057
|
});
|
|
4937
4058
|
|
|
4938
|
-
// ../../libs/types/accountTypes.ts
|
|
4939
|
-
var ledgerAccountTypes = [
|
|
4940
|
-
"asset",
|
|
4941
|
-
"liability",
|
|
4942
|
-
"income",
|
|
4943
|
-
"expense"
|
|
4944
|
-
];
|
|
4945
|
-
var LedgerAccountTypeSchema = z.enum(ledgerAccountTypes);
|
|
4946
|
-
|
|
4947
|
-
// ../../libs/types/workspaceTypes.ts
|
|
4948
|
-
init_cjs_shims();
|
|
4949
|
-
var workspaceTypes = [
|
|
4950
|
-
"ledger",
|
|
4951
|
-
"payments",
|
|
4952
|
-
"free_tier_ledger"
|
|
4953
|
-
];
|
|
4954
|
-
var WorkspaceTypeSchema = z.enum(workspaceTypes);
|
|
4955
|
-
|
|
4956
|
-
// ../../libs/types/stripeModes.ts
|
|
4957
|
-
init_cjs_shims();
|
|
4958
|
-
var stripeModes = ["test", "live"];
|
|
4959
|
-
var StripeModeSchema = z.enum(stripeModes);
|
|
4960
|
-
|
|
4961
|
-
// ../../libs/types/currencyCodes.ts
|
|
4962
|
-
init_cjs_shims();
|
|
4963
|
-
var nonISOCurrencyCodes = [
|
|
4964
|
-
// Crypto currencies
|
|
4965
|
-
"ADA",
|
|
4966
|
-
"BTC",
|
|
4967
|
-
"DAI",
|
|
4968
|
-
"ETH",
|
|
4969
|
-
"SOL",
|
|
4970
|
-
"USDC",
|
|
4971
|
-
"USDT",
|
|
4972
|
-
"USDG",
|
|
4973
|
-
"EURC",
|
|
4974
|
-
"CADC",
|
|
4975
|
-
"CADT",
|
|
4976
|
-
"XLM",
|
|
4977
|
-
"UNI",
|
|
4978
|
-
"BCH",
|
|
4979
|
-
"LTC",
|
|
4980
|
-
"AAVE",
|
|
4981
|
-
"LINK",
|
|
4982
|
-
"MATIC",
|
|
4983
|
-
"PTS"
|
|
4984
|
-
];
|
|
4985
|
-
var ISOCurrencyCodes = [
|
|
4986
|
-
// Fiat currencies
|
|
4987
|
-
"AED",
|
|
4988
|
-
"AFN",
|
|
4989
|
-
"ALL",
|
|
4990
|
-
"AMD",
|
|
4991
|
-
"ANG",
|
|
4992
|
-
"AOA",
|
|
4993
|
-
"ARS",
|
|
4994
|
-
"AUD",
|
|
4995
|
-
"AWG",
|
|
4996
|
-
"AZN",
|
|
4997
|
-
"BAM",
|
|
4998
|
-
"BBD",
|
|
4999
|
-
"BDT",
|
|
5000
|
-
"BGN",
|
|
5001
|
-
"BHD",
|
|
5002
|
-
"BIF",
|
|
5003
|
-
"BMD",
|
|
5004
|
-
"BND",
|
|
5005
|
-
"BOB",
|
|
5006
|
-
"BRL",
|
|
5007
|
-
"BSD",
|
|
5008
|
-
"BTN",
|
|
5009
|
-
"BWP",
|
|
5010
|
-
"BYR",
|
|
5011
|
-
"BZD",
|
|
5012
|
-
"CAD",
|
|
5013
|
-
"CDF",
|
|
5014
|
-
"CHF",
|
|
5015
|
-
"CLP",
|
|
5016
|
-
"CNY",
|
|
5017
|
-
"COP",
|
|
5018
|
-
"CRC",
|
|
5019
|
-
"CUC",
|
|
5020
|
-
"CUP",
|
|
5021
|
-
"CVE",
|
|
5022
|
-
"CZK",
|
|
5023
|
-
"DJF",
|
|
5024
|
-
"DKK",
|
|
5025
|
-
"DOP",
|
|
5026
|
-
"DZD",
|
|
5027
|
-
"EGP",
|
|
5028
|
-
"ERN",
|
|
5029
|
-
"ETB",
|
|
5030
|
-
"EUR",
|
|
5031
|
-
"FJD",
|
|
5032
|
-
"FKP",
|
|
5033
|
-
"GBP",
|
|
5034
|
-
"GEL",
|
|
5035
|
-
"GGP",
|
|
5036
|
-
"GHS",
|
|
5037
|
-
"GIP",
|
|
5038
|
-
"GMD",
|
|
5039
|
-
"GNF",
|
|
5040
|
-
"GTQ",
|
|
5041
|
-
"GYD",
|
|
5042
|
-
"HKD",
|
|
5043
|
-
"HNL",
|
|
5044
|
-
"HRK",
|
|
5045
|
-
"HTG",
|
|
5046
|
-
"HUF",
|
|
5047
|
-
"IDR",
|
|
5048
|
-
"ILS",
|
|
5049
|
-
"IMP",
|
|
5050
|
-
"INR",
|
|
5051
|
-
"IQD",
|
|
5052
|
-
"IRR",
|
|
5053
|
-
"ISK",
|
|
5054
|
-
"JMD",
|
|
5055
|
-
"JOD",
|
|
5056
|
-
"JPY",
|
|
5057
|
-
"KES",
|
|
5058
|
-
"KGS",
|
|
5059
|
-
"KHR",
|
|
5060
|
-
"KMF",
|
|
5061
|
-
"KPW",
|
|
5062
|
-
"KRW",
|
|
5063
|
-
"KWD",
|
|
5064
|
-
"KYD",
|
|
5065
|
-
"KZT",
|
|
5066
|
-
"LAK",
|
|
5067
|
-
"LBP",
|
|
5068
|
-
"LKR",
|
|
5069
|
-
"LRD",
|
|
5070
|
-
"LSL",
|
|
5071
|
-
"LYD",
|
|
5072
|
-
"MAD",
|
|
5073
|
-
"MDL",
|
|
5074
|
-
"MGA",
|
|
5075
|
-
"MKD",
|
|
5076
|
-
"MMK",
|
|
5077
|
-
"MNT",
|
|
5078
|
-
"MOP",
|
|
5079
|
-
"MUR",
|
|
5080
|
-
"MVR",
|
|
5081
|
-
"MWK",
|
|
5082
|
-
"MXN",
|
|
5083
|
-
"MYR",
|
|
5084
|
-
"MZN",
|
|
5085
|
-
"NAD",
|
|
5086
|
-
"NGN",
|
|
5087
|
-
"NIO",
|
|
5088
|
-
"NOK",
|
|
5089
|
-
"NPR",
|
|
5090
|
-
"NZD",
|
|
5091
|
-
"OMR",
|
|
5092
|
-
"PAB",
|
|
5093
|
-
"PEN",
|
|
5094
|
-
"PGK",
|
|
5095
|
-
"PHP",
|
|
5096
|
-
"PKR",
|
|
5097
|
-
"PLN",
|
|
5098
|
-
"PYG",
|
|
5099
|
-
"QAR",
|
|
5100
|
-
"RON",
|
|
5101
|
-
"RSD",
|
|
5102
|
-
"RUB",
|
|
5103
|
-
"RWF",
|
|
5104
|
-
"SAR",
|
|
5105
|
-
"SBD",
|
|
5106
|
-
"SCR",
|
|
5107
|
-
"SDG",
|
|
5108
|
-
"SEK",
|
|
5109
|
-
"SGD",
|
|
5110
|
-
"SHP",
|
|
5111
|
-
"SLE",
|
|
5112
|
-
"SLL",
|
|
5113
|
-
"SOS",
|
|
5114
|
-
"SPL",
|
|
5115
|
-
"SRD",
|
|
5116
|
-
"SVC",
|
|
5117
|
-
"SYP",
|
|
5118
|
-
"STN",
|
|
5119
|
-
"SZL",
|
|
5120
|
-
"THB",
|
|
5121
|
-
"TJS",
|
|
5122
|
-
"TMT",
|
|
5123
|
-
"TND",
|
|
5124
|
-
"TOP",
|
|
5125
|
-
"TRY",
|
|
5126
|
-
"TTD",
|
|
5127
|
-
"TVD",
|
|
5128
|
-
"TWD",
|
|
5129
|
-
"TZS",
|
|
5130
|
-
"UAH",
|
|
5131
|
-
"UGX",
|
|
5132
|
-
"USD",
|
|
5133
|
-
"UYU",
|
|
5134
|
-
"UZS",
|
|
5135
|
-
"VEF",
|
|
5136
|
-
"VND",
|
|
5137
|
-
"VUV",
|
|
5138
|
-
"WST",
|
|
5139
|
-
"XAF",
|
|
5140
|
-
"XCD",
|
|
5141
|
-
"XOF",
|
|
5142
|
-
"XPF",
|
|
5143
|
-
"YER",
|
|
5144
|
-
"ZAR",
|
|
5145
|
-
"ZMW"
|
|
5146
|
-
];
|
|
5147
|
-
var currencyCodes = [
|
|
5148
|
-
...nonISOCurrencyCodes,
|
|
5149
|
-
...ISOCurrencyCodes,
|
|
5150
|
-
"LOGICAL",
|
|
5151
|
-
"CUSTOM"
|
|
5152
|
-
];
|
|
5153
|
-
var accountCurrencyCodes = [...currencyCodes, "MULTI"];
|
|
5154
|
-
var currencyModes = ["single", "multi"];
|
|
5155
|
-
var CurrencyModeSchema = z.enum(currencyModes);
|
|
5156
|
-
var CurrencyCodeSchema = z.enum(currencyCodes);
|
|
5157
|
-
var AccountCurrencyCodeSchema = z.enum(accountCurrencyCodes);
|
|
5158
|
-
var CurrencyMatchInputSchema = z.object({
|
|
5159
|
-
customCurrencyId: z.optional(z.string()),
|
|
5160
|
-
code: CurrencyCodeSchema
|
|
5161
|
-
});
|
|
5162
|
-
|
|
5163
4059
|
// ../../libs/types/strings.ts
|
|
5164
|
-
init_cjs_shims();
|
|
5165
4060
|
var UNSAFE_CHARACTERS = ["#", "/", ":"];
|
|
5166
4061
|
var isUnsafeString = (value) => {
|
|
5167
4062
|
return !!UNSAFE_CHARACTERS.find((character) => {
|
|
@@ -5355,376 +4250,13 @@ var MAX_FREEFORM_TEXT_LENGTH = 1e3;
|
|
|
5355
4250
|
var PlainRequestPayloadSchema = z.any().brand();
|
|
5356
4251
|
var HashedRequestPayloadSchema = z.any().brand();
|
|
5357
4252
|
|
|
5358
|
-
// ../../libs/types/principals.ts
|
|
5359
|
-
init_cjs_shims();
|
|
5360
|
-
var PrincipalTypeEnum = z.enum([
|
|
5361
|
-
"human",
|
|
5362
|
-
"service",
|
|
5363
|
-
"customer_api_client",
|
|
5364
|
-
"mcp_client"
|
|
5365
|
-
]);
|
|
5366
|
-
var PrincipalTypeSchema = PrincipalTypeEnum.brand();
|
|
5367
|
-
var PrincipalType = {
|
|
5368
|
-
human: PrincipalTypeSchema.parse(PrincipalTypeEnum.enum.human),
|
|
5369
|
-
service: PrincipalTypeSchema.parse(PrincipalTypeEnum.enum.service),
|
|
5370
|
-
customer_api_client: PrincipalTypeSchema.parse(
|
|
5371
|
-
PrincipalTypeEnum.enum.customer_api_client
|
|
5372
|
-
),
|
|
5373
|
-
mcp_client: PrincipalTypeSchema.parse(PrincipalTypeEnum.enum.mcp_client)
|
|
5374
|
-
};
|
|
5375
|
-
var principalTypes = PrincipalTypeEnum.options;
|
|
5376
|
-
|
|
5377
|
-
// ../../libs/types/idp.ts
|
|
5378
|
-
init_cjs_shims();
|
|
5379
|
-
var Idp = {
|
|
5380
|
-
auth0: "auth0",
|
|
5381
|
-
cognito: "cognito"
|
|
5382
|
-
};
|
|
5383
|
-
var idps = Object.values(Idp);
|
|
5384
|
-
|
|
5385
|
-
// ../../libs/types/time.ts
|
|
5386
|
-
init_cjs_shims();
|
|
5387
|
-
var quarterMap = {
|
|
5388
|
-
Q1: ["01", "02", "03"],
|
|
5389
|
-
Q2: ["04", "05", "06"],
|
|
5390
|
-
Q3: ["07", "08", "09"],
|
|
5391
|
-
Q4: ["10", "11", "12"]
|
|
5392
|
-
};
|
|
5393
|
-
var quarters = Object.keys(quarterMap);
|
|
5394
|
-
var months = [
|
|
5395
|
-
"01",
|
|
5396
|
-
"02",
|
|
5397
|
-
"03",
|
|
5398
|
-
"04",
|
|
5399
|
-
"05",
|
|
5400
|
-
"06",
|
|
5401
|
-
"07",
|
|
5402
|
-
"08",
|
|
5403
|
-
"09",
|
|
5404
|
-
"10",
|
|
5405
|
-
"11",
|
|
5406
|
-
"12"
|
|
5407
|
-
];
|
|
5408
|
-
var MonthSchema = z.enum(months);
|
|
5409
|
-
var YearSchema = z.string().regex(/^\d{4}$/, 'Expected a 4-digit year, e.g. "2026"');
|
|
5410
|
-
var PeriodFilterSchema = z.discriminatedUnion("type", [
|
|
5411
|
-
z.object({ type: z.literal("year"), year: YearSchema }).strict(),
|
|
5412
|
-
z.object({ type: z.literal("month"), year: YearSchema, month: MonthSchema }).strict()
|
|
5413
|
-
]);
|
|
5414
|
-
|
|
5415
|
-
// ../../libs/error-utils/assert.ts
|
|
5416
|
-
function assertError(predicate, CustomError, options) {
|
|
5417
|
-
if (CustomError === void 0) {
|
|
5418
|
-
throw new InternalError("you must pass in CustomError to assert");
|
|
5419
|
-
}
|
|
5420
|
-
try {
|
|
5421
|
-
assert(!!predicate);
|
|
5422
|
-
} catch (cause) {
|
|
5423
|
-
const opts = typeof options === "function" ? options() : options;
|
|
5424
|
-
throw new CustomError(
|
|
5425
|
-
{
|
|
5426
|
-
...opts,
|
|
5427
|
-
cause
|
|
5428
|
-
},
|
|
5429
|
-
opts.message
|
|
5430
|
-
);
|
|
5431
|
-
}
|
|
5432
|
-
}
|
|
5433
|
-
var assert_default = assertError;
|
|
5434
|
-
function assertIsError(value, options = {}) {
|
|
5435
|
-
if (!(value instanceof Error)) {
|
|
5436
|
-
throw new InternalError({
|
|
5437
|
-
...options,
|
|
5438
|
-
info: {
|
|
5439
|
-
...options.info,
|
|
5440
|
-
error: value
|
|
5441
|
-
},
|
|
5442
|
-
message: "value is not an Error"
|
|
5443
|
-
});
|
|
5444
|
-
}
|
|
5445
|
-
}
|
|
5446
|
-
|
|
5447
|
-
// ../../libs/error-utils/codes.ts
|
|
5448
|
-
init_cjs_shims();
|
|
5449
|
-
var codes = {
|
|
5450
|
-
dark_reads: {
|
|
5451
|
-
mismatch: "dark_reads_mismatch",
|
|
5452
|
-
mismatch_count: "dark_reads_mismatch_count",
|
|
5453
|
-
gsi_recent_mismatch: "dark_reads_gsi_recent_mismatch"
|
|
5454
|
-
},
|
|
5455
|
-
request: {
|
|
5456
|
-
incompatible_filters: `incompatible_filters`,
|
|
5457
|
-
no_update_provided: `no_update_provided`,
|
|
5458
|
-
no_txs_provided: `no_txs_provided`,
|
|
5459
|
-
too_many_txs: `too_many_txs`,
|
|
5460
|
-
concurrent_request_conflict: `concurrent_request_conflict`,
|
|
5461
|
-
too_many_items_in_list_filter: `too_many_items_in_list_filter`,
|
|
5462
|
-
invalid_input_provided: `invalid_input_provided`,
|
|
5463
|
-
amount_must_be_integer: `amount_must_be_integer`,
|
|
5464
|
-
period_filter_day_not_supported: `period_filter_day_not_supported`,
|
|
5465
|
-
unsupported_period_filter: `unsupported_period_filter`,
|
|
5466
|
-
bad_cursor: "bad_cursor",
|
|
5467
|
-
invalid_page_size: "request_invalid_page_size"
|
|
5468
|
-
},
|
|
5469
|
-
balances: {
|
|
5470
|
-
invalid_duration: `invalid_duration`,
|
|
5471
|
-
invalid_time_range: `invalid_time_range`,
|
|
5472
|
-
unsupported_period_type: `unsupported_period_type`,
|
|
5473
|
-
currency_mismatch: `currency_mismatch`,
|
|
5474
|
-
multi_currency_account_missing_currency: `multi_currency_account_missing_currency`,
|
|
5475
|
-
granularity_not_supported: `granularity_not_supported`,
|
|
5476
|
-
failed_to_get_balance_docs: `failed_to_get_balance_docs`,
|
|
5477
|
-
historical_balances_disabled: `historical_balances_disabled`
|
|
5478
|
-
},
|
|
5479
|
-
ik: {
|
|
5480
|
-
request_body_mismatch: "ik_request_body_mismatch",
|
|
5481
|
-
concurrent_reverse_ledger_entry_request: "ik_concurrent_reverse_ledger_entry_request",
|
|
5482
|
-
repost_not_enabled: "ik_repost_not_enabled",
|
|
5483
|
-
duplicate_ik_in_batch: "ik_duplicate_ik_in_batch",
|
|
5484
|
-
reserved_prefix: "ik_reserved_prefix",
|
|
5485
|
-
too_long: "ik_too_long"
|
|
5486
|
-
},
|
|
5487
|
-
ledger: {
|
|
5488
|
-
not_found: "ledger_not_found",
|
|
5489
|
-
not_provided: "ledger_not_provided",
|
|
5490
|
-
recently_deleted: "ledger_recently_deleted",
|
|
5491
|
-
migration_in_progress: "ledger_migration_in_progress",
|
|
5492
|
-
version_conflict: "ledger_version_conflict",
|
|
5493
|
-
delete_failed: "ledger_delete_failed",
|
|
5494
|
-
delete_in_production: "ledger_delete_in_production",
|
|
5495
|
-
missing_modified_timestamp: "ledger_missing_modified_timestamp",
|
|
5496
|
-
invalid_name: "ledger_invalid_name",
|
|
5497
|
-
name_too_long: "ledger_name_too_long"
|
|
5498
|
-
},
|
|
5499
|
-
ledger_account: {
|
|
5500
|
-
not_found: "ledger_account_not_found",
|
|
5501
|
-
not_templated: "ledger_account_not_templated",
|
|
5502
|
-
invalid_path: "ledger_account_invalid_path",
|
|
5503
|
-
incorrect_ledger: "ledger_account_incorrect_ledger",
|
|
5504
|
-
disabled_status: `ledger_account_disabled`,
|
|
5505
|
-
archived_status: `ledger_account_archived`,
|
|
5506
|
-
multiple_categories: "ledger_account_multiple_categories"
|
|
5507
|
-
},
|
|
5508
|
-
payment: {
|
|
5509
|
-
too_many_attempts: "payment_too_many_attempts",
|
|
5510
|
-
already_accepted: "payment_already_accepted",
|
|
5511
|
-
no_attempt_to_retry: "payment_no_attempt_to_retry",
|
|
5512
|
-
attempt_in_progress: "payment_attempt_in_progress",
|
|
5513
|
-
attempt_changed: "payment_attempt_changed",
|
|
5514
|
-
method_required: "payment_method_required",
|
|
5515
|
-
account_not_verified: "payment_account_not_verified",
|
|
5516
|
-
amount_below_minimum: "payment_amount_below_minimum",
|
|
5517
|
-
amount_above_maximum: "payment_amount_above_maximum",
|
|
5518
|
-
amount_too_large: "payment_amount_too_large",
|
|
5519
|
-
schema_key_not_found: "payment_schema_key_not_found",
|
|
5520
|
-
type_not_found: "payment_type_not_found",
|
|
5521
|
-
missing_parameters: "payment_missing_parameters",
|
|
5522
|
-
unknown_parameters: "payment_unknown_parameters",
|
|
5523
|
-
reserved_parameters: "payment_reserved_parameters",
|
|
5524
|
-
invalid_request: "payment_invalid_request",
|
|
5525
|
-
not_refundable: "payment_not_refundable",
|
|
5526
|
-
refund_amount_too_large: "payment_refund_amount_too_large"
|
|
5527
|
-
},
|
|
5528
|
-
payment_method: {
|
|
5529
|
-
invalid_id: "payment_method_invalid_id",
|
|
5530
|
-
not_found: "payment_method_not_found",
|
|
5531
|
-
expired: "payment_method_expired"
|
|
5532
|
-
},
|
|
5533
|
-
payment_method_setup: {
|
|
5534
|
-
invalid_id: "payment_method_setup_invalid_id",
|
|
5535
|
-
not_found: "payment_method_setup_not_found",
|
|
5536
|
-
invalid_request: "payment_method_setup_invalid_request",
|
|
5537
|
-
confirmation_rejected: "payment_method_setup_confirmation_rejected"
|
|
5538
|
-
},
|
|
5539
|
-
payment_account: {
|
|
5540
|
-
not_provisioned: "payment_account_not_provisioned",
|
|
5541
|
-
direct_posting_disallowed: `payment_account_direct_posting_disallowed`,
|
|
5542
|
-
only_with_schema: "payment_account_only_with_schema",
|
|
5543
|
-
not_jit_allowed: "payment_account_not_jit_allowed",
|
|
5544
|
-
not_found: "payment_account_not_found"
|
|
5545
|
-
},
|
|
5546
|
-
payment_entry: {
|
|
5547
|
-
cannot_reverse: "payment_entry_cannot_reverse",
|
|
5548
|
-
cannot_migrate: "payment_entry_cannot_migrate",
|
|
5549
|
-
cannot_update: "payment_entry_cannot_update"
|
|
5550
|
-
},
|
|
5551
|
-
ledger_entry: {
|
|
5552
|
-
invalid_id_provided: `ledger_entry_invalid_id_provided`,
|
|
5553
|
-
not_found: `ledger_entry_not_found`,
|
|
5554
|
-
too_many_lines: `ledger_entry_too_many_lines`,
|
|
5555
|
-
too_many_batch_lines: `ledger_entry_too_many_batch_lines`,
|
|
5556
|
-
not_provided: `ledger_entry_not_provided`,
|
|
5557
|
-
schema_key_not_found: `ledger_entry_schema_key_not_found`,
|
|
5558
|
-
update_version_mismatch: `ledger_entry_update_version_mismatch`,
|
|
5559
|
-
already_reversed: `ledger_entry_already_reversed`,
|
|
5560
|
-
reversal_linked_account_not_supported: `ledger_entry_reversal_linked_account_not_supported`,
|
|
5561
|
-
invalid_entry_version: `ledger_entry_invalid_entry_version`,
|
|
5562
|
-
recently_reversed: `ledger_entry_recently_reversed`,
|
|
5563
|
-
conflicting_tag_update: `ledger_entry_conflicting_tag_update`,
|
|
5564
|
-
tags_not_provided: `ledger_entry_tags_not_provided`,
|
|
5565
|
-
groups_not_provided: `ledger_entry_groups_not_provided`,
|
|
5566
|
-
migration_not_allowed: `ledger_entry_migration_not_allowed`,
|
|
5567
|
-
entry_type_disabled: `ledger_entry_entry_type_disabled`,
|
|
5568
|
-
entry_cannot_have_multiple_pre_or_postconditions_on_same_account: `ledger_entry_entry_cannot_have_multiple_pre_or_postconditions_on_same_account`,
|
|
5569
|
-
no_lines: `ledger_entry_no_lines`,
|
|
5570
|
-
too_many_transaction_items: `ledger_entry_too_many_transaction_items`,
|
|
5571
|
-
duplicate_tx_reconciliation_in_batch: `ledger_entry_duplicate_tx_reconciliation_in_batch`,
|
|
5572
|
-
reverse_and_reconcile_in_batch: `ledger_entry_reverse_and_reconcile_in_batch`,
|
|
5573
|
-
batch_aborted_by_peer_condition: `ledger_entry_batch_aborted_by_peer_condition`,
|
|
5574
|
-
batch_rolled_back_by_peer: `ledger_entry_batch_rolled_back_by_peer`,
|
|
5575
|
-
unsatisfiable_batch_condition: `ledger_entry_unsatisfiable_batch_condition`,
|
|
5576
|
-
batch_operation_failed: `ledger_entry_batch_operation_failed`
|
|
5577
|
-
},
|
|
5578
|
-
ledger_entry_history: {
|
|
5579
|
-
no_history_for_ik: `no_ledger_entry_history_for_ik`
|
|
5580
|
-
},
|
|
5581
|
-
ledger_line: {
|
|
5582
|
-
not_found: `ledger_line_not_found`,
|
|
5583
|
-
invalid_line_key: `ledger_line_invalid_line_key`,
|
|
5584
|
-
not_provided: `ledger_line_not_provided`,
|
|
5585
|
-
tags_not_provided: `ledger_line_tags_not_provided`,
|
|
5586
|
-
conflicting_tag_update: `ledger_line_conflicting_tag_update`,
|
|
5587
|
-
duplicate_line_update: `ledger_line_duplicate_line_update`
|
|
5588
|
-
},
|
|
5589
|
-
schema: {
|
|
5590
|
-
not_found: "schema_not_found",
|
|
5591
|
-
entry_type_not_found: "schema_entry_type_not_found",
|
|
5592
|
-
max_size_exceeded: "schema_max_size_exceeded",
|
|
5593
|
-
payments_not_enabled: "payments_not_enabled",
|
|
5594
|
-
refunds_not_enabled: "refunds_not_enabled",
|
|
5595
|
-
production_schema_limit: "production_schema_limit",
|
|
5596
|
-
production_payment_ledger_limit: "production_payment_ledger_limit"
|
|
5597
|
-
},
|
|
5598
|
-
schema_ledger: {
|
|
5599
|
-
not_found: "schema_ledger_not_found"
|
|
5600
|
-
},
|
|
5601
|
-
external_account: {
|
|
5602
|
-
not_found: `external_account_not_found`
|
|
5603
|
-
},
|
|
5604
|
-
invites: {
|
|
5605
|
-
invalid_invite: `invalid_invite`,
|
|
5606
|
-
expired: `invite_expired`,
|
|
5607
|
-
delete_used_invite: `delete_used_invite`,
|
|
5608
|
-
no_invites: `no_invites`,
|
|
5609
|
-
too_many_invites: `too_many_invites`,
|
|
5610
|
-
inviting_existing_member: `inviting_existing_member`
|
|
5611
|
-
},
|
|
5612
|
-
link: {
|
|
5613
|
-
not_found: `link_not_found`,
|
|
5614
|
-
unit_not_supported: `link_unit_not_supported`
|
|
5615
|
-
},
|
|
5616
|
-
tx: {
|
|
5617
|
-
tx_max_reconciled_entries: `tx_max_reconciled_entries`,
|
|
5618
|
-
missing_currency: `tx_missing_currency`,
|
|
5619
|
-
missing_account: `tx_missing_account`,
|
|
5620
|
-
invalid_posted_value: `tx_invalid_posted_value`,
|
|
5621
|
-
external_id_too_long: `tx_external_id_too_long`,
|
|
5622
|
-
description_empty: `tx_description_empty`,
|
|
5623
|
-
description_too_long: `tx_description_too_long`,
|
|
5624
|
-
reconciliation_disallowed: `tx_reconciliation_disallowed`,
|
|
5625
|
-
has_reconciled_ledger_entries: `tx_has_reconciled_ledger_entries`,
|
|
5626
|
-
not_found: `tx_not_found`,
|
|
5627
|
-
already_reconciled: `tx_already_reconciled`
|
|
5628
|
-
},
|
|
5629
|
-
sync_custom_txs: {
|
|
5630
|
-
received_duplicate_tx_external_ids: `received_duplicate_tx_external_ids`
|
|
5631
|
-
},
|
|
5632
|
-
add_ledger_entry: {
|
|
5633
|
-
linked_accounts_disallowed: `linked_accounts_disallowed`
|
|
5634
|
-
},
|
|
5635
|
-
migrate_ledger_entry: {
|
|
5636
|
-
ledger_mismatch: `migrate_ledger_entry_ledger_mismatch`
|
|
5637
|
-
},
|
|
5638
|
-
reconcile_tx: {
|
|
5639
|
-
invalid_posted_timestamp: `invalid_posted_timestamp`,
|
|
5640
|
-
no_tx_lines_provided: `no_tx_lines_provided`,
|
|
5641
|
-
too_many_tx_lines_provided: `too_many_tx_lines_provided`,
|
|
5642
|
-
invalid_ledger_account: `invalid_ledger_account`
|
|
5643
|
-
},
|
|
5644
|
-
billing: {
|
|
5645
|
-
invoice_service_unavailable: "invoice_service_unavailable"
|
|
5646
|
-
},
|
|
5647
|
-
data_export: {
|
|
5648
|
-
connection_failed: "data_export_connection_failed"
|
|
5649
|
-
},
|
|
5650
|
-
custom_currency: {
|
|
5651
|
-
name_empty: "custom_currency_name_empty",
|
|
5652
|
-
id_empty: "custom_currency_id_empty",
|
|
5653
|
-
code_empty: "custom_currency_code_empty",
|
|
5654
|
-
id_too_long: "custom_currency_id_too_long",
|
|
5655
|
-
code_too_long: "custom_currency_code_too_long",
|
|
5656
|
-
precision_must_be_non_negative: "custom_currency_precision_must_be_non_negative",
|
|
5657
|
-
name_too_long: "custom_currency_name_too_long"
|
|
5658
|
-
},
|
|
5659
|
-
payments_onboarding: {
|
|
5660
|
-
business_cdd_not_found: "business_cdd_not_found",
|
|
5661
|
-
business_entity_not_found: "payments_onboarding_business_entity_not_found",
|
|
5662
|
-
bt_token_update_failed: "payments_onboarding_bt_token_update_failed",
|
|
5663
|
-
entity_missing_pii_token: "payments_onboarding_entity_missing_pii_token",
|
|
5664
|
-
entity_not_found: "payments_onboarding_entity_not_found",
|
|
5665
|
-
entity_not_submittable: "payments_onboarding_entity_not_submittable",
|
|
5666
|
-
entity_type_mismatch: "payments_onboarding_entity_type_mismatch",
|
|
5667
|
-
entity_type_not_supported: "payments_onboarding_entity_type_not_supported",
|
|
5668
|
-
invalid_prong: "payments_onboarding_invalid_prong",
|
|
5669
|
-
missing_api_keys: "payments_onboarding_missing_api_keys",
|
|
5670
|
-
missing_oscilar_endpoint_url: "payments_onboarding_missing_oscilar_endpoint_url",
|
|
5671
|
-
oscilar_submission_failed: "payments_onboarding_oscilar_submission_failed"
|
|
5672
|
-
},
|
|
5673
|
-
authorizer: {
|
|
5674
|
-
workspace_access_not_found: "authorizer_workspace_access_not_found",
|
|
5675
|
-
workspace_access_ambiguous: "authorizer_workspace_access_ambiguous"
|
|
5676
|
-
},
|
|
5677
|
-
workspace: {
|
|
5678
|
-
workspace_not_found: "workspace_not_found",
|
|
5679
|
-
already_exists: "workspace_already_exists",
|
|
5680
|
-
free_tier_entry_limit: "workspace_free_tier_entry_limit",
|
|
5681
|
-
type_not_allowed: "workspace_type_not_allowed",
|
|
5682
|
-
parent_required: "workspace_parent_required",
|
|
5683
|
-
parent_not_found: "workspace_parent_not_found",
|
|
5684
|
-
parent_access_needed: "workspace_parent_access_needed",
|
|
5685
|
-
parent_not_paid: "workspace_parent_not_paid",
|
|
5686
|
-
parent_stripe_customer_missing: "workspace_parent_stripe_customer_missing"
|
|
5687
|
-
},
|
|
5688
|
-
workspace_access: {
|
|
5689
|
-
already_exists: "workspace_access_already_exists"
|
|
5690
|
-
},
|
|
5691
|
-
workspace_member: {
|
|
5692
|
-
cap_limit_exceeded: "cap_limit_exceeded"
|
|
5693
|
-
},
|
|
5694
|
-
api_client: {
|
|
5695
|
-
invalid_role: "api_client_invalid_role"
|
|
5696
|
-
},
|
|
5697
|
-
user: {
|
|
5698
|
-
user_not_found: "user_not_found",
|
|
5699
|
-
user_not_belong_to_workspace: "user_not_belong_to_workspace",
|
|
5700
|
-
user_cannot_change_own_role: "user_cannot_change_own_role",
|
|
5701
|
-
role_not_assignable: "role_not_assignable",
|
|
5702
|
-
invalid_email: "user_invalid_email"
|
|
5703
|
-
},
|
|
5704
|
-
conditional_request_failed: "conditional_request_failed",
|
|
5705
|
-
parameterization_failed: "parameterization_failed",
|
|
5706
|
-
schema_not_found: "schema_not_found",
|
|
5707
|
-
not_authorized: "not_authorized",
|
|
5708
|
-
role_exceeds_granter: "role_exceeds_granter",
|
|
5709
|
-
throttling_error: "throttling_error"
|
|
5710
|
-
};
|
|
5711
|
-
|
|
5712
4253
|
export {
|
|
5713
|
-
InternalError,
|
|
5714
|
-
BadRequestError,
|
|
5715
4254
|
z,
|
|
5716
|
-
LedgerAccountTypeSchema,
|
|
5717
|
-
currencyCodes,
|
|
5718
|
-
CurrencyModeSchema,
|
|
5719
|
-
CurrencyMatchInputSchema,
|
|
5720
4255
|
getStringParameters,
|
|
5721
4256
|
getStringParametersInternal,
|
|
5722
4257
|
SafeStringSchema,
|
|
5723
4258
|
ParameterizedString,
|
|
5724
4259
|
ParameterizedAmount,
|
|
5725
4260
|
safe,
|
|
5726
|
-
MAX_FREEFORM_TEXT_LENGTH
|
|
5727
|
-
assert_default,
|
|
5728
|
-
assertIsError,
|
|
5729
|
-
codes
|
|
4261
|
+
MAX_FREEFORM_TEXT_LENGTH
|
|
5730
4262
|
};
|