@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.cjs
CHANGED
|
@@ -28,11 +28,6 @@ __export(src_exports, {
|
|
|
28
28
|
Extend: () => extend_exports,
|
|
29
29
|
Integer: () => Integer,
|
|
30
30
|
PositiveInteger: () => PositiveInteger,
|
|
31
|
-
Ref: () => Ref,
|
|
32
|
-
StreetAddress: () => StreetAddress,
|
|
33
|
-
Timestamp: () => Timestamp,
|
|
34
|
-
WireReadError: () => WireReadError,
|
|
35
|
-
WireWriteError: () => WireWriteError,
|
|
36
31
|
_ConfigEnum: () => _ConfigEnum,
|
|
37
32
|
_JsonWireToType: () => _JsonWireToType,
|
|
38
33
|
_ProtoEnum: () => _ProtoEnum,
|
|
@@ -40,6 +35,8 @@ __export(src_exports, {
|
|
|
40
35
|
_ShapeDescriptor: () => _ShapeDescriptor,
|
|
41
36
|
_TypeToProtoWire: () => _TypeToProtoWire,
|
|
42
37
|
_UnionDescriptor: () => _UnionDescriptor,
|
|
38
|
+
_WireReadError: () => _WireReadError,
|
|
39
|
+
_WireWriteError: () => _WireWriteError,
|
|
43
40
|
_apply: () => _apply,
|
|
44
41
|
_applyConfig: () => _applyConfig,
|
|
45
42
|
_applyIncoming: () => _applyIncoming,
|
|
@@ -55,7 +52,6 @@ __export(src_exports, {
|
|
|
55
52
|
_translateMap: () => _translateMap,
|
|
56
53
|
_translateShape: () => _translateShape,
|
|
57
54
|
_translateUnion: () => _translateUnion,
|
|
58
|
-
isDecimal: () => isDecimal,
|
|
59
55
|
toConst: () => toConst
|
|
60
56
|
});
|
|
61
57
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -1164,41 +1160,21 @@ var PositiveInteger = {
|
|
|
1164
1160
|
return normalized;
|
|
1165
1161
|
}
|
|
1166
1162
|
};
|
|
1167
|
-
var StreetAddress = {
|
|
1168
|
-
create: (address) => {
|
|
1169
|
-
return address;
|
|
1170
|
-
}
|
|
1171
|
-
};
|
|
1172
|
-
var Timestamp = {
|
|
1173
|
-
create: (value) => {
|
|
1174
|
-
return value;
|
|
1175
|
-
}
|
|
1176
|
-
};
|
|
1177
|
-
|
|
1178
|
-
// src/stdlib/refs.ts
|
|
1179
|
-
var Ref = {
|
|
1180
|
-
create: (step) => {
|
|
1181
|
-
return {
|
|
1182
|
-
type: step.object,
|
|
1183
|
-
id: step.id
|
|
1184
|
-
};
|
|
1185
|
-
}
|
|
1186
|
-
};
|
|
1187
1163
|
|
|
1188
1164
|
// src/stdlib/types.ts
|
|
1189
|
-
var
|
|
1165
|
+
var _WireReadError = class extends Error {
|
|
1190
1166
|
/**
|
|
1191
1167
|
* Error class name for `instanceof`-free identification.
|
|
1192
1168
|
* @internal
|
|
1193
1169
|
*/
|
|
1194
|
-
name = "
|
|
1170
|
+
name = "_WireReadError";
|
|
1195
1171
|
};
|
|
1196
|
-
var
|
|
1172
|
+
var _WireWriteError = class extends Error {
|
|
1197
1173
|
/**
|
|
1198
1174
|
* Error class name for `instanceof`-free identification.
|
|
1199
1175
|
* @internal
|
|
1200
1176
|
*/
|
|
1201
|
-
name = "
|
|
1177
|
+
name = "_WireWriteError";
|
|
1202
1178
|
};
|
|
1203
1179
|
var WireParseError = class extends Error {
|
|
1204
1180
|
name = "WireParseError";
|
|
@@ -1405,7 +1381,7 @@ function enumLookup(spec, value, direction) {
|
|
|
1405
1381
|
var _ProtoWireToType = {
|
|
1406
1382
|
_brand: "ProtoWireToType",
|
|
1407
1383
|
createNotObjectError(loc, received) {
|
|
1408
|
-
return new
|
|
1384
|
+
return new _WireReadError(`${loc}: Expected an object but received ${received}`);
|
|
1409
1385
|
},
|
|
1410
1386
|
applyField(typeName, desc, input, strategy) {
|
|
1411
1387
|
const from = desc.wire ?? desc.type;
|
|
@@ -1415,7 +1391,7 @@ var _ProtoWireToType = {
|
|
|
1415
1391
|
return [to, (desc.transform ?? _identity)(strategy, raw)];
|
|
1416
1392
|
} catch (e) {
|
|
1417
1393
|
if (e instanceof WireParseError)
|
|
1418
|
-
throw new
|
|
1394
|
+
throw new _WireReadError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1419
1395
|
throw e;
|
|
1420
1396
|
}
|
|
1421
1397
|
},
|
|
@@ -1470,7 +1446,7 @@ var _ProtoWireToType = {
|
|
|
1470
1446
|
}
|
|
1471
1447
|
}
|
|
1472
1448
|
const loc = descriptor.typeName || "union";
|
|
1473
|
-
throw new
|
|
1449
|
+
throw new _WireReadError(`${loc}: No variant set`);
|
|
1474
1450
|
},
|
|
1475
1451
|
applyOneofField(typeName, oneof, input, strategy, result, excludeWireKeys) {
|
|
1476
1452
|
applyOneofFieldIncoming(typeName, oneof, input, strategy, result, excludeWireKeys);
|
|
@@ -1479,7 +1455,7 @@ var _ProtoWireToType = {
|
|
|
1479
1455
|
var _TypeToProtoWire = {
|
|
1480
1456
|
_brand: "TypeToProtoWire",
|
|
1481
1457
|
createNotObjectError(loc, received) {
|
|
1482
|
-
return new
|
|
1458
|
+
return new _WireWriteError(`${loc}: Expected an object but received ${received}`);
|
|
1483
1459
|
},
|
|
1484
1460
|
applyField(typeName, desc, input, strategy) {
|
|
1485
1461
|
const from = desc.type;
|
|
@@ -1489,7 +1465,7 @@ var _TypeToProtoWire = {
|
|
|
1489
1465
|
return [to, (desc.transform ?? _identity)(strategy, raw)];
|
|
1490
1466
|
} catch (e) {
|
|
1491
1467
|
if (e instanceof WireParseError)
|
|
1492
|
-
throw new
|
|
1468
|
+
throw new _WireWriteError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1493
1469
|
throw e;
|
|
1494
1470
|
}
|
|
1495
1471
|
},
|
|
@@ -1529,20 +1505,20 @@ var _TypeToProtoWire = {
|
|
|
1529
1505
|
const discriminant = sdk[descriptor.discriminantFieldName];
|
|
1530
1506
|
if (typeof discriminant !== "string") {
|
|
1531
1507
|
const loc = descriptor.typeName || "union";
|
|
1532
|
-
throw new
|
|
1508
|
+
throw new _WireWriteError(
|
|
1533
1509
|
`${loc}: Expected a string '${descriptor.discriminantFieldName}' discriminant but received ${discriminant === void 0 ? "undefined" : typeof discriminant}`
|
|
1534
1510
|
);
|
|
1535
1511
|
}
|
|
1536
1512
|
if (discriminant === "other") {
|
|
1537
1513
|
const loc = descriptor.typeName || "union";
|
|
1538
|
-
throw new
|
|
1514
|
+
throw new _WireWriteError(
|
|
1539
1515
|
`${loc}: Cannot serialize 'other' variant back to wire format`
|
|
1540
1516
|
);
|
|
1541
1517
|
}
|
|
1542
1518
|
const branch = descriptor.branches.find((b) => b.typeKey === discriminant);
|
|
1543
1519
|
if (!branch) {
|
|
1544
1520
|
const loc = descriptor.typeName || "union";
|
|
1545
|
-
throw new
|
|
1521
|
+
throw new _WireWriteError(`${loc}: Unknown variant '${discriminant}'`);
|
|
1546
1522
|
}
|
|
1547
1523
|
const branchData = _apply(
|
|
1548
1524
|
new _ShapeDescriptor(descriptor.typeName, branch.shape),
|
|
@@ -1571,7 +1547,7 @@ function _configAppContextFromContext(ctx) {
|
|
|
1571
1547
|
var _JsonWireToType = {
|
|
1572
1548
|
_brand: "JsonWireToType",
|
|
1573
1549
|
createNotObjectError(loc, received) {
|
|
1574
|
-
return new
|
|
1550
|
+
return new _WireReadError(`${loc}: Expected an object but received ${received}`);
|
|
1575
1551
|
},
|
|
1576
1552
|
applyField(typeName, desc, input, strategy) {
|
|
1577
1553
|
const key = desc.type;
|
|
@@ -1580,7 +1556,7 @@ var _JsonWireToType = {
|
|
|
1580
1556
|
return [key, (desc.transform ?? _identity)(strategy, raw)];
|
|
1581
1557
|
} catch (e) {
|
|
1582
1558
|
if (e instanceof WireParseError)
|
|
1583
|
-
throw new
|
|
1559
|
+
throw new _WireReadError(`${typeName}.${desc.type}: ${e.message}`);
|
|
1584
1560
|
throw e;
|
|
1585
1561
|
}
|
|
1586
1562
|
},
|
|
@@ -1635,7 +1611,7 @@ function applyOneofFieldIncoming(typeName, oneof, input, strategy, result, exclu
|
|
|
1635
1611
|
}
|
|
1636
1612
|
} catch (e) {
|
|
1637
1613
|
if (e instanceof WireParseError) {
|
|
1638
|
-
throw new
|
|
1614
|
+
throw new _WireReadError(
|
|
1639
1615
|
`${typeName}.${oneof.discriminant}(${branch.typeKey}): ${e.message}`
|
|
1640
1616
|
);
|
|
1641
1617
|
}
|
|
@@ -1653,30 +1629,30 @@ function applyOneofFieldIncoming(typeName, oneof, input, strategy, result, exclu
|
|
|
1653
1629
|
}
|
|
1654
1630
|
}
|
|
1655
1631
|
if (!oneof.optional) {
|
|
1656
|
-
throw new
|
|
1632
|
+
throw new _WireReadError(`${typeName}.${oneof.discriminant}: no variant set`);
|
|
1657
1633
|
}
|
|
1658
1634
|
}
|
|
1659
1635
|
function applyOneofFieldOutgoing(typeName, oneof, input, strategy, result) {
|
|
1660
1636
|
const discriminant = Object.hasOwn(input, oneof.discriminant) ? input[oneof.discriminant] : void 0;
|
|
1661
1637
|
if (discriminant === void 0 || discriminant === null) {
|
|
1662
1638
|
if (!oneof.optional) {
|
|
1663
|
-
throw new
|
|
1639
|
+
throw new _WireWriteError(`${typeName}.${oneof.discriminant}: no variant set`);
|
|
1664
1640
|
}
|
|
1665
1641
|
return;
|
|
1666
1642
|
}
|
|
1667
1643
|
if (typeof discriminant !== "string") {
|
|
1668
|
-
throw new
|
|
1644
|
+
throw new _WireWriteError(
|
|
1669
1645
|
`${typeName}.${oneof.discriminant}: expected string discriminant but received ${typeof discriminant}`
|
|
1670
1646
|
);
|
|
1671
1647
|
}
|
|
1672
1648
|
if (discriminant === "other") {
|
|
1673
|
-
throw new
|
|
1649
|
+
throw new _WireWriteError(
|
|
1674
1650
|
`${typeName}.${oneof.discriminant}: cannot serialize 'other' variant back to wire format`
|
|
1675
1651
|
);
|
|
1676
1652
|
}
|
|
1677
1653
|
const branch = oneof.branches.find((b) => b.typeKey === discriminant);
|
|
1678
1654
|
if (!branch) {
|
|
1679
|
-
throw new
|
|
1655
|
+
throw new _WireWriteError(
|
|
1680
1656
|
`${typeName}.${oneof.discriminant}: unknown variant '${discriminant}'`
|
|
1681
1657
|
);
|
|
1682
1658
|
}
|
|
@@ -1686,7 +1662,7 @@ function applyOneofFieldOutgoing(typeName, oneof, input, strategy, result) {
|
|
|
1686
1662
|
result[branch.wireKey] = transformed ?? {};
|
|
1687
1663
|
} catch (e) {
|
|
1688
1664
|
if (e instanceof WireParseError) {
|
|
1689
|
-
throw new
|
|
1665
|
+
throw new _WireWriteError(
|
|
1690
1666
|
`${typeName}.${oneof.discriminant}(${branch.typeKey}): ${e.message}`
|
|
1691
1667
|
);
|
|
1692
1668
|
}
|
|
@@ -1740,7 +1716,7 @@ var billing_exports = {};
|
|
|
1740
1716
|
__export(billing_exports, {
|
|
1741
1717
|
Bill: () => bill_exports,
|
|
1742
1718
|
CustomerBalanceApplication: () => CustomerBalanceApplication,
|
|
1743
|
-
|
|
1719
|
+
InvoiceCollectionOptions: () => InvoiceCollectionOptions,
|
|
1744
1720
|
Prorations: () => Prorations,
|
|
1745
1721
|
RecurringBillingItemHandling: () => RecurringBillingItemHandling
|
|
1746
1722
|
});
|
|
@@ -2473,17 +2449,9 @@ var CustomerBalanceApplication;
|
|
|
2473
2449
|
CustomerBalanceApplication2.prepareResult = _prepareResultAlias;
|
|
2474
2450
|
})(CustomerBalanceApplication || (CustomerBalanceApplication = {}));
|
|
2475
2451
|
|
|
2476
|
-
// src/extensions/billing/
|
|
2477
|
-
var
|
|
2478
|
-
((
|
|
2479
|
-
const parentTypeEnumValues = new _ProtoEnum({
|
|
2480
|
-
PARENT_TYPE_SUBSCRIPTION: "subscription",
|
|
2481
|
-
PARENT_TYPE_CONTRACT: "contract",
|
|
2482
|
-
PARENT_TYPE_QUOTE: "quote",
|
|
2483
|
-
PARENT_TYPE_BILLING_CADENCE: "billing_cadence",
|
|
2484
|
-
PARENT_TYPE_SUBSCRIPTION_SCHEDULE: "subscription_schedule",
|
|
2485
|
-
PARENT_TYPE_STANDALONE: "standalone"
|
|
2486
|
-
});
|
|
2452
|
+
// src/extensions/billing/invoice_collection_options.ts
|
|
2453
|
+
var InvoiceCollectionOptions;
|
|
2454
|
+
((InvoiceCollectionOptions2) => {
|
|
2487
2455
|
const paymentMethodTypeEnumValues = new _ProtoEnum({
|
|
2488
2456
|
PAYMENT_METHOD_TYPE_CARD: "card",
|
|
2489
2457
|
PAYMENT_METHOD_TYPE_ACH_DEBIT: "ach_debit",
|
|
@@ -2514,25 +2482,40 @@ var InvoiceCollectionSetting;
|
|
|
2514
2482
|
PAYMENT_METHOD_TYPE_PROMPTPAY: "promptpay",
|
|
2515
2483
|
PAYMENT_METHOD_TYPE_PAYNOW: "paynow",
|
|
2516
2484
|
PAYMENT_METHOD_TYPE_GRABPAY: "grabpay",
|
|
2517
|
-
PAYMENT_METHOD_TYPE_FPX: "fpx"
|
|
2485
|
+
PAYMENT_METHOD_TYPE_FPX: "fpx",
|
|
2486
|
+
PAYMENT_METHOD_TYPE_BLIK: "blik"
|
|
2518
2487
|
});
|
|
2519
2488
|
const collectionMethodEnumValues = new _ProtoEnum({
|
|
2520
2489
|
COLLECTION_METHOD_SEND_INVOICE: "send_invoice",
|
|
2521
2490
|
COLLECTION_METHOD_CHARGE_AUTOMATICALLY: "charge_automatically"
|
|
2522
2491
|
});
|
|
2523
|
-
const
|
|
2492
|
+
const InvoiceCollectionOptionsResultDescriptor = new _ShapeDescriptor("InvoiceCollectionOptionsResult", [
|
|
2524
2493
|
{ type: "autoAdvance", transform: _identity }
|
|
2525
2494
|
]);
|
|
2526
|
-
const
|
|
2527
|
-
"
|
|
2495
|
+
const InvoiceCollectionOptionsInputDescriptor = new _ShapeDescriptor(
|
|
2496
|
+
"InvoiceCollectionOptionsInput",
|
|
2528
2497
|
[
|
|
2529
2498
|
{
|
|
2530
|
-
type: "
|
|
2531
|
-
transform: _required(_translateShape(() =>
|
|
2532
|
-
}
|
|
2533
|
-
{ type: "parent", transform: _required(_translateShape(() => ParentDescriptor)) }
|
|
2499
|
+
type: "collectionOptions",
|
|
2500
|
+
transform: _required(_translateShape(() => CollectionOptionsDescriptor))
|
|
2501
|
+
}
|
|
2534
2502
|
],
|
|
2535
2503
|
[
|
|
2504
|
+
{
|
|
2505
|
+
discriminant: "invoiceParentType",
|
|
2506
|
+
optional: false,
|
|
2507
|
+
branches: [
|
|
2508
|
+
{ wireKey: "cadence", typeKey: "cadence" },
|
|
2509
|
+
{ wireKey: "quote", typeKey: "quote" },
|
|
2510
|
+
{ wireKey: "schedule", typeKey: "schedule" },
|
|
2511
|
+
{
|
|
2512
|
+
wireKey: "subscription",
|
|
2513
|
+
typeKey: "subscription",
|
|
2514
|
+
transform: _translateShape(() => SubscriptionParentDescriptor)
|
|
2515
|
+
},
|
|
2516
|
+
{ wireKey: "contract", typeKey: "contract" }
|
|
2517
|
+
]
|
|
2518
|
+
},
|
|
2536
2519
|
{
|
|
2537
2520
|
discriminant: "payer",
|
|
2538
2521
|
optional: false,
|
|
@@ -2550,19 +2533,21 @@ var InvoiceCollectionSetting;
|
|
|
2550
2533
|
{ type: "id", transform: _required() },
|
|
2551
2534
|
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) }
|
|
2552
2535
|
]);
|
|
2553
|
-
const
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2536
|
+
const SubscriptionParentDescriptor = new _ShapeDescriptor(
|
|
2537
|
+
"SubscriptionParent",
|
|
2538
|
+
[
|
|
2539
|
+
{ type: "id", transform: _required() },
|
|
2540
|
+
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) }
|
|
2541
|
+
]
|
|
2542
|
+
);
|
|
2543
|
+
const CollectionOptionsDescriptor = new _ShapeDescriptor(
|
|
2544
|
+
"CollectionOptions",
|
|
2559
2545
|
[
|
|
2560
2546
|
{ type: "autoAdvance", transform: _required() },
|
|
2561
2547
|
{
|
|
2562
2548
|
type: "collectionMethod",
|
|
2563
2549
|
transform: _required(_translateEnum(collectionMethodEnumValues))
|
|
2564
2550
|
},
|
|
2565
|
-
{ type: "finalizationGracePeriod", transform: _required() },
|
|
2566
2551
|
{
|
|
2567
2552
|
type: "paymentMethods",
|
|
2568
2553
|
transform: _required(
|
|
@@ -2572,53 +2557,61 @@ var InvoiceCollectionSetting;
|
|
|
2572
2557
|
]
|
|
2573
2558
|
);
|
|
2574
2559
|
let __stripe_shim_active__ = false;
|
|
2575
|
-
function
|
|
2560
|
+
function prepareArgsOverrideOptions(proto) {
|
|
2576
2561
|
if (__stripe_shim_active__) {
|
|
2577
2562
|
return proto;
|
|
2578
2563
|
}
|
|
2579
2564
|
return _apply(
|
|
2580
|
-
|
|
2565
|
+
InvoiceCollectionOptionsInputDescriptor,
|
|
2581
2566
|
_ProtoWireToType,
|
|
2582
2567
|
proto
|
|
2583
2568
|
);
|
|
2584
2569
|
}
|
|
2585
|
-
|
|
2586
|
-
function
|
|
2570
|
+
InvoiceCollectionOptions2.prepareArgsOverrideOptions = prepareArgsOverrideOptions;
|
|
2571
|
+
function prepareResultOverrideOptions(result) {
|
|
2587
2572
|
if (__stripe_shim_active__) return result;
|
|
2588
2573
|
return _apply(
|
|
2589
|
-
|
|
2574
|
+
InvoiceCollectionOptionsResultDescriptor,
|
|
2590
2575
|
_TypeToProtoWire,
|
|
2591
2576
|
result
|
|
2592
2577
|
);
|
|
2593
2578
|
}
|
|
2594
|
-
|
|
2595
|
-
function $
|
|
2579
|
+
InvoiceCollectionOptions2.prepareResultOverrideOptions = prepareResultOverrideOptions;
|
|
2580
|
+
function $platformWrapOverrideOptions(configTransformer) {
|
|
2596
2581
|
return (cls, wireArgs, wireConfig, ctx) => {
|
|
2597
2582
|
__stripe_shim_active__ = true;
|
|
2598
2583
|
const instance = new cls();
|
|
2599
2584
|
const request = _apply(
|
|
2600
|
-
|
|
2585
|
+
InvoiceCollectionOptionsInputDescriptor,
|
|
2601
2586
|
_ProtoWireToType,
|
|
2602
2587
|
wireArgs
|
|
2603
2588
|
);
|
|
2604
2589
|
const config = configTransformer !== void 0 ? configTransformer(wireConfig, _configAppContextFromContext(ctx)) : wireConfig;
|
|
2605
|
-
const result = instance.
|
|
2590
|
+
const result = instance.overrideOptions(request, config, ctx);
|
|
2606
2591
|
if (_isPromiseLike(result)) {
|
|
2607
2592
|
return Promise.resolve(result).then((r) => {
|
|
2608
2593
|
const typedR = r;
|
|
2609
|
-
return _apply(
|
|
2594
|
+
return _apply(
|
|
2595
|
+
InvoiceCollectionOptionsResultDescriptor,
|
|
2596
|
+
_TypeToProtoWire,
|
|
2597
|
+
typedR
|
|
2598
|
+
);
|
|
2610
2599
|
});
|
|
2611
2600
|
}
|
|
2612
2601
|
const typedResult = result;
|
|
2613
|
-
return _apply(
|
|
2602
|
+
return _apply(
|
|
2603
|
+
InvoiceCollectionOptionsResultDescriptor,
|
|
2604
|
+
_TypeToProtoWire,
|
|
2605
|
+
typedResult
|
|
2606
|
+
);
|
|
2614
2607
|
};
|
|
2615
2608
|
}
|
|
2616
|
-
|
|
2617
|
-
const _prepareArgsAlias =
|
|
2618
|
-
|
|
2619
|
-
const _prepareResultAlias =
|
|
2620
|
-
|
|
2621
|
-
})(
|
|
2609
|
+
InvoiceCollectionOptions2.$platformWrapOverrideOptions = $platformWrapOverrideOptions;
|
|
2610
|
+
const _prepareArgsAlias = prepareArgsOverrideOptions;
|
|
2611
|
+
InvoiceCollectionOptions2.prepareArgs = _prepareArgsAlias;
|
|
2612
|
+
const _prepareResultAlias = prepareResultOverrideOptions;
|
|
2613
|
+
InvoiceCollectionOptions2.prepareResult = _prepareResultAlias;
|
|
2614
|
+
})(InvoiceCollectionOptions || (InvoiceCollectionOptions = {}));
|
|
2622
2615
|
|
|
2623
2616
|
// src/extensions/billing/prorations.ts
|
|
2624
2617
|
var Prorations;
|
|
@@ -3427,9 +3420,51 @@ var RecurringBillingItemHandling;
|
|
|
3427
3420
|
transform: _translateShape(() => CustomPricingUnitOverageRateDescriptor)
|
|
3428
3421
|
}
|
|
3429
3422
|
]
|
|
3423
|
+
},
|
|
3424
|
+
{
|
|
3425
|
+
discriminant: "creditedItems",
|
|
3426
|
+
optional: false,
|
|
3427
|
+
branches: [
|
|
3428
|
+
{
|
|
3429
|
+
wireKey: "invoiceLineItems",
|
|
3430
|
+
typeKey: "invoiceLineItems",
|
|
3431
|
+
transform: _translateShape(() => InvoiceLineItemsDescriptor)
|
|
3432
|
+
},
|
|
3433
|
+
{
|
|
3434
|
+
wireKey: "invoiceItem",
|
|
3435
|
+
typeKey: "invoiceItem",
|
|
3436
|
+
transform: _translateShape(() => CreditedInvoiceItemDescriptor)
|
|
3437
|
+
}
|
|
3438
|
+
]
|
|
3430
3439
|
}
|
|
3431
3440
|
]
|
|
3432
3441
|
);
|
|
3442
|
+
const CreditedInvoiceItemDescriptor = new _ShapeDescriptor(
|
|
3443
|
+
"CreditedInvoiceItem",
|
|
3444
|
+
[{ type: "id", transform: _required() }]
|
|
3445
|
+
);
|
|
3446
|
+
const InvoiceLineItemsDescriptor = new _ShapeDescriptor(
|
|
3447
|
+
"InvoiceLineItems",
|
|
3448
|
+
[
|
|
3449
|
+
{
|
|
3450
|
+
type: "invoice",
|
|
3451
|
+
transform: _required(_translateShape(() => CreditedInvoiceDescriptor))
|
|
3452
|
+
},
|
|
3453
|
+
{
|
|
3454
|
+
type: "invoiceLineItems",
|
|
3455
|
+
transform: _required(
|
|
3456
|
+
_translateArray(_translateShape(() => CreditedInvoiceLineItemDescriptor))
|
|
3457
|
+
)
|
|
3458
|
+
}
|
|
3459
|
+
]
|
|
3460
|
+
);
|
|
3461
|
+
const CreditedInvoiceLineItemDescriptor = new _ShapeDescriptor("CreditedInvoiceLineItem", [
|
|
3462
|
+
{ type: "id", transform: _required() }
|
|
3463
|
+
]);
|
|
3464
|
+
const CreditedInvoiceDescriptor = new _ShapeDescriptor(
|
|
3465
|
+
"CreditedInvoice",
|
|
3466
|
+
[{ type: "id", transform: _required() }]
|
|
3467
|
+
);
|
|
3433
3468
|
const CustomPricingUnitOverageRateDescriptor = new _ShapeDescriptor("CustomPricingUnitOverageRate", [
|
|
3434
3469
|
{ type: "id", transform: _required() },
|
|
3435
3470
|
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) },
|
|
@@ -4055,11 +4090,6 @@ var CustomAction2;
|
|
|
4055
4090
|
Extend,
|
|
4056
4091
|
Integer,
|
|
4057
4092
|
PositiveInteger,
|
|
4058
|
-
Ref,
|
|
4059
|
-
StreetAddress,
|
|
4060
|
-
Timestamp,
|
|
4061
|
-
WireReadError,
|
|
4062
|
-
WireWriteError,
|
|
4063
4093
|
_ConfigEnum,
|
|
4064
4094
|
_JsonWireToType,
|
|
4065
4095
|
_ProtoEnum,
|
|
@@ -4067,6 +4097,8 @@ var CustomAction2;
|
|
|
4067
4097
|
_ShapeDescriptor,
|
|
4068
4098
|
_TypeToProtoWire,
|
|
4069
4099
|
_UnionDescriptor,
|
|
4100
|
+
_WireReadError,
|
|
4101
|
+
_WireWriteError,
|
|
4070
4102
|
_apply,
|
|
4071
4103
|
_applyConfig,
|
|
4072
4104
|
_applyIncoming,
|
|
@@ -4082,6 +4114,5 @@ var CustomAction2;
|
|
|
4082
4114
|
_translateMap,
|
|
4083
4115
|
_translateShape,
|
|
4084
4116
|
_translateUnion,
|
|
4085
|
-
isDecimal,
|
|
4086
4117
|
toConst
|
|
4087
4118
|
});
|