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