@stripe/extensibility-sdk 0.25.0 → 0.27.1
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 +7 -9
- package/dist/config-values/generate.cjs +1 -1
- package/dist/config-values/generate.js +1 -1
- package/dist/extensibility-sdk-alpha.d.ts +85 -119
- package/dist/extensibility-sdk-beta.d.ts +85 -119
- package/dist/extensibility-sdk-extensions-alpha.d.ts +82 -54
- package/dist/extensibility-sdk-extensions-beta.d.ts +82 -54
- package/dist/extensibility-sdk-extensions-internal.d.ts +83 -55
- package/dist/extensibility-sdk-extensions-public.d.ts +82 -54
- package/dist/extensibility-sdk-internal.d.ts +89 -101
- package/dist/extensibility-sdk-public.d.ts +85 -119
- package/dist/extensions/billing/index.d.ts +1 -1
- package/dist/extensions/billing/invoice_collection_options.d.ts +111 -0
- package/dist/extensions/billing/invoice_collection_options.d.ts.map +1 -0
- package/dist/extensions/billing/recurring_billing_item_handling.d.ts +43 -0
- package/dist/extensions/billing/recurring_billing_item_handling.d.ts.map +1 -1
- package/dist/extensions/index.cjs +111 -52
- package/dist/extensions/index.js +111 -52
- package/dist/index.cjs +128 -97
- package/dist/index.js +126 -91
- package/dist/internal.cjs +7 -7
- package/dist/internal.js +7 -7
- package/dist/stdlib/decimal.d.ts +2 -2
- package/dist/stdlib/index.d.ts +4 -8
- package/dist/stdlib/index.d.ts.map +1 -1
- package/dist/stdlib/refs.d.ts +1 -31
- package/dist/stdlib/refs.d.ts.map +1 -1
- package/dist/stdlib/scalars.d.ts +0 -22
- package/dist/stdlib/scalars.d.ts.map +1 -1
- package/dist/stdlib/to-const.d.ts +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 -10
- package/dist/extensibility-sdk-stdlib-alpha.d.ts +0 -638
- package/dist/extensibility-sdk-stdlib-beta.d.ts +0 -638
- package/dist/extensibility-sdk-stdlib-internal.d.ts +0 -1008
- package/dist/extensibility-sdk-stdlib-public.d.ts +0 -638
- package/dist/extensions/billing/invoice_collection_setting.d.ts +0 -117
- package/dist/extensions/billing/invoice_collection_setting.d.ts.map +0 -1
- package/dist/stdlib/index.cjs +0 -1770
- package/dist/stdlib/index.js +0 -1710
package/dist/index.js
CHANGED
|
@@ -1108,41 +1108,21 @@ var PositiveInteger = {
|
|
|
1108
1108
|
return normalized;
|
|
1109
1109
|
}
|
|
1110
1110
|
};
|
|
1111
|
-
var StreetAddress = {
|
|
1112
|
-
create: (address) => {
|
|
1113
|
-
return address;
|
|
1114
|
-
}
|
|
1115
|
-
};
|
|
1116
|
-
var Timestamp = {
|
|
1117
|
-
create: (value) => {
|
|
1118
|
-
return value;
|
|
1119
|
-
}
|
|
1120
|
-
};
|
|
1121
|
-
|
|
1122
|
-
// src/stdlib/refs.ts
|
|
1123
|
-
var Ref = {
|
|
1124
|
-
create: (step) => {
|
|
1125
|
-
return {
|
|
1126
|
-
type: step.object,
|
|
1127
|
-
id: step.id
|
|
1128
|
-
};
|
|
1129
|
-
}
|
|
1130
|
-
};
|
|
1131
1111
|
|
|
1132
1112
|
// src/stdlib/types.ts
|
|
1133
|
-
var
|
|
1113
|
+
var _WireReadError = class extends Error {
|
|
1134
1114
|
/**
|
|
1135
1115
|
* Error class name for `instanceof`-free identification.
|
|
1136
1116
|
* @internal
|
|
1137
1117
|
*/
|
|
1138
|
-
name = "
|
|
1118
|
+
name = "_WireReadError";
|
|
1139
1119
|
};
|
|
1140
|
-
var
|
|
1120
|
+
var _WireWriteError = class extends Error {
|
|
1141
1121
|
/**
|
|
1142
1122
|
* Error class name for `instanceof`-free identification.
|
|
1143
1123
|
* @internal
|
|
1144
1124
|
*/
|
|
1145
|
-
name = "
|
|
1125
|
+
name = "_WireWriteError";
|
|
1146
1126
|
};
|
|
1147
1127
|
var WireParseError = class extends Error {
|
|
1148
1128
|
name = "WireParseError";
|
|
@@ -1349,7 +1329,7 @@ function enumLookup(spec, value, direction) {
|
|
|
1349
1329
|
var _ProtoWireToType = {
|
|
1350
1330
|
_brand: "ProtoWireToType",
|
|
1351
1331
|
createNotObjectError(loc, received) {
|
|
1352
|
-
return new
|
|
1332
|
+
return new _WireReadError(`${loc}: Expected an object but received ${received}`);
|
|
1353
1333
|
},
|
|
1354
1334
|
applyField(typeName, desc, input, strategy) {
|
|
1355
1335
|
const from = desc.wire ?? desc.type;
|
|
@@ -1359,7 +1339,7 @@ var _ProtoWireToType = {
|
|
|
1359
1339
|
return [to, (desc.transform ?? _identity)(strategy, raw)];
|
|
1360
1340
|
} catch (e) {
|
|
1361
1341
|
if (e instanceof WireParseError)
|
|
1362
|
-
throw new
|
|
1342
|
+
throw new _WireReadError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1363
1343
|
throw e;
|
|
1364
1344
|
}
|
|
1365
1345
|
},
|
|
@@ -1414,7 +1394,7 @@ var _ProtoWireToType = {
|
|
|
1414
1394
|
}
|
|
1415
1395
|
}
|
|
1416
1396
|
const loc = descriptor.typeName || "union";
|
|
1417
|
-
throw new
|
|
1397
|
+
throw new _WireReadError(`${loc}: No variant set`);
|
|
1418
1398
|
},
|
|
1419
1399
|
applyOneofField(typeName, oneof, input, strategy, result, excludeWireKeys) {
|
|
1420
1400
|
applyOneofFieldIncoming(typeName, oneof, input, strategy, result, excludeWireKeys);
|
|
@@ -1423,7 +1403,7 @@ var _ProtoWireToType = {
|
|
|
1423
1403
|
var _TypeToProtoWire = {
|
|
1424
1404
|
_brand: "TypeToProtoWire",
|
|
1425
1405
|
createNotObjectError(loc, received) {
|
|
1426
|
-
return new
|
|
1406
|
+
return new _WireWriteError(`${loc}: Expected an object but received ${received}`);
|
|
1427
1407
|
},
|
|
1428
1408
|
applyField(typeName, desc, input, strategy) {
|
|
1429
1409
|
const from = desc.type;
|
|
@@ -1433,7 +1413,7 @@ var _TypeToProtoWire = {
|
|
|
1433
1413
|
return [to, (desc.transform ?? _identity)(strategy, raw)];
|
|
1434
1414
|
} catch (e) {
|
|
1435
1415
|
if (e instanceof WireParseError)
|
|
1436
|
-
throw new
|
|
1416
|
+
throw new _WireWriteError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1437
1417
|
throw e;
|
|
1438
1418
|
}
|
|
1439
1419
|
},
|
|
@@ -1473,20 +1453,20 @@ var _TypeToProtoWire = {
|
|
|
1473
1453
|
const discriminant = sdk[descriptor.discriminantFieldName];
|
|
1474
1454
|
if (typeof discriminant !== "string") {
|
|
1475
1455
|
const loc = descriptor.typeName || "union";
|
|
1476
|
-
throw new
|
|
1456
|
+
throw new _WireWriteError(
|
|
1477
1457
|
`${loc}: Expected a string '${descriptor.discriminantFieldName}' discriminant but received ${discriminant === void 0 ? "undefined" : typeof discriminant}`
|
|
1478
1458
|
);
|
|
1479
1459
|
}
|
|
1480
1460
|
if (discriminant === "other") {
|
|
1481
1461
|
const loc = descriptor.typeName || "union";
|
|
1482
|
-
throw new
|
|
1462
|
+
throw new _WireWriteError(
|
|
1483
1463
|
`${loc}: Cannot serialize 'other' variant back to wire format`
|
|
1484
1464
|
);
|
|
1485
1465
|
}
|
|
1486
1466
|
const branch = descriptor.branches.find((b) => b.typeKey === discriminant);
|
|
1487
1467
|
if (!branch) {
|
|
1488
1468
|
const loc = descriptor.typeName || "union";
|
|
1489
|
-
throw new
|
|
1469
|
+
throw new _WireWriteError(`${loc}: Unknown variant '${discriminant}'`);
|
|
1490
1470
|
}
|
|
1491
1471
|
const branchData = _apply(
|
|
1492
1472
|
new _ShapeDescriptor(descriptor.typeName, branch.shape),
|
|
@@ -1515,7 +1495,7 @@ function _configAppContextFromContext(ctx) {
|
|
|
1515
1495
|
var _JsonWireToType = {
|
|
1516
1496
|
_brand: "JsonWireToType",
|
|
1517
1497
|
createNotObjectError(loc, received) {
|
|
1518
|
-
return new
|
|
1498
|
+
return new _WireReadError(`${loc}: Expected an object but received ${received}`);
|
|
1519
1499
|
},
|
|
1520
1500
|
applyField(typeName, desc, input, strategy) {
|
|
1521
1501
|
const key = desc.type;
|
|
@@ -1524,7 +1504,7 @@ var _JsonWireToType = {
|
|
|
1524
1504
|
return [key, (desc.transform ?? _identity)(strategy, raw)];
|
|
1525
1505
|
} catch (e) {
|
|
1526
1506
|
if (e instanceof WireParseError)
|
|
1527
|
-
throw new
|
|
1507
|
+
throw new _WireReadError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1528
1508
|
throw e;
|
|
1529
1509
|
}
|
|
1530
1510
|
},
|
|
@@ -1579,7 +1559,7 @@ function applyOneofFieldIncoming(typeName, oneof, input, strategy, result, exclu
|
|
|
1579
1559
|
}
|
|
1580
1560
|
} catch (e) {
|
|
1581
1561
|
if (e instanceof WireParseError) {
|
|
1582
|
-
throw new
|
|
1562
|
+
throw new _WireReadError(
|
|
1583
1563
|
`${typeName}.${oneof.discriminant}(${branch.typeKey}): ${e.message}`
|
|
1584
1564
|
);
|
|
1585
1565
|
}
|
|
@@ -1597,30 +1577,30 @@ function applyOneofFieldIncoming(typeName, oneof, input, strategy, result, exclu
|
|
|
1597
1577
|
}
|
|
1598
1578
|
}
|
|
1599
1579
|
if (!oneof.optional) {
|
|
1600
|
-
throw new
|
|
1580
|
+
throw new _WireReadError(`${typeName}.${oneof.discriminant}: no variant set`);
|
|
1601
1581
|
}
|
|
1602
1582
|
}
|
|
1603
1583
|
function applyOneofFieldOutgoing(typeName, oneof, input, strategy, result) {
|
|
1604
1584
|
const discriminant = Object.hasOwn(input, oneof.discriminant) ? input[oneof.discriminant] : void 0;
|
|
1605
1585
|
if (discriminant === void 0 || discriminant === null) {
|
|
1606
1586
|
if (!oneof.optional) {
|
|
1607
|
-
throw new
|
|
1587
|
+
throw new _WireWriteError(`${typeName}.${oneof.discriminant}: no variant set`);
|
|
1608
1588
|
}
|
|
1609
1589
|
return;
|
|
1610
1590
|
}
|
|
1611
1591
|
if (typeof discriminant !== "string") {
|
|
1612
|
-
throw new
|
|
1592
|
+
throw new _WireWriteError(
|
|
1613
1593
|
`${typeName}.${oneof.discriminant}: expected string discriminant but received ${typeof discriminant}`
|
|
1614
1594
|
);
|
|
1615
1595
|
}
|
|
1616
1596
|
if (discriminant === "other") {
|
|
1617
|
-
throw new
|
|
1597
|
+
throw new _WireWriteError(
|
|
1618
1598
|
`${typeName}.${oneof.discriminant}: cannot serialize 'other' variant back to wire format`
|
|
1619
1599
|
);
|
|
1620
1600
|
}
|
|
1621
1601
|
const branch = oneof.branches.find((b) => b.typeKey === discriminant);
|
|
1622
1602
|
if (!branch) {
|
|
1623
|
-
throw new
|
|
1603
|
+
throw new _WireWriteError(
|
|
1624
1604
|
`${typeName}.${oneof.discriminant}: unknown variant '${discriminant}'`
|
|
1625
1605
|
);
|
|
1626
1606
|
}
|
|
@@ -1630,7 +1610,7 @@ function applyOneofFieldOutgoing(typeName, oneof, input, strategy, result) {
|
|
|
1630
1610
|
result[branch.wireKey] = transformed ?? {};
|
|
1631
1611
|
} catch (e) {
|
|
1632
1612
|
if (e instanceof WireParseError) {
|
|
1633
|
-
throw new
|
|
1613
|
+
throw new _WireWriteError(
|
|
1634
1614
|
`${typeName}.${oneof.discriminant}(${branch.typeKey}): ${e.message}`
|
|
1635
1615
|
);
|
|
1636
1616
|
}
|
|
@@ -1684,7 +1664,7 @@ var billing_exports = {};
|
|
|
1684
1664
|
__export(billing_exports, {
|
|
1685
1665
|
Bill: () => bill_exports,
|
|
1686
1666
|
CustomerBalanceApplication: () => CustomerBalanceApplication,
|
|
1687
|
-
|
|
1667
|
+
InvoiceCollectionOptions: () => InvoiceCollectionOptions,
|
|
1688
1668
|
Prorations: () => Prorations,
|
|
1689
1669
|
RecurringBillingItemHandling: () => RecurringBillingItemHandling
|
|
1690
1670
|
});
|
|
@@ -2417,17 +2397,9 @@ var CustomerBalanceApplication;
|
|
|
2417
2397
|
CustomerBalanceApplication2.prepareResult = _prepareResultAlias;
|
|
2418
2398
|
})(CustomerBalanceApplication || (CustomerBalanceApplication = {}));
|
|
2419
2399
|
|
|
2420
|
-
// src/extensions/billing/
|
|
2421
|
-
var
|
|
2422
|
-
((
|
|
2423
|
-
const parentTypeEnumValues = new _ProtoEnum({
|
|
2424
|
-
PARENT_TYPE_SUBSCRIPTION: "subscription",
|
|
2425
|
-
PARENT_TYPE_CONTRACT: "contract",
|
|
2426
|
-
PARENT_TYPE_QUOTE: "quote",
|
|
2427
|
-
PARENT_TYPE_BILLING_CADENCE: "billing_cadence",
|
|
2428
|
-
PARENT_TYPE_SUBSCRIPTION_SCHEDULE: "subscription_schedule",
|
|
2429
|
-
PARENT_TYPE_STANDALONE: "standalone"
|
|
2430
|
-
});
|
|
2400
|
+
// src/extensions/billing/invoice_collection_options.ts
|
|
2401
|
+
var InvoiceCollectionOptions;
|
|
2402
|
+
((InvoiceCollectionOptions2) => {
|
|
2431
2403
|
const paymentMethodTypeEnumValues = new _ProtoEnum({
|
|
2432
2404
|
PAYMENT_METHOD_TYPE_CARD: "card",
|
|
2433
2405
|
PAYMENT_METHOD_TYPE_ACH_DEBIT: "ach_debit",
|
|
@@ -2458,25 +2430,40 @@ var InvoiceCollectionSetting;
|
|
|
2458
2430
|
PAYMENT_METHOD_TYPE_PROMPTPAY: "promptpay",
|
|
2459
2431
|
PAYMENT_METHOD_TYPE_PAYNOW: "paynow",
|
|
2460
2432
|
PAYMENT_METHOD_TYPE_GRABPAY: "grabpay",
|
|
2461
|
-
PAYMENT_METHOD_TYPE_FPX: "fpx"
|
|
2433
|
+
PAYMENT_METHOD_TYPE_FPX: "fpx",
|
|
2434
|
+
PAYMENT_METHOD_TYPE_BLIK: "blik"
|
|
2462
2435
|
});
|
|
2463
2436
|
const collectionMethodEnumValues = new _ProtoEnum({
|
|
2464
2437
|
COLLECTION_METHOD_SEND_INVOICE: "send_invoice",
|
|
2465
2438
|
COLLECTION_METHOD_CHARGE_AUTOMATICALLY: "charge_automatically"
|
|
2466
2439
|
});
|
|
2467
|
-
const
|
|
2440
|
+
const InvoiceCollectionOptionsResultDescriptor = new _ShapeDescriptor("InvoiceCollectionOptionsResult", [
|
|
2468
2441
|
{ type: "autoAdvance", transform: _identity }
|
|
2469
2442
|
]);
|
|
2470
|
-
const
|
|
2471
|
-
"
|
|
2443
|
+
const InvoiceCollectionOptionsInputDescriptor = new _ShapeDescriptor(
|
|
2444
|
+
"InvoiceCollectionOptionsInput",
|
|
2472
2445
|
[
|
|
2473
2446
|
{
|
|
2474
|
-
type: "
|
|
2475
|
-
transform: _required(_translateShape(() =>
|
|
2476
|
-
}
|
|
2477
|
-
{ type: "parent", transform: _required(_translateShape(() => ParentDescriptor)) }
|
|
2447
|
+
type: "collectionOptions",
|
|
2448
|
+
transform: _required(_translateShape(() => CollectionOptionsDescriptor))
|
|
2449
|
+
}
|
|
2478
2450
|
],
|
|
2479
2451
|
[
|
|
2452
|
+
{
|
|
2453
|
+
discriminant: "invoiceParentType",
|
|
2454
|
+
optional: false,
|
|
2455
|
+
branches: [
|
|
2456
|
+
{ wireKey: "cadence", typeKey: "cadence" },
|
|
2457
|
+
{ wireKey: "quote", typeKey: "quote" },
|
|
2458
|
+
{ wireKey: "schedule", typeKey: "schedule" },
|
|
2459
|
+
{
|
|
2460
|
+
wireKey: "subscription",
|
|
2461
|
+
typeKey: "subscription",
|
|
2462
|
+
transform: _translateShape(() => SubscriptionParentDescriptor)
|
|
2463
|
+
},
|
|
2464
|
+
{ wireKey: "contract", typeKey: "contract" }
|
|
2465
|
+
]
|
|
2466
|
+
},
|
|
2480
2467
|
{
|
|
2481
2468
|
discriminant: "payer",
|
|
2482
2469
|
optional: false,
|
|
@@ -2494,19 +2481,21 @@ var InvoiceCollectionSetting;
|
|
|
2494
2481
|
{ type: "id", transform: _required() },
|
|
2495
2482
|
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) }
|
|
2496
2483
|
]);
|
|
2497
|
-
const
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2484
|
+
const SubscriptionParentDescriptor = new _ShapeDescriptor(
|
|
2485
|
+
"SubscriptionParent",
|
|
2486
|
+
[
|
|
2487
|
+
{ type: "id", transform: _required() },
|
|
2488
|
+
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) }
|
|
2489
|
+
]
|
|
2490
|
+
);
|
|
2491
|
+
const CollectionOptionsDescriptor = new _ShapeDescriptor(
|
|
2492
|
+
"CollectionOptions",
|
|
2503
2493
|
[
|
|
2504
2494
|
{ type: "autoAdvance", transform: _required() },
|
|
2505
2495
|
{
|
|
2506
2496
|
type: "collectionMethod",
|
|
2507
2497
|
transform: _required(_translateEnum(collectionMethodEnumValues))
|
|
2508
2498
|
},
|
|
2509
|
-
{ type: "finalizationGracePeriod", transform: _required() },
|
|
2510
2499
|
{
|
|
2511
2500
|
type: "paymentMethods",
|
|
2512
2501
|
transform: _required(
|
|
@@ -2516,53 +2505,61 @@ var InvoiceCollectionSetting;
|
|
|
2516
2505
|
]
|
|
2517
2506
|
);
|
|
2518
2507
|
let __stripe_shim_active__ = false;
|
|
2519
|
-
function
|
|
2508
|
+
function prepareArgsOverrideOptions(proto) {
|
|
2520
2509
|
if (__stripe_shim_active__) {
|
|
2521
2510
|
return proto;
|
|
2522
2511
|
}
|
|
2523
2512
|
return _apply(
|
|
2524
|
-
|
|
2513
|
+
InvoiceCollectionOptionsInputDescriptor,
|
|
2525
2514
|
_ProtoWireToType,
|
|
2526
2515
|
proto
|
|
2527
2516
|
);
|
|
2528
2517
|
}
|
|
2529
|
-
|
|
2530
|
-
function
|
|
2518
|
+
InvoiceCollectionOptions2.prepareArgsOverrideOptions = prepareArgsOverrideOptions;
|
|
2519
|
+
function prepareResultOverrideOptions(result) {
|
|
2531
2520
|
if (__stripe_shim_active__) return result;
|
|
2532
2521
|
return _apply(
|
|
2533
|
-
|
|
2522
|
+
InvoiceCollectionOptionsResultDescriptor,
|
|
2534
2523
|
_TypeToProtoWire,
|
|
2535
2524
|
result
|
|
2536
2525
|
);
|
|
2537
2526
|
}
|
|
2538
|
-
|
|
2539
|
-
function $
|
|
2527
|
+
InvoiceCollectionOptions2.prepareResultOverrideOptions = prepareResultOverrideOptions;
|
|
2528
|
+
function $platformWrapOverrideOptions(configTransformer) {
|
|
2540
2529
|
return (cls, wireArgs, wireConfig, ctx) => {
|
|
2541
2530
|
__stripe_shim_active__ = true;
|
|
2542
2531
|
const instance = new cls();
|
|
2543
2532
|
const request = _apply(
|
|
2544
|
-
|
|
2533
|
+
InvoiceCollectionOptionsInputDescriptor,
|
|
2545
2534
|
_ProtoWireToType,
|
|
2546
2535
|
wireArgs
|
|
2547
2536
|
);
|
|
2548
2537
|
const config = configTransformer !== void 0 ? configTransformer(wireConfig, _configAppContextFromContext(ctx)) : wireConfig;
|
|
2549
|
-
const result = instance.
|
|
2538
|
+
const result = instance.overrideOptions(request, config, ctx);
|
|
2550
2539
|
if (_isPromiseLike(result)) {
|
|
2551
2540
|
return Promise.resolve(result).then((r) => {
|
|
2552
2541
|
const typedR = r;
|
|
2553
|
-
return _apply(
|
|
2542
|
+
return _apply(
|
|
2543
|
+
InvoiceCollectionOptionsResultDescriptor,
|
|
2544
|
+
_TypeToProtoWire,
|
|
2545
|
+
typedR
|
|
2546
|
+
);
|
|
2554
2547
|
});
|
|
2555
2548
|
}
|
|
2556
2549
|
const typedResult = result;
|
|
2557
|
-
return _apply(
|
|
2550
|
+
return _apply(
|
|
2551
|
+
InvoiceCollectionOptionsResultDescriptor,
|
|
2552
|
+
_TypeToProtoWire,
|
|
2553
|
+
typedResult
|
|
2554
|
+
);
|
|
2558
2555
|
};
|
|
2559
2556
|
}
|
|
2560
|
-
|
|
2561
|
-
const _prepareArgsAlias =
|
|
2562
|
-
|
|
2563
|
-
const _prepareResultAlias =
|
|
2564
|
-
|
|
2565
|
-
})(
|
|
2557
|
+
InvoiceCollectionOptions2.$platformWrapOverrideOptions = $platformWrapOverrideOptions;
|
|
2558
|
+
const _prepareArgsAlias = prepareArgsOverrideOptions;
|
|
2559
|
+
InvoiceCollectionOptions2.prepareArgs = _prepareArgsAlias;
|
|
2560
|
+
const _prepareResultAlias = prepareResultOverrideOptions;
|
|
2561
|
+
InvoiceCollectionOptions2.prepareResult = _prepareResultAlias;
|
|
2562
|
+
})(InvoiceCollectionOptions || (InvoiceCollectionOptions = {}));
|
|
2566
2563
|
|
|
2567
2564
|
// src/extensions/billing/prorations.ts
|
|
2568
2565
|
var Prorations;
|
|
@@ -3371,9 +3368,51 @@ var RecurringBillingItemHandling;
|
|
|
3371
3368
|
transform: _translateShape(() => CustomPricingUnitOverageRateDescriptor)
|
|
3372
3369
|
}
|
|
3373
3370
|
]
|
|
3371
|
+
},
|
|
3372
|
+
{
|
|
3373
|
+
discriminant: "creditedItems",
|
|
3374
|
+
optional: false,
|
|
3375
|
+
branches: [
|
|
3376
|
+
{
|
|
3377
|
+
wireKey: "invoiceLineItems",
|
|
3378
|
+
typeKey: "invoiceLineItems",
|
|
3379
|
+
transform: _translateShape(() => InvoiceLineItemsDescriptor)
|
|
3380
|
+
},
|
|
3381
|
+
{
|
|
3382
|
+
wireKey: "invoiceItem",
|
|
3383
|
+
typeKey: "invoiceItem",
|
|
3384
|
+
transform: _translateShape(() => CreditedInvoiceItemDescriptor)
|
|
3385
|
+
}
|
|
3386
|
+
]
|
|
3374
3387
|
}
|
|
3375
3388
|
]
|
|
3376
3389
|
);
|
|
3390
|
+
const CreditedInvoiceItemDescriptor = new _ShapeDescriptor(
|
|
3391
|
+
"CreditedInvoiceItem",
|
|
3392
|
+
[{ type: "id", transform: _required() }]
|
|
3393
|
+
);
|
|
3394
|
+
const InvoiceLineItemsDescriptor = new _ShapeDescriptor(
|
|
3395
|
+
"InvoiceLineItems",
|
|
3396
|
+
[
|
|
3397
|
+
{
|
|
3398
|
+
type: "invoice",
|
|
3399
|
+
transform: _required(_translateShape(() => CreditedInvoiceDescriptor))
|
|
3400
|
+
},
|
|
3401
|
+
{
|
|
3402
|
+
type: "invoiceLineItems",
|
|
3403
|
+
transform: _required(
|
|
3404
|
+
_translateArray(_translateShape(() => CreditedInvoiceLineItemDescriptor))
|
|
3405
|
+
)
|
|
3406
|
+
}
|
|
3407
|
+
]
|
|
3408
|
+
);
|
|
3409
|
+
const CreditedInvoiceLineItemDescriptor = new _ShapeDescriptor("CreditedInvoiceLineItem", [
|
|
3410
|
+
{ type: "id", transform: _required() }
|
|
3411
|
+
]);
|
|
3412
|
+
const CreditedInvoiceDescriptor = new _ShapeDescriptor(
|
|
3413
|
+
"CreditedInvoice",
|
|
3414
|
+
[{ type: "id", transform: _required() }]
|
|
3415
|
+
);
|
|
3377
3416
|
const CustomPricingUnitOverageRateDescriptor = new _ShapeDescriptor("CustomPricingUnitOverageRate", [
|
|
3378
3417
|
{ type: "id", transform: _required() },
|
|
3379
3418
|
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) },
|
|
@@ -3998,11 +4037,6 @@ export {
|
|
|
3998
4037
|
extend_exports as Extend,
|
|
3999
4038
|
Integer,
|
|
4000
4039
|
PositiveInteger,
|
|
4001
|
-
Ref,
|
|
4002
|
-
StreetAddress,
|
|
4003
|
-
Timestamp,
|
|
4004
|
-
WireReadError,
|
|
4005
|
-
WireWriteError,
|
|
4006
4040
|
_ConfigEnum,
|
|
4007
4041
|
_JsonWireToType,
|
|
4008
4042
|
_ProtoEnum,
|
|
@@ -4010,6 +4044,8 @@ export {
|
|
|
4010
4044
|
_ShapeDescriptor,
|
|
4011
4045
|
_TypeToProtoWire,
|
|
4012
4046
|
_UnionDescriptor,
|
|
4047
|
+
_WireReadError,
|
|
4048
|
+
_WireWriteError,
|
|
4013
4049
|
_apply,
|
|
4014
4050
|
_applyConfig,
|
|
4015
4051
|
_applyIncoming,
|
|
@@ -4025,6 +4061,5 @@ export {
|
|
|
4025
4061
|
_translateMap,
|
|
4026
4062
|
_translateShape,
|
|
4027
4063
|
_translateUnion,
|
|
4028
|
-
isDecimal,
|
|
4029
4064
|
toConst
|
|
4030
4065
|
};
|
package/dist/internal.cjs
CHANGED
|
@@ -54,15 +54,15 @@ var EXTENSION_INTERFACES = [
|
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
interfaceId: "billing.
|
|
58
|
-
sdkFqn: "billing/
|
|
59
|
-
namespacePath: ["Billing", "
|
|
57
|
+
interfaceId: "billing.invoice_collection_options",
|
|
58
|
+
sdkFqn: "billing/invoice_collection_options.InvoiceCollectionOptions",
|
|
59
|
+
namespacePath: ["Billing", "InvoiceCollectionOptions"],
|
|
60
60
|
methods: [
|
|
61
61
|
{
|
|
62
|
-
outputName: "
|
|
63
|
-
prepareArgsName: "
|
|
64
|
-
prepareResultName: "
|
|
65
|
-
platformWrapName: "$
|
|
62
|
+
outputName: "overrideOptions",
|
|
63
|
+
prepareArgsName: "prepareArgsOverrideOptions",
|
|
64
|
+
prepareResultName: "prepareResultOverrideOptions",
|
|
65
|
+
platformWrapName: "$platformWrapOverrideOptions"
|
|
66
66
|
}
|
|
67
67
|
]
|
|
68
68
|
},
|
package/dist/internal.js
CHANGED
|
@@ -27,15 +27,15 @@ var EXTENSION_INTERFACES = [
|
|
|
27
27
|
]
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
interfaceId: "billing.
|
|
31
|
-
sdkFqn: "billing/
|
|
32
|
-
namespacePath: ["Billing", "
|
|
30
|
+
interfaceId: "billing.invoice_collection_options",
|
|
31
|
+
sdkFqn: "billing/invoice_collection_options.InvoiceCollectionOptions",
|
|
32
|
+
namespacePath: ["Billing", "InvoiceCollectionOptions"],
|
|
33
33
|
methods: [
|
|
34
34
|
{
|
|
35
|
-
outputName: "
|
|
36
|
-
prepareArgsName: "
|
|
37
|
-
prepareResultName: "
|
|
38
|
-
platformWrapName: "$
|
|
35
|
+
outputName: "overrideOptions",
|
|
36
|
+
prepareArgsName: "prepareArgsOverrideOptions",
|
|
37
|
+
prepareResultName: "prepareResultOverrideOptions",
|
|
38
|
+
platformWrapName: "$platformWrapOverrideOptions"
|
|
39
39
|
}
|
|
40
40
|
]
|
|
41
41
|
},
|
package/dist/stdlib/decimal.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { Integer } from './scalars.js';
|
|
|
5
5
|
*
|
|
6
6
|
* Using a dedicated key (rather than the shared `__brand`) lets formspec's
|
|
7
7
|
* structural brand-detection distinguish `Decimal` from other SDK branded
|
|
8
|
-
* types (e.g., `Ref
|
|
8
|
+
* types (e.g., `Ref`) that also carry `[__brand]`.
|
|
9
9
|
*
|
|
10
10
|
* String-literal const (not `unique symbol`) so that independent
|
|
11
11
|
* declaration rollups (root vs subpath) produce structurally compatible
|
|
@@ -125,7 +125,7 @@ export declare const DEFAULT_DIV_PRECISION = 34;
|
|
|
125
125
|
*
|
|
126
126
|
* @example
|
|
127
127
|
* ```ts
|
|
128
|
-
* import { Decimal, RoundDirection } from '@stripe/extensibility-sdk
|
|
128
|
+
* import { Decimal, RoundDirection } from '@stripe/extensibility-sdk';
|
|
129
129
|
*
|
|
130
130
|
* const price = Decimal.from('19.99');
|
|
131
131
|
* const tax = price.mul(Decimal.from('0.0825'));
|
package/dist/stdlib/index.d.ts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated Import from `@stripe/extensibility-sdk` instead.
|
|
3
|
-
* @packageDocumentation
|
|
4
|
-
*/
|
|
5
1
|
/**
|
|
6
2
|
* @internal
|
|
7
3
|
*/
|
|
8
4
|
export { __brand, __stripeType } from './brand.js';
|
|
9
5
|
export type { BrandSymbol, StripeTypeSymbol } from './brand.js';
|
|
10
|
-
export { Integer, PositiveInteger, __positiveIntegerBrand
|
|
6
|
+
export { Integer, PositiveInteger, __positiveIntegerBrand } from './scalars.js';
|
|
11
7
|
export type { IntegerRoundDirection, IntegerCompanion, PositiveIntegerCompanion, } from './scalars.js';
|
|
12
|
-
export { Ref } from './refs.js';
|
|
8
|
+
export type { Ref } from './refs.js';
|
|
13
9
|
export type { ExtractObjectTag } from './type-utils.js';
|
|
14
|
-
export { __decimalBrand, Decimal, DecimalRoundingPresets,
|
|
10
|
+
export { __decimalBrand, Decimal, DecimalRoundingPresets, DEFAULT_DIV_PRECISION, } from './decimal.js';
|
|
15
11
|
export type { RoundDirection, DecimalRoundingOptions, DecimalLike, DecimalCompanion, } from './decimal.js';
|
|
16
|
-
export {
|
|
12
|
+
export { _WireReadError, _WireWriteError, _ShapeDescriptor, _UnionDescriptor, _ProtoEnum, _ConfigEnum, _isPromiseLike, } from './types.js';
|
|
17
13
|
export type { _EnumSpec, _FieldTransformer, _FieldDescriptor, _UnionBranchDescriptor, _OneofBranchDescriptor, _OneofFieldDescriptor, _ApplyStrategy, _ProtoWireToTypeStrategy, _TypeToProtoWireStrategy, _JsonWireToTypeStrategy, } from './types.js';
|
|
18
14
|
export { _ProtoWireToType, _TypeToProtoWire, _JsonWireToType, _applyIncoming, _applyOutgoing, _applyConfig, _configAppContextFromContext, } from './transform-strategies.js';
|
|
19
15
|
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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stdlib/index.ts"],"names":[],"mappings":"AAAA;;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,YAAY,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACrC,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/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.
|
|
@@ -29,34 +29,4 @@ export type Ref<T extends {
|
|
|
29
29
|
readonly __type?: T;
|
|
30
30
|
readonly [__stripeType]: 'string';
|
|
31
31
|
};
|
|
32
|
-
/** Factory for creating {@link (Ref:type)} values from an object with `object` and `id` fields. @public */
|
|
33
|
-
export declare const Ref: {
|
|
34
|
-
create: <T extends {
|
|
35
|
-
readonly object: string;
|
|
36
|
-
}>(step: T & {
|
|
37
|
-
readonly id: string;
|
|
38
|
-
}) => Ref<T>;
|
|
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
32
|
//# 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"}
|
package/dist/stdlib/scalars.d.ts
CHANGED
|
@@ -6,10 +6,6 @@ export type JsonObject = object & {
|
|
|
6
6
|
readonly [__brand]: 'JsonObject';
|
|
7
7
|
readonly [__stripeType]: 'map<string>';
|
|
8
8
|
};
|
|
9
|
-
/** Factory for creating {@link JsonObject} branded values. @public */
|
|
10
|
-
export declare const JsonObject: {
|
|
11
|
-
create: (value: object) => JsonObject;
|
|
12
|
-
};
|
|
13
9
|
/** A branded integer — a `number` guaranteed to satisfy `Number.isInteger`. @public */
|
|
14
10
|
export type Integer = number & {
|
|
15
11
|
readonly [__integerBrand]: true;
|
|
@@ -98,22 +94,4 @@ export interface PositiveIntegerCompanion {
|
|
|
98
94
|
}
|
|
99
95
|
/** Factory, type guard, and utilities for {@link (PositiveInteger:type)} branded values. @public */
|
|
100
96
|
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
97
|
//# 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,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI7D,OAAO,EAAE,OAAO,EAAa,MAAM,cAAc,CAAC;AAElD,uGAAuG;AACvG,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAChC,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC;CACxC,CAAC;AAEF,
|
|
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,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI7D,OAAO,EAAE,OAAO,EAAa,MAAM,cAAc,CAAC;AAElD,uGAAuG;AACvG,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAChC,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC;CACxC,CAAC;AAEF,uFAAuF;AACvF,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG;IAC7B,QAAQ,CAAC,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC;IAChC,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,sBAAsB,EAAE,wBAAwB,CAAC;AAEtE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG;IACrC,QAAQ,CAAC,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC;IAChC,QAAQ,CAAC,CAAC,sBAAsB,CAAC,EAAE,IAAI,CAAC;IACxC,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN,OAAO,GACP,YAAY,GACZ,UAAU,GACV,SAAS,CAAC;AAiEd,cAAc;AACd,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,uEAAuE;IACvE,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAAC;IACrC,wEAAwE;IACxE,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC;IACjD,oEAAoE;IACpE,IAAI,CACF,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,EAC1C,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC;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"}
|
|
@@ -20,7 +20,7 @@ export type DeepReadonly<T> = T extends string | number | boolean | bigint | sym
|
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```typescript
|
|
23
|
-
* import { toConst } from '@stripe/extensibility-sdk
|
|
23
|
+
* import { toConst } from '@stripe/extensibility-sdk';
|
|
24
24
|
*
|
|
25
25
|
* const DEFAULTS = toConst({ timeout: 30, retries: 3 });
|
|
26
26
|
* // Type: { readonly timeout: 30; readonly retries: 3 }
|
|
@@ -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.
|