@agent-score/commerce 2.6.1 → 2.6.3
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 +2 -2
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/identity/express.js +1 -1
- package/dist/identity/express.mjs +1 -1
- package/dist/identity/fastify.js +1 -1
- package/dist/identity/fastify.mjs +1 -1
- package/dist/identity/hono.js +1 -1
- package/dist/identity/hono.mjs +1 -1
- package/dist/identity/nextjs.js +1 -1
- package/dist/identity/nextjs.mjs +1 -1
- package/dist/identity/web.js +1 -1
- package/dist/identity/web.mjs +1 -1
- package/dist/index.js +76 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +76 -62
- package/dist/index.mjs.map +1 -1
- package/dist/stripe-multichain/index.js +53 -51
- package/dist/stripe-multichain/index.js.map +1 -1
- package/dist/stripe-multichain/index.mjs +53 -51
- package/dist/stripe-multichain/index.mjs.map +1 -1
- package/package.json +8 -8
|
@@ -4906,9 +4906,9 @@ function stringifyPrimitive(value) {
|
|
|
4906
4906
|
return `"${value}"`;
|
|
4907
4907
|
return `${value}`;
|
|
4908
4908
|
}
|
|
4909
|
-
function optionalKeys(
|
|
4910
|
-
return Object.keys(
|
|
4911
|
-
return
|
|
4909
|
+
function optionalKeys(shape2) {
|
|
4910
|
+
return Object.keys(shape2).filter((k) => {
|
|
4911
|
+
return shape2[k]._zod.optin === "optional" && shape2[k]._zod.optout === "optional";
|
|
4912
4912
|
});
|
|
4913
4913
|
}
|
|
4914
4914
|
function pick(schema, mask) {
|
|
@@ -4961,15 +4961,15 @@ function omit(schema, mask) {
|
|
|
4961
4961
|
});
|
|
4962
4962
|
return clone(schema, def);
|
|
4963
4963
|
}
|
|
4964
|
-
function extend(schema,
|
|
4965
|
-
if (!isPlainObject(
|
|
4964
|
+
function extend(schema, shape2) {
|
|
4965
|
+
if (!isPlainObject(shape2)) {
|
|
4966
4966
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
4967
4967
|
}
|
|
4968
4968
|
const checks = schema._zod.def.checks;
|
|
4969
4969
|
const hasChecks = checks && checks.length > 0;
|
|
4970
4970
|
if (hasChecks) {
|
|
4971
4971
|
const existingShape = schema._zod.def.shape;
|
|
4972
|
-
for (const key in
|
|
4972
|
+
for (const key in shape2) {
|
|
4973
4973
|
if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) {
|
|
4974
4974
|
throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
4975
4975
|
}
|
|
@@ -4977,20 +4977,20 @@ function extend(schema, shape) {
|
|
|
4977
4977
|
}
|
|
4978
4978
|
const def = mergeDefs(schema._zod.def, {
|
|
4979
4979
|
get shape() {
|
|
4980
|
-
const _shape = { ...schema._zod.def.shape, ...
|
|
4980
|
+
const _shape = { ...schema._zod.def.shape, ...shape2 };
|
|
4981
4981
|
assignProp(this, "shape", _shape);
|
|
4982
4982
|
return _shape;
|
|
4983
4983
|
}
|
|
4984
4984
|
});
|
|
4985
4985
|
return clone(schema, def);
|
|
4986
4986
|
}
|
|
4987
|
-
function safeExtend(schema,
|
|
4988
|
-
if (!isPlainObject(
|
|
4987
|
+
function safeExtend(schema, shape2) {
|
|
4988
|
+
if (!isPlainObject(shape2)) {
|
|
4989
4989
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
4990
4990
|
}
|
|
4991
4991
|
const def = mergeDefs(schema._zod.def, {
|
|
4992
4992
|
get shape() {
|
|
4993
|
-
const _shape = { ...schema._zod.def.shape, ...
|
|
4993
|
+
const _shape = { ...schema._zod.def.shape, ...shape2 };
|
|
4994
4994
|
assignProp(this, "shape", _shape);
|
|
4995
4995
|
return _shape;
|
|
4996
4996
|
}
|
|
@@ -5024,7 +5024,7 @@ function partial(Class2, schema, mask) {
|
|
|
5024
5024
|
const def = mergeDefs(schema._zod.def, {
|
|
5025
5025
|
get shape() {
|
|
5026
5026
|
const oldShape = schema._zod.def.shape;
|
|
5027
|
-
const
|
|
5027
|
+
const shape2 = { ...oldShape };
|
|
5028
5028
|
if (mask) {
|
|
5029
5029
|
for (const key in mask) {
|
|
5030
5030
|
if (!(key in oldShape)) {
|
|
@@ -5032,21 +5032,21 @@ function partial(Class2, schema, mask) {
|
|
|
5032
5032
|
}
|
|
5033
5033
|
if (!mask[key])
|
|
5034
5034
|
continue;
|
|
5035
|
-
|
|
5035
|
+
shape2[key] = Class2 ? new Class2({
|
|
5036
5036
|
type: "optional",
|
|
5037
5037
|
innerType: oldShape[key]
|
|
5038
5038
|
}) : oldShape[key];
|
|
5039
5039
|
}
|
|
5040
5040
|
} else {
|
|
5041
5041
|
for (const key in oldShape) {
|
|
5042
|
-
|
|
5042
|
+
shape2[key] = Class2 ? new Class2({
|
|
5043
5043
|
type: "optional",
|
|
5044
5044
|
innerType: oldShape[key]
|
|
5045
5045
|
}) : oldShape[key];
|
|
5046
5046
|
}
|
|
5047
5047
|
}
|
|
5048
|
-
assignProp(this, "shape",
|
|
5049
|
-
return
|
|
5048
|
+
assignProp(this, "shape", shape2);
|
|
5049
|
+
return shape2;
|
|
5050
5050
|
},
|
|
5051
5051
|
checks: []
|
|
5052
5052
|
});
|
|
@@ -5056,29 +5056,29 @@ function required(Class2, schema, mask) {
|
|
|
5056
5056
|
const def = mergeDefs(schema._zod.def, {
|
|
5057
5057
|
get shape() {
|
|
5058
5058
|
const oldShape = schema._zod.def.shape;
|
|
5059
|
-
const
|
|
5059
|
+
const shape2 = { ...oldShape };
|
|
5060
5060
|
if (mask) {
|
|
5061
5061
|
for (const key in mask) {
|
|
5062
|
-
if (!(key in
|
|
5062
|
+
if (!(key in shape2)) {
|
|
5063
5063
|
throw new Error(`Unrecognized key: "${key}"`);
|
|
5064
5064
|
}
|
|
5065
5065
|
if (!mask[key])
|
|
5066
5066
|
continue;
|
|
5067
|
-
|
|
5067
|
+
shape2[key] = new Class2({
|
|
5068
5068
|
type: "nonoptional",
|
|
5069
5069
|
innerType: oldShape[key]
|
|
5070
5070
|
});
|
|
5071
5071
|
}
|
|
5072
5072
|
} else {
|
|
5073
5073
|
for (const key in oldShape) {
|
|
5074
|
-
|
|
5074
|
+
shape2[key] = new Class2({
|
|
5075
5075
|
type: "nonoptional",
|
|
5076
5076
|
innerType: oldShape[key]
|
|
5077
5077
|
});
|
|
5078
5078
|
}
|
|
5079
5079
|
}
|
|
5080
|
-
assignProp(this, "shape",
|
|
5081
|
-
return
|
|
5080
|
+
assignProp(this, "shape", shape2);
|
|
5081
|
+
return shape2;
|
|
5082
5082
|
}
|
|
5083
5083
|
});
|
|
5084
5084
|
return clone(schema, def);
|
|
@@ -7373,10 +7373,10 @@ var init_schemas = __esm({
|
|
|
7373
7373
|
}
|
|
7374
7374
|
const _normalized = cached(() => normalizeDef(def));
|
|
7375
7375
|
defineLazy(inst._zod, "propValues", () => {
|
|
7376
|
-
const
|
|
7376
|
+
const shape2 = def.shape;
|
|
7377
7377
|
const propValues = {};
|
|
7378
|
-
for (const key in
|
|
7379
|
-
const field =
|
|
7378
|
+
for (const key in shape2) {
|
|
7379
|
+
const field = shape2[key]._zod;
|
|
7380
7380
|
if (field.values) {
|
|
7381
7381
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
7382
7382
|
for (const v of field.values)
|
|
@@ -7402,9 +7402,9 @@ var init_schemas = __esm({
|
|
|
7402
7402
|
}
|
|
7403
7403
|
payload.value = {};
|
|
7404
7404
|
const proms = [];
|
|
7405
|
-
const
|
|
7405
|
+
const shape2 = value.shape;
|
|
7406
7406
|
for (const key of value.keys) {
|
|
7407
|
-
const el =
|
|
7407
|
+
const el = shape2[key];
|
|
7408
7408
|
const isOptionalIn = el._zod.optin === "optional";
|
|
7409
7409
|
const isOptionalOut = el._zod.optout === "optional";
|
|
7410
7410
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
@@ -7424,7 +7424,7 @@ var init_schemas = __esm({
|
|
|
7424
7424
|
$ZodObject.init(inst, def);
|
|
7425
7425
|
const superParse = inst._zod.parse;
|
|
7426
7426
|
const _normalized = cached(() => normalizeDef(def));
|
|
7427
|
-
const generateFastpass = (
|
|
7427
|
+
const generateFastpass = (shape2) => {
|
|
7428
7428
|
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
7429
7429
|
const normalized = _normalized.value;
|
|
7430
7430
|
const parseStr = (key) => {
|
|
@@ -7441,7 +7441,7 @@ var init_schemas = __esm({
|
|
|
7441
7441
|
for (const key of normalized.keys) {
|
|
7442
7442
|
const id = ids[key];
|
|
7443
7443
|
const k = esc(key);
|
|
7444
|
-
const schema =
|
|
7444
|
+
const schema = shape2[key];
|
|
7445
7445
|
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
7446
7446
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
7447
7447
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
@@ -7515,7 +7515,7 @@ var init_schemas = __esm({
|
|
|
7515
7515
|
doc.write(`payload.value = newResult;`);
|
|
7516
7516
|
doc.write(`return payload;`);
|
|
7517
7517
|
const fn = doc.compile();
|
|
7518
|
-
return (payload, ctx) => fn(
|
|
7518
|
+
return (payload, ctx) => fn(shape2, payload, ctx);
|
|
7519
7519
|
};
|
|
7520
7520
|
let fastpass;
|
|
7521
7521
|
const isObject2 = isObject;
|
|
@@ -16573,14 +16573,14 @@ var init_json_schema_processors = __esm({
|
|
|
16573
16573
|
const def = schema._zod.def;
|
|
16574
16574
|
json2.type = "object";
|
|
16575
16575
|
json2.properties = {};
|
|
16576
|
-
const
|
|
16577
|
-
for (const key in
|
|
16578
|
-
json2.properties[key] = process2(
|
|
16576
|
+
const shape2 = def.shape;
|
|
16577
|
+
for (const key in shape2) {
|
|
16578
|
+
json2.properties[key] = process2(shape2[key], ctx, {
|
|
16579
16579
|
...params,
|
|
16580
16580
|
path: [...params.path, "properties", key]
|
|
16581
16581
|
});
|
|
16582
16582
|
}
|
|
16583
|
-
const allKeys = new Set(Object.keys(
|
|
16583
|
+
const allKeys = new Set(Object.keys(shape2));
|
|
16584
16584
|
const requiredKeys = new Set([...allKeys].filter((key) => {
|
|
16585
16585
|
const v = def.shape[key]._zod;
|
|
16586
16586
|
if (ctx.io === "input") {
|
|
@@ -17441,47 +17441,47 @@ function array(element, params) {
|
|
|
17441
17441
|
}
|
|
17442
17442
|
// @__NO_SIDE_EFFECTS__
|
|
17443
17443
|
function keyof(schema) {
|
|
17444
|
-
const
|
|
17445
|
-
return /* @__PURE__ */ _enum2(Object.keys(
|
|
17444
|
+
const shape2 = schema._zod.def.shape;
|
|
17445
|
+
return /* @__PURE__ */ _enum2(Object.keys(shape2));
|
|
17446
17446
|
}
|
|
17447
17447
|
// @__NO_SIDE_EFFECTS__
|
|
17448
|
-
function object(
|
|
17448
|
+
function object(shape2, params) {
|
|
17449
17449
|
const def = {
|
|
17450
17450
|
type: "object",
|
|
17451
|
-
shape:
|
|
17451
|
+
shape: shape2 ?? {},
|
|
17452
17452
|
...normalizeParams(params)
|
|
17453
17453
|
};
|
|
17454
17454
|
return new ZodMiniObject(def);
|
|
17455
17455
|
}
|
|
17456
17456
|
// @__NO_SIDE_EFFECTS__
|
|
17457
|
-
function strictObject(
|
|
17457
|
+
function strictObject(shape2, params) {
|
|
17458
17458
|
return new ZodMiniObject({
|
|
17459
17459
|
type: "object",
|
|
17460
|
-
shape,
|
|
17460
|
+
shape: shape2,
|
|
17461
17461
|
catchall: /* @__PURE__ */ never(),
|
|
17462
17462
|
...normalizeParams(params)
|
|
17463
17463
|
});
|
|
17464
17464
|
}
|
|
17465
17465
|
// @__NO_SIDE_EFFECTS__
|
|
17466
|
-
function looseObject(
|
|
17466
|
+
function looseObject(shape2, params) {
|
|
17467
17467
|
return new ZodMiniObject({
|
|
17468
17468
|
type: "object",
|
|
17469
|
-
shape,
|
|
17469
|
+
shape: shape2,
|
|
17470
17470
|
catchall: /* @__PURE__ */ unknown(),
|
|
17471
17471
|
...normalizeParams(params)
|
|
17472
17472
|
});
|
|
17473
17473
|
}
|
|
17474
17474
|
// @__NO_SIDE_EFFECTS__
|
|
17475
|
-
function extend2(schema,
|
|
17476
|
-
return extend(schema,
|
|
17475
|
+
function extend2(schema, shape2) {
|
|
17476
|
+
return extend(schema, shape2);
|
|
17477
17477
|
}
|
|
17478
17478
|
// @__NO_SIDE_EFFECTS__
|
|
17479
|
-
function safeExtend2(schema,
|
|
17480
|
-
return safeExtend(schema,
|
|
17479
|
+
function safeExtend2(schema, shape2) {
|
|
17480
|
+
return safeExtend(schema, shape2);
|
|
17481
17481
|
}
|
|
17482
17482
|
// @__NO_SIDE_EFFECTS__
|
|
17483
|
-
function merge2(schema,
|
|
17484
|
-
return extend(schema,
|
|
17483
|
+
function merge2(schema, shape2) {
|
|
17484
|
+
return extend(schema, shape2);
|
|
17485
17485
|
}
|
|
17486
17486
|
// @__NO_SIDE_EFFECTS__
|
|
17487
17487
|
function pick2(schema, mask) {
|
|
@@ -19519,7 +19519,7 @@ var version3;
|
|
|
19519
19519
|
var init_version2 = __esm({
|
|
19520
19520
|
"node_modules/viem/_esm/errors/version.js"() {
|
|
19521
19521
|
"use strict";
|
|
19522
|
-
version3 = "2.54.
|
|
19522
|
+
version3 = "2.54.6";
|
|
19523
19523
|
}
|
|
19524
19524
|
});
|
|
19525
19525
|
|
|
@@ -20514,14 +20514,14 @@ function fromResponse2(response) {
|
|
|
20514
20514
|
throw new Error(`Missing ${Headers.paymentReceipt} header.`);
|
|
20515
20515
|
return deserialize4(header);
|
|
20516
20516
|
}
|
|
20517
|
-
var Schema2;
|
|
20517
|
+
var shape, BaseSchema, Schema2;
|
|
20518
20518
|
var init_Receipt = __esm({
|
|
20519
20519
|
"node_modules/mppx/dist/Receipt.js"() {
|
|
20520
20520
|
"use strict";
|
|
20521
20521
|
init_esm2();
|
|
20522
20522
|
init_Constants();
|
|
20523
20523
|
init_zod();
|
|
20524
|
-
|
|
20524
|
+
shape = {
|
|
20525
20525
|
/** Payment method used (e.g., "tempo", "stripe"). */
|
|
20526
20526
|
method: string2(),
|
|
20527
20527
|
/** Method-specific reference (e.g., transaction hash). */
|
|
@@ -20534,7 +20534,9 @@ var init_Receipt = __esm({
|
|
|
20534
20534
|
status: literal("success"),
|
|
20535
20535
|
/** RFC 3339 settlement timestamp. */
|
|
20536
20536
|
timestamp: datetime3()
|
|
20537
|
-
}
|
|
20537
|
+
};
|
|
20538
|
+
BaseSchema = object(shape);
|
|
20539
|
+
Schema2 = looseObject(shape);
|
|
20538
20540
|
}
|
|
20539
20541
|
});
|
|
20540
20542
|
|