@stripe/extensibility-sdk 0.25.0 → 0.26.0
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 +1 -28
- package/dist/config-values/generate.cjs +1 -1
- package/dist/config-values/generate.js +1 -1
- package/dist/extensibility-sdk-alpha.d.ts +2 -61
- package/dist/extensibility-sdk-beta.d.ts +2 -61
- package/dist/extensibility-sdk-extensions-internal.d.ts +1 -1
- package/dist/extensibility-sdk-internal.d.ts +6 -43
- package/dist/extensibility-sdk-public.d.ts +2 -61
- package/dist/extensibility-sdk-stdlib-alpha.d.ts +2 -61
- package/dist/extensibility-sdk-stdlib-beta.d.ts +2 -61
- package/dist/extensibility-sdk-stdlib-internal.d.ts +6 -43
- package/dist/extensibility-sdk-stdlib-public.d.ts +2 -61
- package/dist/index.cjs +25 -41
- package/dist/index.js +23 -36
- package/dist/stdlib/decimal.d.ts +1 -1
- package/dist/stdlib/index.cjs +25 -41
- package/dist/stdlib/index.d.ts +3 -3
- package/dist/stdlib/index.d.ts.map +1 -1
- package/dist/stdlib/index.js +23 -36
- package/dist/stdlib/refs.d.ts +1 -23
- package/dist/stdlib/refs.d.ts.map +1 -1
- package/dist/stdlib/scalars.d.ts +0 -18
- package/dist/stdlib/scalars.d.ts.map +1 -1
- package/dist/stdlib/transforms.d.ts +1 -1
- package/dist/stdlib/types.d.ts +5 -5
- package/dist/stdlib/types.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/stdlib/index.cjs
CHANGED
|
@@ -26,10 +26,6 @@ __export(stdlib_exports, {
|
|
|
26
26
|
Integer: () => Integer,
|
|
27
27
|
PositiveInteger: () => PositiveInteger,
|
|
28
28
|
Ref: () => Ref,
|
|
29
|
-
StreetAddress: () => StreetAddress,
|
|
30
|
-
Timestamp: () => Timestamp,
|
|
31
|
-
WireReadError: () => WireReadError,
|
|
32
|
-
WireWriteError: () => WireWriteError,
|
|
33
29
|
_ConfigEnum: () => _ConfigEnum,
|
|
34
30
|
_JsonWireToType: () => _JsonWireToType,
|
|
35
31
|
_ProtoEnum: () => _ProtoEnum,
|
|
@@ -37,6 +33,8 @@ __export(stdlib_exports, {
|
|
|
37
33
|
_ShapeDescriptor: () => _ShapeDescriptor,
|
|
38
34
|
_TypeToProtoWire: () => _TypeToProtoWire,
|
|
39
35
|
_UnionDescriptor: () => _UnionDescriptor,
|
|
36
|
+
_WireReadError: () => _WireReadError,
|
|
37
|
+
_WireWriteError: () => _WireWriteError,
|
|
40
38
|
_apply: () => _apply,
|
|
41
39
|
_applyConfig: () => _applyConfig,
|
|
42
40
|
_applyIncoming: () => _applyIncoming,
|
|
@@ -52,7 +50,6 @@ __export(stdlib_exports, {
|
|
|
52
50
|
_translateMap: () => _translateMap,
|
|
53
51
|
_translateShape: () => _translateShape,
|
|
54
52
|
_translateUnion: () => _translateUnion,
|
|
55
|
-
isDecimal: () => isDecimal,
|
|
56
53
|
toConst: () => toConst
|
|
57
54
|
});
|
|
58
55
|
module.exports = __toCommonJS(stdlib_exports);
|
|
@@ -1161,16 +1158,6 @@ var PositiveInteger = {
|
|
|
1161
1158
|
return normalized;
|
|
1162
1159
|
}
|
|
1163
1160
|
};
|
|
1164
|
-
var StreetAddress = {
|
|
1165
|
-
create: (address) => {
|
|
1166
|
-
return address;
|
|
1167
|
-
}
|
|
1168
|
-
};
|
|
1169
|
-
var Timestamp = {
|
|
1170
|
-
create: (value) => {
|
|
1171
|
-
return value;
|
|
1172
|
-
}
|
|
1173
|
-
};
|
|
1174
1161
|
|
|
1175
1162
|
// src/stdlib/refs.ts
|
|
1176
1163
|
var Ref = {
|
|
@@ -1183,19 +1170,19 @@ var Ref = {
|
|
|
1183
1170
|
};
|
|
1184
1171
|
|
|
1185
1172
|
// src/stdlib/types.ts
|
|
1186
|
-
var
|
|
1173
|
+
var _WireReadError = class extends Error {
|
|
1187
1174
|
/**
|
|
1188
1175
|
* Error class name for `instanceof`-free identification.
|
|
1189
1176
|
* @internal
|
|
1190
1177
|
*/
|
|
1191
|
-
name = "
|
|
1178
|
+
name = "_WireReadError";
|
|
1192
1179
|
};
|
|
1193
|
-
var
|
|
1180
|
+
var _WireWriteError = class extends Error {
|
|
1194
1181
|
/**
|
|
1195
1182
|
* Error class name for `instanceof`-free identification.
|
|
1196
1183
|
* @internal
|
|
1197
1184
|
*/
|
|
1198
|
-
name = "
|
|
1185
|
+
name = "_WireWriteError";
|
|
1199
1186
|
};
|
|
1200
1187
|
var WireParseError = class extends Error {
|
|
1201
1188
|
name = "WireParseError";
|
|
@@ -1402,7 +1389,7 @@ function enumLookup(spec, value, direction) {
|
|
|
1402
1389
|
var _ProtoWireToType = {
|
|
1403
1390
|
_brand: "ProtoWireToType",
|
|
1404
1391
|
createNotObjectError(loc, received) {
|
|
1405
|
-
return new
|
|
1392
|
+
return new _WireReadError(`${loc}: Expected an object but received ${received}`);
|
|
1406
1393
|
},
|
|
1407
1394
|
applyField(typeName, desc, input, strategy) {
|
|
1408
1395
|
const from = desc.wire ?? desc.type;
|
|
@@ -1412,7 +1399,7 @@ var _ProtoWireToType = {
|
|
|
1412
1399
|
return [to, (desc.transform ?? _identity)(strategy, raw)];
|
|
1413
1400
|
} catch (e) {
|
|
1414
1401
|
if (e instanceof WireParseError)
|
|
1415
|
-
throw new
|
|
1402
|
+
throw new _WireReadError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1416
1403
|
throw e;
|
|
1417
1404
|
}
|
|
1418
1405
|
},
|
|
@@ -1467,7 +1454,7 @@ var _ProtoWireToType = {
|
|
|
1467
1454
|
}
|
|
1468
1455
|
}
|
|
1469
1456
|
const loc = descriptor.typeName || "union";
|
|
1470
|
-
throw new
|
|
1457
|
+
throw new _WireReadError(`${loc}: No variant set`);
|
|
1471
1458
|
},
|
|
1472
1459
|
applyOneofField(typeName, oneof, input, strategy, result, excludeWireKeys) {
|
|
1473
1460
|
applyOneofFieldIncoming(typeName, oneof, input, strategy, result, excludeWireKeys);
|
|
@@ -1476,7 +1463,7 @@ var _ProtoWireToType = {
|
|
|
1476
1463
|
var _TypeToProtoWire = {
|
|
1477
1464
|
_brand: "TypeToProtoWire",
|
|
1478
1465
|
createNotObjectError(loc, received) {
|
|
1479
|
-
return new
|
|
1466
|
+
return new _WireWriteError(`${loc}: Expected an object but received ${received}`);
|
|
1480
1467
|
},
|
|
1481
1468
|
applyField(typeName, desc, input, strategy) {
|
|
1482
1469
|
const from = desc.type;
|
|
@@ -1486,7 +1473,7 @@ var _TypeToProtoWire = {
|
|
|
1486
1473
|
return [to, (desc.transform ?? _identity)(strategy, raw)];
|
|
1487
1474
|
} catch (e) {
|
|
1488
1475
|
if (e instanceof WireParseError)
|
|
1489
|
-
throw new
|
|
1476
|
+
throw new _WireWriteError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1490
1477
|
throw e;
|
|
1491
1478
|
}
|
|
1492
1479
|
},
|
|
@@ -1526,20 +1513,20 @@ var _TypeToProtoWire = {
|
|
|
1526
1513
|
const discriminant = sdk[descriptor.discriminantFieldName];
|
|
1527
1514
|
if (typeof discriminant !== "string") {
|
|
1528
1515
|
const loc = descriptor.typeName || "union";
|
|
1529
|
-
throw new
|
|
1516
|
+
throw new _WireWriteError(
|
|
1530
1517
|
`${loc}: Expected a string '${descriptor.discriminantFieldName}' discriminant but received ${discriminant === void 0 ? "undefined" : typeof discriminant}`
|
|
1531
1518
|
);
|
|
1532
1519
|
}
|
|
1533
1520
|
if (discriminant === "other") {
|
|
1534
1521
|
const loc = descriptor.typeName || "union";
|
|
1535
|
-
throw new
|
|
1522
|
+
throw new _WireWriteError(
|
|
1536
1523
|
`${loc}: Cannot serialize 'other' variant back to wire format`
|
|
1537
1524
|
);
|
|
1538
1525
|
}
|
|
1539
1526
|
const branch = descriptor.branches.find((b) => b.typeKey === discriminant);
|
|
1540
1527
|
if (!branch) {
|
|
1541
1528
|
const loc = descriptor.typeName || "union";
|
|
1542
|
-
throw new
|
|
1529
|
+
throw new _WireWriteError(`${loc}: Unknown variant '${discriminant}'`);
|
|
1543
1530
|
}
|
|
1544
1531
|
const branchData = _apply(
|
|
1545
1532
|
new _ShapeDescriptor(descriptor.typeName, branch.shape),
|
|
@@ -1568,7 +1555,7 @@ function _configAppContextFromContext(ctx) {
|
|
|
1568
1555
|
var _JsonWireToType = {
|
|
1569
1556
|
_brand: "JsonWireToType",
|
|
1570
1557
|
createNotObjectError(loc, received) {
|
|
1571
|
-
return new
|
|
1558
|
+
return new _WireReadError(`${loc}: Expected an object but received ${received}`);
|
|
1572
1559
|
},
|
|
1573
1560
|
applyField(typeName, desc, input, strategy) {
|
|
1574
1561
|
const key = desc.type;
|
|
@@ -1577,7 +1564,7 @@ var _JsonWireToType = {
|
|
|
1577
1564
|
return [key, (desc.transform ?? _identity)(strategy, raw)];
|
|
1578
1565
|
} catch (e) {
|
|
1579
1566
|
if (e instanceof WireParseError)
|
|
1580
|
-
throw new
|
|
1567
|
+
throw new _WireReadError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1581
1568
|
throw e;
|
|
1582
1569
|
}
|
|
1583
1570
|
},
|
|
@@ -1632,7 +1619,7 @@ function applyOneofFieldIncoming(typeName, oneof, input, strategy, result, exclu
|
|
|
1632
1619
|
}
|
|
1633
1620
|
} catch (e) {
|
|
1634
1621
|
if (e instanceof WireParseError) {
|
|
1635
|
-
throw new
|
|
1622
|
+
throw new _WireReadError(
|
|
1636
1623
|
`${typeName}.${oneof.discriminant}(${branch.typeKey}): ${e.message}`
|
|
1637
1624
|
);
|
|
1638
1625
|
}
|
|
@@ -1650,30 +1637,30 @@ function applyOneofFieldIncoming(typeName, oneof, input, strategy, result, exclu
|
|
|
1650
1637
|
}
|
|
1651
1638
|
}
|
|
1652
1639
|
if (!oneof.optional) {
|
|
1653
|
-
throw new
|
|
1640
|
+
throw new _WireReadError(`${typeName}.${oneof.discriminant}: no variant set`);
|
|
1654
1641
|
}
|
|
1655
1642
|
}
|
|
1656
1643
|
function applyOneofFieldOutgoing(typeName, oneof, input, strategy, result) {
|
|
1657
1644
|
const discriminant = Object.hasOwn(input, oneof.discriminant) ? input[oneof.discriminant] : void 0;
|
|
1658
1645
|
if (discriminant === void 0 || discriminant === null) {
|
|
1659
1646
|
if (!oneof.optional) {
|
|
1660
|
-
throw new
|
|
1647
|
+
throw new _WireWriteError(`${typeName}.${oneof.discriminant}: no variant set`);
|
|
1661
1648
|
}
|
|
1662
1649
|
return;
|
|
1663
1650
|
}
|
|
1664
1651
|
if (typeof discriminant !== "string") {
|
|
1665
|
-
throw new
|
|
1652
|
+
throw new _WireWriteError(
|
|
1666
1653
|
`${typeName}.${oneof.discriminant}: expected string discriminant but received ${typeof discriminant}`
|
|
1667
1654
|
);
|
|
1668
1655
|
}
|
|
1669
1656
|
if (discriminant === "other") {
|
|
1670
|
-
throw new
|
|
1657
|
+
throw new _WireWriteError(
|
|
1671
1658
|
`${typeName}.${oneof.discriminant}: cannot serialize 'other' variant back to wire format`
|
|
1672
1659
|
);
|
|
1673
1660
|
}
|
|
1674
1661
|
const branch = oneof.branches.find((b) => b.typeKey === discriminant);
|
|
1675
1662
|
if (!branch) {
|
|
1676
|
-
throw new
|
|
1663
|
+
throw new _WireWriteError(
|
|
1677
1664
|
`${typeName}.${oneof.discriminant}: unknown variant '${discriminant}'`
|
|
1678
1665
|
);
|
|
1679
1666
|
}
|
|
@@ -1683,7 +1670,7 @@ function applyOneofFieldOutgoing(typeName, oneof, input, strategy, result) {
|
|
|
1683
1670
|
result[branch.wireKey] = transformed ?? {};
|
|
1684
1671
|
} catch (e) {
|
|
1685
1672
|
if (e instanceof WireParseError) {
|
|
1686
|
-
throw new
|
|
1673
|
+
throw new _WireWriteError(
|
|
1687
1674
|
`${typeName}.${oneof.discriminant}(${branch.typeKey}): ${e.message}`
|
|
1688
1675
|
);
|
|
1689
1676
|
}
|
|
@@ -1739,10 +1726,6 @@ function toConst(value) {
|
|
|
1739
1726
|
Integer,
|
|
1740
1727
|
PositiveInteger,
|
|
1741
1728
|
Ref,
|
|
1742
|
-
StreetAddress,
|
|
1743
|
-
Timestamp,
|
|
1744
|
-
WireReadError,
|
|
1745
|
-
WireWriteError,
|
|
1746
1729
|
_ConfigEnum,
|
|
1747
1730
|
_JsonWireToType,
|
|
1748
1731
|
_ProtoEnum,
|
|
@@ -1750,6 +1733,8 @@ function toConst(value) {
|
|
|
1750
1733
|
_ShapeDescriptor,
|
|
1751
1734
|
_TypeToProtoWire,
|
|
1752
1735
|
_UnionDescriptor,
|
|
1736
|
+
_WireReadError,
|
|
1737
|
+
_WireWriteError,
|
|
1753
1738
|
_apply,
|
|
1754
1739
|
_applyConfig,
|
|
1755
1740
|
_applyIncoming,
|
|
@@ -1765,6 +1750,5 @@ function toConst(value) {
|
|
|
1765
1750
|
_translateMap,
|
|
1766
1751
|
_translateShape,
|
|
1767
1752
|
_translateUnion,
|
|
1768
|
-
isDecimal,
|
|
1769
1753
|
toConst
|
|
1770
1754
|
});
|
package/dist/stdlib/index.d.ts
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { __brand, __stripeType } from './brand.js';
|
|
9
9
|
export type { BrandSymbol, StripeTypeSymbol } from './brand.js';
|
|
10
|
-
export { Integer, PositiveInteger, __positiveIntegerBrand
|
|
10
|
+
export { Integer, PositiveInteger, __positiveIntegerBrand } from './scalars.js';
|
|
11
11
|
export type { IntegerRoundDirection, IntegerCompanion, PositiveIntegerCompanion, } from './scalars.js';
|
|
12
12
|
export { Ref } from './refs.js';
|
|
13
13
|
export type { ExtractObjectTag } from './type-utils.js';
|
|
14
|
-
export { __decimalBrand, Decimal, DecimalRoundingPresets,
|
|
14
|
+
export { __decimalBrand, Decimal, DecimalRoundingPresets, DEFAULT_DIV_PRECISION, } from './decimal.js';
|
|
15
15
|
export type { RoundDirection, DecimalRoundingOptions, DecimalLike, DecimalCompanion, } from './decimal.js';
|
|
16
|
-
export {
|
|
16
|
+
export { _WireReadError, _WireWriteError, _ShapeDescriptor, _UnionDescriptor, _ProtoEnum, _ConfigEnum, _isPromiseLike, } from './types.js';
|
|
17
17
|
export type { _EnumSpec, _FieldTransformer, _FieldDescriptor, _UnionBranchDescriptor, _OneofBranchDescriptor, _OneofFieldDescriptor, _ApplyStrategy, _ProtoWireToTypeStrategy, _TypeToProtoWireStrategy, _JsonWireToTypeStrategy, } from './types.js';
|
|
18
18
|
export { _ProtoWireToType, _TypeToProtoWire, _JsonWireToType, _applyIncoming, _applyOutgoing, _applyConfig, _configAppContextFromContext, } from './transform-strategies.js';
|
|
19
19
|
export type { _ConfigApplicationContext } from './transform-strategies.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stdlib/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stdlib/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAChF,YAAY,EACV,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,cAAc,EACd,OAAO,EACP,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EACL,MAAM,EACN,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,aAAa,GACd,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/stdlib/index.js
CHANGED
|
@@ -1102,16 +1102,6 @@ var PositiveInteger = {
|
|
|
1102
1102
|
return normalized;
|
|
1103
1103
|
}
|
|
1104
1104
|
};
|
|
1105
|
-
var StreetAddress = {
|
|
1106
|
-
create: (address) => {
|
|
1107
|
-
return address;
|
|
1108
|
-
}
|
|
1109
|
-
};
|
|
1110
|
-
var Timestamp = {
|
|
1111
|
-
create: (value) => {
|
|
1112
|
-
return value;
|
|
1113
|
-
}
|
|
1114
|
-
};
|
|
1115
1105
|
|
|
1116
1106
|
// src/stdlib/refs.ts
|
|
1117
1107
|
var Ref = {
|
|
@@ -1124,19 +1114,19 @@ var Ref = {
|
|
|
1124
1114
|
};
|
|
1125
1115
|
|
|
1126
1116
|
// src/stdlib/types.ts
|
|
1127
|
-
var
|
|
1117
|
+
var _WireReadError = class extends Error {
|
|
1128
1118
|
/**
|
|
1129
1119
|
* Error class name for `instanceof`-free identification.
|
|
1130
1120
|
* @internal
|
|
1131
1121
|
*/
|
|
1132
|
-
name = "
|
|
1122
|
+
name = "_WireReadError";
|
|
1133
1123
|
};
|
|
1134
|
-
var
|
|
1124
|
+
var _WireWriteError = class extends Error {
|
|
1135
1125
|
/**
|
|
1136
1126
|
* Error class name for `instanceof`-free identification.
|
|
1137
1127
|
* @internal
|
|
1138
1128
|
*/
|
|
1139
|
-
name = "
|
|
1129
|
+
name = "_WireWriteError";
|
|
1140
1130
|
};
|
|
1141
1131
|
var WireParseError = class extends Error {
|
|
1142
1132
|
name = "WireParseError";
|
|
@@ -1343,7 +1333,7 @@ function enumLookup(spec, value, direction) {
|
|
|
1343
1333
|
var _ProtoWireToType = {
|
|
1344
1334
|
_brand: "ProtoWireToType",
|
|
1345
1335
|
createNotObjectError(loc, received) {
|
|
1346
|
-
return new
|
|
1336
|
+
return new _WireReadError(`${loc}: Expected an object but received ${received}`);
|
|
1347
1337
|
},
|
|
1348
1338
|
applyField(typeName, desc, input, strategy) {
|
|
1349
1339
|
const from = desc.wire ?? desc.type;
|
|
@@ -1353,7 +1343,7 @@ var _ProtoWireToType = {
|
|
|
1353
1343
|
return [to, (desc.transform ?? _identity)(strategy, raw)];
|
|
1354
1344
|
} catch (e) {
|
|
1355
1345
|
if (e instanceof WireParseError)
|
|
1356
|
-
throw new
|
|
1346
|
+
throw new _WireReadError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1357
1347
|
throw e;
|
|
1358
1348
|
}
|
|
1359
1349
|
},
|
|
@@ -1408,7 +1398,7 @@ var _ProtoWireToType = {
|
|
|
1408
1398
|
}
|
|
1409
1399
|
}
|
|
1410
1400
|
const loc = descriptor.typeName || "union";
|
|
1411
|
-
throw new
|
|
1401
|
+
throw new _WireReadError(`${loc}: No variant set`);
|
|
1412
1402
|
},
|
|
1413
1403
|
applyOneofField(typeName, oneof, input, strategy, result, excludeWireKeys) {
|
|
1414
1404
|
applyOneofFieldIncoming(typeName, oneof, input, strategy, result, excludeWireKeys);
|
|
@@ -1417,7 +1407,7 @@ var _ProtoWireToType = {
|
|
|
1417
1407
|
var _TypeToProtoWire = {
|
|
1418
1408
|
_brand: "TypeToProtoWire",
|
|
1419
1409
|
createNotObjectError(loc, received) {
|
|
1420
|
-
return new
|
|
1410
|
+
return new _WireWriteError(`${loc}: Expected an object but received ${received}`);
|
|
1421
1411
|
},
|
|
1422
1412
|
applyField(typeName, desc, input, strategy) {
|
|
1423
1413
|
const from = desc.type;
|
|
@@ -1427,7 +1417,7 @@ var _TypeToProtoWire = {
|
|
|
1427
1417
|
return [to, (desc.transform ?? _identity)(strategy, raw)];
|
|
1428
1418
|
} catch (e) {
|
|
1429
1419
|
if (e instanceof WireParseError)
|
|
1430
|
-
throw new
|
|
1420
|
+
throw new _WireWriteError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1431
1421
|
throw e;
|
|
1432
1422
|
}
|
|
1433
1423
|
},
|
|
@@ -1467,20 +1457,20 @@ var _TypeToProtoWire = {
|
|
|
1467
1457
|
const discriminant = sdk[descriptor.discriminantFieldName];
|
|
1468
1458
|
if (typeof discriminant !== "string") {
|
|
1469
1459
|
const loc = descriptor.typeName || "union";
|
|
1470
|
-
throw new
|
|
1460
|
+
throw new _WireWriteError(
|
|
1471
1461
|
`${loc}: Expected a string '${descriptor.discriminantFieldName}' discriminant but received ${discriminant === void 0 ? "undefined" : typeof discriminant}`
|
|
1472
1462
|
);
|
|
1473
1463
|
}
|
|
1474
1464
|
if (discriminant === "other") {
|
|
1475
1465
|
const loc = descriptor.typeName || "union";
|
|
1476
|
-
throw new
|
|
1466
|
+
throw new _WireWriteError(
|
|
1477
1467
|
`${loc}: Cannot serialize 'other' variant back to wire format`
|
|
1478
1468
|
);
|
|
1479
1469
|
}
|
|
1480
1470
|
const branch = descriptor.branches.find((b) => b.typeKey === discriminant);
|
|
1481
1471
|
if (!branch) {
|
|
1482
1472
|
const loc = descriptor.typeName || "union";
|
|
1483
|
-
throw new
|
|
1473
|
+
throw new _WireWriteError(`${loc}: Unknown variant '${discriminant}'`);
|
|
1484
1474
|
}
|
|
1485
1475
|
const branchData = _apply(
|
|
1486
1476
|
new _ShapeDescriptor(descriptor.typeName, branch.shape),
|
|
@@ -1509,7 +1499,7 @@ function _configAppContextFromContext(ctx) {
|
|
|
1509
1499
|
var _JsonWireToType = {
|
|
1510
1500
|
_brand: "JsonWireToType",
|
|
1511
1501
|
createNotObjectError(loc, received) {
|
|
1512
|
-
return new
|
|
1502
|
+
return new _WireReadError(`${loc}: Expected an object but received ${received}`);
|
|
1513
1503
|
},
|
|
1514
1504
|
applyField(typeName, desc, input, strategy) {
|
|
1515
1505
|
const key = desc.type;
|
|
@@ -1518,7 +1508,7 @@ var _JsonWireToType = {
|
|
|
1518
1508
|
return [key, (desc.transform ?? _identity)(strategy, raw)];
|
|
1519
1509
|
} catch (e) {
|
|
1520
1510
|
if (e instanceof WireParseError)
|
|
1521
|
-
throw new
|
|
1511
|
+
throw new _WireReadError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1522
1512
|
throw e;
|
|
1523
1513
|
}
|
|
1524
1514
|
},
|
|
@@ -1573,7 +1563,7 @@ function applyOneofFieldIncoming(typeName, oneof, input, strategy, result, exclu
|
|
|
1573
1563
|
}
|
|
1574
1564
|
} catch (e) {
|
|
1575
1565
|
if (e instanceof WireParseError) {
|
|
1576
|
-
throw new
|
|
1566
|
+
throw new _WireReadError(
|
|
1577
1567
|
`${typeName}.${oneof.discriminant}(${branch.typeKey}): ${e.message}`
|
|
1578
1568
|
);
|
|
1579
1569
|
}
|
|
@@ -1591,30 +1581,30 @@ function applyOneofFieldIncoming(typeName, oneof, input, strategy, result, exclu
|
|
|
1591
1581
|
}
|
|
1592
1582
|
}
|
|
1593
1583
|
if (!oneof.optional) {
|
|
1594
|
-
throw new
|
|
1584
|
+
throw new _WireReadError(`${typeName}.${oneof.discriminant}: no variant set`);
|
|
1595
1585
|
}
|
|
1596
1586
|
}
|
|
1597
1587
|
function applyOneofFieldOutgoing(typeName, oneof, input, strategy, result) {
|
|
1598
1588
|
const discriminant = Object.hasOwn(input, oneof.discriminant) ? input[oneof.discriminant] : void 0;
|
|
1599
1589
|
if (discriminant === void 0 || discriminant === null) {
|
|
1600
1590
|
if (!oneof.optional) {
|
|
1601
|
-
throw new
|
|
1591
|
+
throw new _WireWriteError(`${typeName}.${oneof.discriminant}: no variant set`);
|
|
1602
1592
|
}
|
|
1603
1593
|
return;
|
|
1604
1594
|
}
|
|
1605
1595
|
if (typeof discriminant !== "string") {
|
|
1606
|
-
throw new
|
|
1596
|
+
throw new _WireWriteError(
|
|
1607
1597
|
`${typeName}.${oneof.discriminant}: expected string discriminant but received ${typeof discriminant}`
|
|
1608
1598
|
);
|
|
1609
1599
|
}
|
|
1610
1600
|
if (discriminant === "other") {
|
|
1611
|
-
throw new
|
|
1601
|
+
throw new _WireWriteError(
|
|
1612
1602
|
`${typeName}.${oneof.discriminant}: cannot serialize 'other' variant back to wire format`
|
|
1613
1603
|
);
|
|
1614
1604
|
}
|
|
1615
1605
|
const branch = oneof.branches.find((b) => b.typeKey === discriminant);
|
|
1616
1606
|
if (!branch) {
|
|
1617
|
-
throw new
|
|
1607
|
+
throw new _WireWriteError(
|
|
1618
1608
|
`${typeName}.${oneof.discriminant}: unknown variant '${discriminant}'`
|
|
1619
1609
|
);
|
|
1620
1610
|
}
|
|
@@ -1624,7 +1614,7 @@ function applyOneofFieldOutgoing(typeName, oneof, input, strategy, result) {
|
|
|
1624
1614
|
result[branch.wireKey] = transformed ?? {};
|
|
1625
1615
|
} catch (e) {
|
|
1626
1616
|
if (e instanceof WireParseError) {
|
|
1627
|
-
throw new
|
|
1617
|
+
throw new _WireWriteError(
|
|
1628
1618
|
`${typeName}.${oneof.discriminant}(${branch.typeKey}): ${e.message}`
|
|
1629
1619
|
);
|
|
1630
1620
|
}
|
|
@@ -1679,10 +1669,6 @@ export {
|
|
|
1679
1669
|
Integer,
|
|
1680
1670
|
PositiveInteger,
|
|
1681
1671
|
Ref,
|
|
1682
|
-
StreetAddress,
|
|
1683
|
-
Timestamp,
|
|
1684
|
-
WireReadError,
|
|
1685
|
-
WireWriteError,
|
|
1686
1672
|
_ConfigEnum,
|
|
1687
1673
|
_JsonWireToType,
|
|
1688
1674
|
_ProtoEnum,
|
|
@@ -1690,6 +1676,8 @@ export {
|
|
|
1690
1676
|
_ShapeDescriptor,
|
|
1691
1677
|
_TypeToProtoWire,
|
|
1692
1678
|
_UnionDescriptor,
|
|
1679
|
+
_WireReadError,
|
|
1680
|
+
_WireWriteError,
|
|
1693
1681
|
_apply,
|
|
1694
1682
|
_applyConfig,
|
|
1695
1683
|
_applyIncoming,
|
|
@@ -1705,6 +1693,5 @@ export {
|
|
|
1705
1693
|
_translateMap,
|
|
1706
1694
|
_translateShape,
|
|
1707
1695
|
_translateUnion,
|
|
1708
|
-
isDecimal,
|
|
1709
1696
|
toConst
|
|
1710
1697
|
};
|
package/dist/stdlib/refs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type __brand, type __stripeType
|
|
1
|
+
import { type __brand, type __stripeType } from './brand.js';
|
|
2
2
|
import type { ExtractObjectTag } from './type-utils.js';
|
|
3
3
|
/**
|
|
4
4
|
* Object reference — a typed pointer to another API resource.
|
|
@@ -37,26 +37,4 @@ export declare const Ref: {
|
|
|
37
37
|
readonly id: string;
|
|
38
38
|
}) => Ref<T>;
|
|
39
39
|
};
|
|
40
|
-
/**
|
|
41
|
-
* A paginated list of references to objects of type T.
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
export type PaginatedRefList<T extends {
|
|
46
|
-
readonly object: string;
|
|
47
|
-
} = {
|
|
48
|
-
readonly object: string;
|
|
49
|
-
}> = Ref<T>[] & {
|
|
50
|
-
readonly [__brand]: 'PaginatedRefList';
|
|
51
|
-
readonly __type?: T;
|
|
52
|
-
readonly [__stripeType]: `list<${Ref<T>[StripeTypeSymbol]}>`;
|
|
53
|
-
};
|
|
54
|
-
/** Factory for creating {@link PaginatedRefList} values from an array of {@link Ref} items. @public */
|
|
55
|
-
export declare const PaginatedRefList: {
|
|
56
|
-
create: <T extends {
|
|
57
|
-
readonly object: string;
|
|
58
|
-
} = {
|
|
59
|
-
readonly object: string;
|
|
60
|
-
}>(items?: Ref<T>[]) => PaginatedRefList<T>;
|
|
61
|
-
};
|
|
62
40
|
//# sourceMappingURL=refs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../src/stdlib/refs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../src/stdlib/refs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,IAAI;IACrF,4EAA4E;IAC5E,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC1B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG;IACF,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC;CACnC,CAAC;AAEF,2GAA2G;AAC3G,eAAO,MAAM,GAAG;aACL,CAAC,SAAS;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,QACtC,CAAC,GAAG;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,KAChC,GAAG,CAAC,CAAC,CAAC;CAOV,CAAC"}
|
package/dist/stdlib/scalars.d.ts
CHANGED
|
@@ -98,22 +98,4 @@ export interface PositiveIntegerCompanion {
|
|
|
98
98
|
}
|
|
99
99
|
/** Factory, type guard, and utilities for {@link (PositiveInteger:type)} branded values. @public */
|
|
100
100
|
export declare const PositiveInteger: PositiveIntegerCompanion;
|
|
101
|
-
/** A branded string representing a street address. @public */
|
|
102
|
-
export type StreetAddress = string & {
|
|
103
|
-
readonly [__brand]: 'StreetAddress';
|
|
104
|
-
readonly [__stripeType]: 'string';
|
|
105
|
-
};
|
|
106
|
-
/** Factory for creating {@link (StreetAddress:type)} branded values. @public */
|
|
107
|
-
export declare const StreetAddress: {
|
|
108
|
-
create: (address: string) => StreetAddress;
|
|
109
|
-
};
|
|
110
|
-
/** A branded string representing an ISO 8601 datetime. @public */
|
|
111
|
-
export type Timestamp = string & {
|
|
112
|
-
readonly [__brand]: 'Timestamp';
|
|
113
|
-
readonly [__stripeType]: 'string';
|
|
114
|
-
};
|
|
115
|
-
/** Factory for creating {@link (Timestamp:type)} branded values. @public */
|
|
116
|
-
export declare const Timestamp: {
|
|
117
|
-
create: (value: string) => Timestamp;
|
|
118
|
-
};
|
|
119
101
|
//# sourceMappingURL=scalars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalars.d.ts","sourceRoot":"","sources":["../../src/stdlib/scalars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OA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AC;IACX,gDAAgD;IAChD,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IACnC,4FAA4F;IAC5F,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAAC;IACrD,kEAAkE;IAClE,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,eAAe,CAAC;CACpE;AAED,4FAA4F;AAC5F,eAAO,MAAM,OAAO,EAAE,gBAgKrB,CAAC;AAEF,cAAc;AACd,MAAM,WAAW,wBAAwB;IACvC,+EAA+E;IAC/E,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAAC;IAC7C,+EAA+E;IAC/E,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,eAAe,CAAC;IACzD,gGAAgG;IAChG,IAAI,CACF,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,EAC1C,QAAQ,EAAE,qBAAqB,GAC9B,eAAe,CAAC;CACpB;AAED,oGAAoG;AACpG,eAAO,MAAM,eAAe,EAAE,wBAoE7B,CAAC"}
|
|
@@ -31,7 +31,7 @@ export declare const _identity: _FieldTransformer;
|
|
|
31
31
|
/**
|
|
32
32
|
* Wraps a transformer so that a `null` / `undefined` result throws
|
|
33
33
|
* `WireParseError('Required field is missing')`, which `strategy.applyField`
|
|
34
|
-
* will catch and re-throw as
|
|
34
|
+
* will catch and re-throw as _WireReadError / _WireWriteError with field context.
|
|
35
35
|
*
|
|
36
36
|
* The inner transformer runs first, so strategies that backfill absent values
|
|
37
37
|
* (e.g. clock-aware `translateDateTime`) can satisfy the requirement.
|
package/dist/stdlib/types.d.ts
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* Indicates malformed or unexpected data from the proto infrastructure —
|
|
8
8
|
* not a bug in the user's code.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
10
|
+
* @internal
|
|
11
11
|
*/
|
|
12
|
-
export declare class
|
|
12
|
+
export declare class _WireReadError extends Error {
|
|
13
13
|
/**
|
|
14
14
|
* Error class name for `instanceof`-free identification.
|
|
15
15
|
* @internal
|
|
@@ -21,9 +21,9 @@ export declare class WireReadError extends Error {
|
|
|
21
21
|
* Indicates that the user's code returned a value that cannot be translated
|
|
22
22
|
* back to wire format.
|
|
23
23
|
*
|
|
24
|
-
* @
|
|
24
|
+
* @internal
|
|
25
25
|
*/
|
|
26
|
-
export declare class
|
|
26
|
+
export declare class _WireWriteError extends Error {
|
|
27
27
|
/**
|
|
28
28
|
* Error class name for `instanceof`-free identification.
|
|
29
29
|
* @internal
|
|
@@ -33,7 +33,7 @@ export declare class WireWriteError extends Error {
|
|
|
33
33
|
/**
|
|
34
34
|
* Thrown by transformers when a wire value cannot be parsed.
|
|
35
35
|
* Caught by strategy.applyField, which enriches it with field context before
|
|
36
|
-
* re-throwing as
|
|
36
|
+
* re-throwing as _WireReadError or _WireWriteError.
|
|
37
37
|
*
|
|
38
38
|
* @internal
|
|
39
39
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/stdlib/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;;;GAMG;AACH,qBAAa,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/stdlib/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;;;GAMG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC;;;OAGG;IACM,IAAI,SAAoB;CAClC;AAED;;;;;;GAMG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC;;;OAGG;IACM,IAAI,SAAqB;CACnC;AAED;;;;;;GAMG;AACH,qBAAa,cAAe,SAAQ,KAAK;IAC9B,IAAI,SAAoB;CAClC;AAMD;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,QAAQ,CAAC,KAA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