@stripe/extensibility-sdk 1.1.0 → 1.3.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 +17 -15
- package/dist/config-values/generate.cjs +1 -1
- package/dist/config-values/generate.d.ts +1 -1
- package/dist/config-values/generate.d.ts.map +1 -1
- package/dist/config-values/generate.js +1 -1
- package/dist/extensibility-sdk-alpha.d.ts +29 -157
- package/dist/extensibility-sdk-beta.d.ts +29 -157
- package/dist/extensibility-sdk-config-values-internal.d.ts +1 -1
- package/dist/extensibility-sdk-extensions-alpha.d.ts +7 -157
- package/dist/extensibility-sdk-extensions-beta.d.ts +7 -157
- package/dist/extensibility-sdk-extensions-billing-bill-discount_calculation-alpha.d.ts +631 -0
- package/dist/extensibility-sdk-extensions-billing-bill-discount_calculation-beta.d.ts +631 -0
- package/dist/extensibility-sdk-extensions-billing-bill-discount_calculation-internal.d.ts +666 -0
- package/dist/extensibility-sdk-extensions-billing-bill-discount_calculation-public.d.ts +631 -0
- package/dist/extensibility-sdk-extensions-billing-customer_balance_application-alpha.d.ts +475 -0
- package/dist/extensibility-sdk-extensions-billing-customer_balance_application-beta.d.ts +475 -0
- package/dist/extensibility-sdk-extensions-billing-customer_balance_application-internal.d.ts +510 -0
- package/dist/extensibility-sdk-extensions-billing-customer_balance_application-public.d.ts +475 -0
- package/dist/extensibility-sdk-extensions-billing-invoice_collection_options-alpha.d.ts +110 -0
- package/dist/extensibility-sdk-extensions-billing-invoice_collection_options-beta.d.ts +110 -0
- package/dist/extensibility-sdk-extensions-billing-invoice_collection_options-internal.d.ts +123 -0
- package/dist/extensibility-sdk-extensions-billing-invoice_collection_options-public.d.ts +110 -0
- package/dist/extensibility-sdk-extensions-billing-prorations-alpha.d.ts +607 -0
- package/dist/extensibility-sdk-extensions-billing-prorations-beta.d.ts +607 -0
- package/dist/extensibility-sdk-extensions-billing-prorations-internal.d.ts +642 -0
- package/dist/extensibility-sdk-extensions-billing-prorations-public.d.ts +607 -0
- package/dist/extensibility-sdk-extensions-billing-recurring_billing_item_handling-alpha.d.ts +735 -0
- package/dist/extensibility-sdk-extensions-billing-recurring_billing_item_handling-beta.d.ts +735 -0
- package/dist/extensibility-sdk-extensions-billing-recurring_billing_item_handling-internal.d.ts +772 -0
- package/dist/extensibility-sdk-extensions-billing-recurring_billing_item_handling-public.d.ts +735 -0
- package/dist/extensibility-sdk-extensions-core-workflows-custom_action-alpha.d.ts +126 -0
- package/dist/extensibility-sdk-extensions-core-workflows-custom_action-beta.d.ts +126 -0
- package/dist/extensibility-sdk-extensions-core-workflows-custom_action-internal.d.ts +140 -0
- package/dist/extensibility-sdk-extensions-core-workflows-custom_action-public.d.ts +126 -0
- package/dist/extensibility-sdk-extensions-extend-workflows-custom_action-alpha.d.ts +126 -0
- package/dist/extensibility-sdk-extensions-extend-workflows-custom_action-beta.d.ts +126 -0
- package/dist/extensibility-sdk-extensions-extend-workflows-custom_action-internal.d.ts +140 -0
- package/dist/extensibility-sdk-extensions-extend-workflows-custom_action-public.d.ts +126 -0
- package/dist/extensibility-sdk-extensions-internal.d.ts +7 -157
- package/dist/extensibility-sdk-extensions-public.d.ts +7 -157
- package/dist/extensibility-sdk-internal-internal.d.ts +2 -2
- package/dist/extensibility-sdk-internal.d.ts +145 -162
- package/dist/extensibility-sdk-public.d.ts +29 -157
- package/dist/extensibility-sdk-stdlib-alpha.d.ts +593 -0
- package/dist/extensibility-sdk-stdlib-beta.d.ts +593 -0
- package/dist/extensibility-sdk-stdlib-internal.d.ts +1096 -0
- package/dist/extensibility-sdk-stdlib-public.d.ts +593 -0
- package/dist/extensions/billing/bill/discount_calculation.cjs +437 -0
- package/dist/extensions/billing/bill/discount_calculation.d.ts +0 -20
- package/dist/extensions/billing/bill/discount_calculation.d.ts.map +1 -1
- package/dist/extensions/billing/bill/discount_calculation.js +430 -0
- package/dist/extensions/billing/customer_balance_application.cjs +297 -0
- package/dist/extensions/billing/customer_balance_application.d.ts +0 -20
- package/dist/extensions/billing/customer_balance_application.d.ts.map +1 -1
- package/dist/extensions/billing/customer_balance_application.js +284 -0
- package/dist/extensions/billing/invoice_collection_options.cjs +166 -0
- package/dist/extensions/billing/invoice_collection_options.d.ts +4 -24
- package/dist/extensions/billing/invoice_collection_options.d.ts.map +1 -1
- package/dist/extensions/billing/invoice_collection_options.js +155 -0
- package/dist/extensions/billing/prorations.cjs +501 -0
- package/dist/extensions/billing/prorations.d.ts +0 -20
- package/dist/extensions/billing/prorations.d.ts.map +1 -1
- package/dist/extensions/billing/prorations.js +492 -0
- package/dist/extensions/billing/recurring_billing_item_handling.cjs +639 -0
- package/dist/extensions/billing/recurring_billing_item_handling.d.ts +0 -30
- package/dist/extensions/billing/recurring_billing_item_handling.d.ts.map +1 -1
- package/dist/extensions/billing/recurring_billing_item_handling.js +632 -0
- package/dist/extensions/core/workflows/custom_action.cjs +124 -0
- package/dist/extensions/core/workflows/custom_action.d.ts +1 -21
- package/dist/extensions/core/workflows/custom_action.d.ts.map +1 -1
- package/dist/extensions/core/workflows/custom_action.js +111 -0
- package/dist/extensions/extend/workflows/custom_action.cjs +124 -0
- package/dist/extensions/extend/workflows/custom_action.d.ts +1 -21
- package/dist/extensions/extend/workflows/custom_action.d.ts.map +1 -1
- package/dist/extensions/extend/workflows/custom_action.js +111 -0
- package/dist/extensions/index.cjs +27 -265
- package/dist/extensions/index.js +27 -265
- package/dist/extensions/registry.d.ts +2 -2
- package/dist/extensions/registry.d.ts.map +1 -1
- package/dist/index.cjs +452 -2390
- package/dist/index.js +479 -2286
- package/dist/internal.cjs +22 -54
- package/dist/internal.js +22 -54
- package/dist/stdlib/generated.d.ts +1 -1
- package/dist/stdlib/generated.d.ts.map +1 -1
- package/dist/stdlib/index.cjs +2003 -0
- package/dist/stdlib/index.d.ts +2 -2
- package/dist/stdlib/index.d.ts.map +1 -1
- package/dist/stdlib/index.js +1943 -0
- package/dist/stdlib/transform-strategies.d.ts +46 -6
- package/dist/stdlib/transform-strategies.d.ts.map +1 -1
- package/dist/stdlib/types.d.ts +82 -0
- package/dist/stdlib/types.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +65 -1
- package/dist/stdlib/extension-method.d.ts +0 -27
- package/dist/stdlib/extension-method.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recurring_billing_item_handling.d.ts","sourceRoot":"","sources":["../../../src/extensions/billing/recurring_billing_item_handling.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,KAAK,EACV,OAAO,EACP,yBAAyB,EAI1B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"recurring_billing_item_handling.d.ts","sourceRoot":"","sources":["../../../src/extensions/billing/recurring_billing_item_handling.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,KAAK,EACV,OAAO,EACP,yBAAyB,EAI1B,MAAM,uBAAuB,CAAC;AAsB/B,cAAc;AACd,yBAAiB,4BAA4B,CAAC;IAC5C,cAAc;IACd,KAAY,eAAe,GAAG,WAAW,GAAG,QAAQ,CAAC;IAErD,cAAc;IACd,KAAY,sBAAsB,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAEvE,cAAc;IACd,KAAY,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;IAEjD,cAAc;IACd,KAAY,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;IAElD,cAAc;IACd,KAAY,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAE/C,cAAc;IACd,KAAY,QAAQ,GAAG,QAAQ,GAAG,OAAO,CA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,EACxB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,KACb,gBAAgB,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,WAAW,4BAA4B,CAAC,MAAM;IAClD,kBAAkB,EAAE,4BAA4B,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC;IACpF,WAAW,EAAE,4BAA4B,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACtE,UAAU,EAAE,4BAA4B,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;CACrE"}
|
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
// src/extensions/billing/recurring_billing_item_handling.ts
|
|
2
|
+
import {
|
|
3
|
+
_ProtoEnum,
|
|
4
|
+
_ProtoWireToType,
|
|
5
|
+
_ShapeDescriptor,
|
|
6
|
+
_TypeToProtoWire,
|
|
7
|
+
_UnionDescriptor,
|
|
8
|
+
_apply,
|
|
9
|
+
_configAppContextFromContext,
|
|
10
|
+
_identity,
|
|
11
|
+
_isPromiseLike,
|
|
12
|
+
_required,
|
|
13
|
+
_translateArray,
|
|
14
|
+
_translateDateTime,
|
|
15
|
+
_translateDecimal,
|
|
16
|
+
_translateEnum,
|
|
17
|
+
_translateMap,
|
|
18
|
+
_translateShape,
|
|
19
|
+
_translateUnion
|
|
20
|
+
} from "@stripe/extensibility-sdk/stdlib";
|
|
21
|
+
var RecurringBillingItemHandling;
|
|
22
|
+
((RecurringBillingItemHandling2) => {
|
|
23
|
+
const pricingTierModeEnumValues = new _ProtoEnum({
|
|
24
|
+
PRICING_TIER_MODE_GRADUATED: "graduated",
|
|
25
|
+
PRICING_TIER_MODE_VOLUME: "volume"
|
|
26
|
+
});
|
|
27
|
+
const recurringPriceIntervalEnumValues = new _ProtoEnum({
|
|
28
|
+
RECURRING_PRICE_INTERVAL_DAY: "day",
|
|
29
|
+
RECURRING_PRICE_INTERVAL_WEEK: "week",
|
|
30
|
+
RECURRING_PRICE_INTERVAL_MONTH: "month",
|
|
31
|
+
RECURRING_PRICE_INTERVAL_YEAR: "year"
|
|
32
|
+
});
|
|
33
|
+
const priceTypeEnumValues = new _ProtoEnum({
|
|
34
|
+
PRICE_TYPE_ONE_TIME: "one_time",
|
|
35
|
+
PRICE_TYPE_RECURRING: "recurring"
|
|
36
|
+
});
|
|
37
|
+
const pricingSchemeEnumValues = new _ProtoEnum({
|
|
38
|
+
PRICING_SCHEME_PER_UNIT: "per_unit",
|
|
39
|
+
PRICING_SCHEME_TIERED: "tiered"
|
|
40
|
+
});
|
|
41
|
+
const usageTypeEnumValues = new _ProtoEnum({
|
|
42
|
+
USAGE_TYPE_LICENSED: "licensed",
|
|
43
|
+
USAGE_TYPE_METERED: "metered"
|
|
44
|
+
});
|
|
45
|
+
const itemTypeEnumValues = new _ProtoEnum({
|
|
46
|
+
ITEM_TYPE_CREDIT: "credit",
|
|
47
|
+
ITEM_TYPE_DEBIT: "debit"
|
|
48
|
+
});
|
|
49
|
+
const currencyEnumValues = new _ProtoEnum({
|
|
50
|
+
CURRENCY_AED: "aed",
|
|
51
|
+
CURRENCY_AFN: "afn",
|
|
52
|
+
CURRENCY_ALL: "all",
|
|
53
|
+
CURRENCY_AMD: "amd",
|
|
54
|
+
CURRENCY_ANG: "ang",
|
|
55
|
+
CURRENCY_AOA: "aoa",
|
|
56
|
+
CURRENCY_APT: "apt",
|
|
57
|
+
CURRENCY_ARB: "arb",
|
|
58
|
+
CURRENCY_ARS: "ars",
|
|
59
|
+
CURRENCY_AUD: "aud",
|
|
60
|
+
CURRENCY_AVAX: "avax",
|
|
61
|
+
CURRENCY_AWG: "awg",
|
|
62
|
+
CURRENCY_AZN: "azn",
|
|
63
|
+
CURRENCY_BAM: "bam",
|
|
64
|
+
CURRENCY_BBD: "bbd",
|
|
65
|
+
CURRENCY_BDT: "bdt",
|
|
66
|
+
CURRENCY_BGN: "bgn",
|
|
67
|
+
CURRENCY_BHD: "bhd",
|
|
68
|
+
CURRENCY_BIF: "bif",
|
|
69
|
+
CURRENCY_BMD: "bmd",
|
|
70
|
+
CURRENCY_BNB: "bnb",
|
|
71
|
+
CURRENCY_BND: "bnd",
|
|
72
|
+
CURRENCY_BOB: "bob",
|
|
73
|
+
CURRENCY_BOV: "bov",
|
|
74
|
+
CURRENCY_BRL: "brl",
|
|
75
|
+
CURRENCY_BSD: "bsd",
|
|
76
|
+
CURRENCY_BTC: "btc",
|
|
77
|
+
CURRENCY_BTN: "btn",
|
|
78
|
+
CURRENCY_BUIDL: "buidl",
|
|
79
|
+
CURRENCY_BWP: "bwp",
|
|
80
|
+
CURRENCY_BYN: "byn",
|
|
81
|
+
CURRENCY_BYR: "byr",
|
|
82
|
+
CURRENCY_BZD: "bzd",
|
|
83
|
+
CURRENCY_CAD: "cad",
|
|
84
|
+
CURRENCY_CDF: "cdf",
|
|
85
|
+
CURRENCY_CELO: "celo",
|
|
86
|
+
CURRENCY_CHE: "che",
|
|
87
|
+
CURRENCY_CHF: "chf",
|
|
88
|
+
CURRENCY_CHW: "chw",
|
|
89
|
+
CURRENCY_CLF: "clf",
|
|
90
|
+
CURRENCY_CLP: "clp",
|
|
91
|
+
CURRENCY_CNY: "cny",
|
|
92
|
+
CURRENCY_COP: "cop",
|
|
93
|
+
CURRENCY_COU: "cou",
|
|
94
|
+
CURRENCY_CRC: "crc",
|
|
95
|
+
CURRENCY_CUC: "cuc",
|
|
96
|
+
CURRENCY_CUP: "cup",
|
|
97
|
+
CURRENCY_CVE: "cve",
|
|
98
|
+
CURRENCY_CZK: "czk",
|
|
99
|
+
CURRENCY_DAI: "dai",
|
|
100
|
+
CURRENCY_DJF: "djf",
|
|
101
|
+
CURRENCY_DKK: "dkk",
|
|
102
|
+
CURRENCY_DOP: "dop",
|
|
103
|
+
CURRENCY_DZD: "dzd",
|
|
104
|
+
CURRENCY_EEK: "eek",
|
|
105
|
+
CURRENCY_EGP: "egp",
|
|
106
|
+
CURRENCY_ERN: "ern",
|
|
107
|
+
CURRENCY_ETB: "etb",
|
|
108
|
+
CURRENCY_ETH: "eth",
|
|
109
|
+
CURRENCY_EUR: "eur",
|
|
110
|
+
CURRENCY_EURC: "eurc",
|
|
111
|
+
CURRENCY_FJD: "fjd",
|
|
112
|
+
CURRENCY_FKP: "fkp",
|
|
113
|
+
CURRENCY_FRXUSD: "frxusd",
|
|
114
|
+
CURRENCY_GBP: "gbp",
|
|
115
|
+
CURRENCY_GEL: "gel",
|
|
116
|
+
CURRENCY_GHC: "ghc",
|
|
117
|
+
CURRENCY_GHS: "ghs",
|
|
118
|
+
CURRENCY_GIP: "gip",
|
|
119
|
+
CURRENCY_GMD: "gmd",
|
|
120
|
+
CURRENCY_GNF: "gnf",
|
|
121
|
+
CURRENCY_GTQ: "gtq",
|
|
122
|
+
CURRENCY_GYD: "gyd",
|
|
123
|
+
CURRENCY_HKD: "hkd",
|
|
124
|
+
CURRENCY_HNL: "hnl",
|
|
125
|
+
CURRENCY_HRK: "hrk",
|
|
126
|
+
CURRENCY_HTG: "htg",
|
|
127
|
+
CURRENCY_HUF: "huf",
|
|
128
|
+
CURRENCY_HYPE: "hype",
|
|
129
|
+
CURRENCY_IDR: "idr",
|
|
130
|
+
CURRENCY_ILS: "ils",
|
|
131
|
+
CURRENCY_INR: "inr",
|
|
132
|
+
CURRENCY_IQD: "iqd",
|
|
133
|
+
CURRENCY_IRR: "irr",
|
|
134
|
+
CURRENCY_ISK: "isk",
|
|
135
|
+
CURRENCY_JMD: "jmd",
|
|
136
|
+
CURRENCY_JOD: "jod",
|
|
137
|
+
CURRENCY_JPY: "jpy",
|
|
138
|
+
CURRENCY_KES: "kes",
|
|
139
|
+
CURRENCY_KGS: "kgs",
|
|
140
|
+
CURRENCY_KHR: "khr",
|
|
141
|
+
CURRENCY_KMF: "kmf",
|
|
142
|
+
CURRENCY_KPW: "kpw",
|
|
143
|
+
CURRENCY_KRW: "krw",
|
|
144
|
+
CURRENCY_KWD: "kwd",
|
|
145
|
+
CURRENCY_KYD: "kyd",
|
|
146
|
+
CURRENCY_KZT: "kzt",
|
|
147
|
+
CURRENCY_LAK: "lak",
|
|
148
|
+
CURRENCY_LBP: "lbp",
|
|
149
|
+
CURRENCY_LKR: "lkr",
|
|
150
|
+
CURRENCY_LRD: "lrd",
|
|
151
|
+
CURRENCY_LSL: "lsl",
|
|
152
|
+
CURRENCY_LTL: "ltl",
|
|
153
|
+
CURRENCY_LVL: "lvl",
|
|
154
|
+
CURRENCY_LYD: "lyd",
|
|
155
|
+
CURRENCY_LZD: "lzd",
|
|
156
|
+
CURRENCY_M: "m",
|
|
157
|
+
CURRENCY_MAD: "mad",
|
|
158
|
+
CURRENCY_MDL: "mdl",
|
|
159
|
+
CURRENCY_MGA: "mga",
|
|
160
|
+
CURRENCY_MKD: "mkd",
|
|
161
|
+
CURRENCY_MMK: "mmk",
|
|
162
|
+
CURRENCY_MNT: "mnt",
|
|
163
|
+
CURRENCY_MON: "mon",
|
|
164
|
+
CURRENCY_MOP: "mop",
|
|
165
|
+
CURRENCY_MRO: "mro",
|
|
166
|
+
CURRENCY_MRU: "mru",
|
|
167
|
+
CURRENCY_MUR: "mur",
|
|
168
|
+
CURRENCY_MVR: "mvr",
|
|
169
|
+
CURRENCY_MWK: "mwk",
|
|
170
|
+
CURRENCY_MXN: "mxn",
|
|
171
|
+
CURRENCY_MXV: "mxv",
|
|
172
|
+
CURRENCY_MYR: "myr",
|
|
173
|
+
CURRENCY_MZN: "mzn",
|
|
174
|
+
CURRENCY_NAD: "nad",
|
|
175
|
+
CURRENCY_NGN: "ngn",
|
|
176
|
+
CURRENCY_NIO: "nio",
|
|
177
|
+
CURRENCY_NOK: "nok",
|
|
178
|
+
CURRENCY_NPR: "npr",
|
|
179
|
+
CURRENCY_NZD: "nzd",
|
|
180
|
+
CURRENCY_OMR: "omr",
|
|
181
|
+
CURRENCY_ORD: "ord",
|
|
182
|
+
CURRENCY_PAB: "pab",
|
|
183
|
+
CURRENCY_PEN: "pen",
|
|
184
|
+
CURRENCY_PGK: "pgk",
|
|
185
|
+
CURRENCY_PHP: "php",
|
|
186
|
+
CURRENCY_PKR: "pkr",
|
|
187
|
+
CURRENCY_PLN: "pln",
|
|
188
|
+
CURRENCY_POL: "pol",
|
|
189
|
+
CURRENCY_PYG: "pyg",
|
|
190
|
+
CURRENCY_PYUSD: "pyusd",
|
|
191
|
+
CURRENCY_QAR: "qar",
|
|
192
|
+
CURRENCY_RD: "rd",
|
|
193
|
+
CURRENCY_RE: "re",
|
|
194
|
+
CURRENCY_RON: "ron",
|
|
195
|
+
CURRENCY_RSD: "rsd",
|
|
196
|
+
CURRENCY_RUB: "rub",
|
|
197
|
+
CURRENCY_RWF: "rwf",
|
|
198
|
+
CURRENCY_SAR: "sar",
|
|
199
|
+
CURRENCY_SBD: "sbd",
|
|
200
|
+
CURRENCY_SCR: "scr",
|
|
201
|
+
CURRENCY_SDG: "sdg",
|
|
202
|
+
CURRENCY_SEK: "sek",
|
|
203
|
+
CURRENCY_SGD: "sgd",
|
|
204
|
+
CURRENCY_SHP: "shp",
|
|
205
|
+
CURRENCY_SLE: "sle",
|
|
206
|
+
CURRENCY_SLL: "sll",
|
|
207
|
+
CURRENCY_SOL: "sol",
|
|
208
|
+
CURRENCY_SOS: "sos",
|
|
209
|
+
CURRENCY_SRD: "srd",
|
|
210
|
+
CURRENCY_SSP: "ssp",
|
|
211
|
+
CURRENCY_STD: "std",
|
|
212
|
+
CURRENCY_STN: "stn",
|
|
213
|
+
CURRENCY_SUI: "sui",
|
|
214
|
+
CURRENCY_SVC: "svc",
|
|
215
|
+
CURRENCY_SYP: "syp",
|
|
216
|
+
CURRENCY_SZL: "szl",
|
|
217
|
+
CURRENCY_THB: "thb",
|
|
218
|
+
CURRENCY_TJS: "tjs",
|
|
219
|
+
CURRENCY_TMT: "tmt",
|
|
220
|
+
CURRENCY_TND: "tnd",
|
|
221
|
+
CURRENCY_TOP: "top",
|
|
222
|
+
CURRENCY_TRX: "trx",
|
|
223
|
+
CURRENCY_TRY: "try",
|
|
224
|
+
CURRENCY_TTD: "ttd",
|
|
225
|
+
CURRENCY_TWD: "twd",
|
|
226
|
+
CURRENCY_TZS: "tzs",
|
|
227
|
+
CURRENCY_UAH: "uah",
|
|
228
|
+
CURRENCY_UGX: "ugx",
|
|
229
|
+
CURRENCY_USD: "usd",
|
|
230
|
+
CURRENCY_USDB: "usdb",
|
|
231
|
+
CURRENCY_USDC: "usdc",
|
|
232
|
+
CURRENCY_USDG: "usdg",
|
|
233
|
+
CURRENCY_USDSUI: "usdsui",
|
|
234
|
+
CURRENCY_USDP: "usdp",
|
|
235
|
+
CURRENCY_USDT: "usdt",
|
|
236
|
+
CURRENCY_USN: "usn",
|
|
237
|
+
CURRENCY_USTB: "ustb",
|
|
238
|
+
CURRENCY_UYI: "uyi",
|
|
239
|
+
CURRENCY_UYU: "uyu",
|
|
240
|
+
CURRENCY_UZS: "uzs",
|
|
241
|
+
CURRENCY_VEF: "vef",
|
|
242
|
+
CURRENCY_VES: "ves",
|
|
243
|
+
CURRENCY_VND: "vnd",
|
|
244
|
+
CURRENCY_VUV: "vuv",
|
|
245
|
+
CURRENCY_WST: "wst",
|
|
246
|
+
CURRENCY_XAF: "xaf",
|
|
247
|
+
CURRENCY_XCD: "xcd",
|
|
248
|
+
CURRENCY_XCG: "xcg",
|
|
249
|
+
CURRENCY_XEUR: "xeur",
|
|
250
|
+
CURRENCY_XLM: "xlm",
|
|
251
|
+
CURRENCY_XOF: "xof",
|
|
252
|
+
CURRENCY_XPF: "xpf",
|
|
253
|
+
CURRENCY_XPL: "xpl",
|
|
254
|
+
CURRENCY_XUSD: "xusd",
|
|
255
|
+
CURRENCY_OPEN_USD: "open_usd",
|
|
256
|
+
CURRENCY_YER: "yer",
|
|
257
|
+
CURRENCY_ZAR: "zar",
|
|
258
|
+
CURRENCY_ZMK: "zmk",
|
|
259
|
+
CURRENCY_ZMW: "zmw",
|
|
260
|
+
CURRENCY_ZWD: "zwd",
|
|
261
|
+
CURRENCY_ZWG: "zwg",
|
|
262
|
+
CURRENCY_ZWL: "zwl"
|
|
263
|
+
});
|
|
264
|
+
const GroupItemsResultDescriptor = new _ShapeDescriptor(
|
|
265
|
+
"GroupItemsResult",
|
|
266
|
+
[
|
|
267
|
+
{
|
|
268
|
+
type: "groups",
|
|
269
|
+
transform: _required(_translateArray(_translateShape(() => ItemGroupDescriptor)))
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
);
|
|
273
|
+
const ItemGroupDescriptor = new _ShapeDescriptor(
|
|
274
|
+
"ItemGroup",
|
|
275
|
+
[
|
|
276
|
+
{
|
|
277
|
+
type: "items",
|
|
278
|
+
transform: _required(
|
|
279
|
+
_translateArray(_translateShape(() => GroupedItemDescriptor))
|
|
280
|
+
)
|
|
281
|
+
},
|
|
282
|
+
{ type: "setsLatestInvoice", transform: _required() }
|
|
283
|
+
]
|
|
284
|
+
);
|
|
285
|
+
const GroupedItemDescriptor = new _ShapeDescriptor(
|
|
286
|
+
"GroupedItem",
|
|
287
|
+
[{ type: "key", transform: _required() }]
|
|
288
|
+
);
|
|
289
|
+
const GroupItemsInputDescriptor = new _ShapeDescriptor(
|
|
290
|
+
"GroupItemsInput",
|
|
291
|
+
[
|
|
292
|
+
{
|
|
293
|
+
type: "items",
|
|
294
|
+
transform: _required(_translateArray(_translateShape(() => ItemDescriptor)))
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
);
|
|
298
|
+
const ItemDescriptor = new _ShapeDescriptor(
|
|
299
|
+
"Item",
|
|
300
|
+
[
|
|
301
|
+
{ type: "key", transform: _required() },
|
|
302
|
+
{ type: "type", transform: _required(_translateEnum(itemTypeEnumValues)) },
|
|
303
|
+
{ type: "isProration", transform: _required() },
|
|
304
|
+
{
|
|
305
|
+
type: "servicePeriod",
|
|
306
|
+
transform: _required(_translateUnion(() => AnyTimeRangeDescriptor))
|
|
307
|
+
},
|
|
308
|
+
{ type: "prorationFactor", transform: _required(_translateDecimal) }
|
|
309
|
+
],
|
|
310
|
+
[
|
|
311
|
+
{
|
|
312
|
+
discriminant: "priceKind",
|
|
313
|
+
optional: true,
|
|
314
|
+
branches: [
|
|
315
|
+
{
|
|
316
|
+
wireKey: "price",
|
|
317
|
+
typeKey: "price",
|
|
318
|
+
transform: _translateShape(() => PriceDescriptor)
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
wireKey: "licenseFee",
|
|
322
|
+
typeKey: "licenseFee",
|
|
323
|
+
transform: _translateShape(() => LicenseFeeDescriptor)
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
wireKey: "rateCardRate",
|
|
327
|
+
typeKey: "rateCardRate",
|
|
328
|
+
transform: _translateShape(() => RateCardRateDescriptor)
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
wireKey: "customPricingUnitOverageRate",
|
|
332
|
+
typeKey: "customPricingUnitOverageRate",
|
|
333
|
+
transform: _translateShape(() => CustomPricingUnitOverageRateDescriptor)
|
|
334
|
+
}
|
|
335
|
+
]
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
discriminant: "creditedItems",
|
|
339
|
+
optional: true,
|
|
340
|
+
branches: [
|
|
341
|
+
{
|
|
342
|
+
wireKey: "invoiceLineItems",
|
|
343
|
+
typeKey: "invoiceLineItems",
|
|
344
|
+
transform: _translateShape(() => InvoiceLineItemsDescriptor)
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
wireKey: "invoiceItem",
|
|
348
|
+
typeKey: "invoiceItem",
|
|
349
|
+
transform: _translateShape(() => CreditedInvoiceItemDescriptor)
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
}
|
|
353
|
+
]
|
|
354
|
+
);
|
|
355
|
+
const CreditedInvoiceItemDescriptor = new _ShapeDescriptor(
|
|
356
|
+
"CreditedInvoiceItem",
|
|
357
|
+
[{ type: "id", transform: _required() }]
|
|
358
|
+
);
|
|
359
|
+
const InvoiceLineItemsDescriptor = new _ShapeDescriptor(
|
|
360
|
+
"InvoiceLineItems",
|
|
361
|
+
[
|
|
362
|
+
{
|
|
363
|
+
type: "invoice",
|
|
364
|
+
transform: _required(_translateShape(() => CreditedInvoiceDescriptor))
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
type: "invoiceLineItems",
|
|
368
|
+
transform: _required(
|
|
369
|
+
_translateArray(_translateShape(() => CreditedInvoiceLineItemDescriptor))
|
|
370
|
+
)
|
|
371
|
+
}
|
|
372
|
+
]
|
|
373
|
+
);
|
|
374
|
+
const CreditedInvoiceLineItemDescriptor = new _ShapeDescriptor("CreditedInvoiceLineItem", [
|
|
375
|
+
{ type: "id", transform: _required() }
|
|
376
|
+
]);
|
|
377
|
+
const CreditedInvoiceDescriptor = new _ShapeDescriptor(
|
|
378
|
+
"CreditedInvoice",
|
|
379
|
+
[{ type: "id", transform: _required() }]
|
|
380
|
+
);
|
|
381
|
+
const CustomPricingUnitOverageRateDescriptor = new _ShapeDescriptor("CustomPricingUnitOverageRate", [
|
|
382
|
+
{ type: "id", transform: _required() },
|
|
383
|
+
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) },
|
|
384
|
+
{
|
|
385
|
+
type: "rateCard",
|
|
386
|
+
transform: _required(_translateShape(() => RateCardDescriptor))
|
|
387
|
+
},
|
|
388
|
+
{ type: "customPricingUnit", transform: _required() },
|
|
389
|
+
{ type: "unitAmount", transform: _required(_translateDecimal) }
|
|
390
|
+
]);
|
|
391
|
+
const RateCardDescriptor = new _ShapeDescriptor("RateCard", [
|
|
392
|
+
{ type: "id", transform: _required() },
|
|
393
|
+
{ type: "currency", transform: _required(_translateEnum(currencyEnumValues)) }
|
|
394
|
+
]);
|
|
395
|
+
const RateCardRateDescriptor = new _ShapeDescriptor(
|
|
396
|
+
"RateCardRate",
|
|
397
|
+
[
|
|
398
|
+
{ type: "id", transform: _required() },
|
|
399
|
+
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) },
|
|
400
|
+
{
|
|
401
|
+
type: "rateCard",
|
|
402
|
+
transform: _required(_translateShape(() => RateCardDescriptor))
|
|
403
|
+
},
|
|
404
|
+
{ type: "tieringMode", transform: _translateEnum(pricingTierModeEnumValues) },
|
|
405
|
+
{
|
|
406
|
+
type: "tiers",
|
|
407
|
+
transform: _required(
|
|
408
|
+
_translateArray(_translateShape(() => RateCardRateTierDescriptor))
|
|
409
|
+
)
|
|
410
|
+
},
|
|
411
|
+
{ type: "unitAmount", transform: _translateDecimal }
|
|
412
|
+
]
|
|
413
|
+
);
|
|
414
|
+
const RateCardRateTierDescriptor = new _ShapeDescriptor(
|
|
415
|
+
"RateCardRateTier",
|
|
416
|
+
[
|
|
417
|
+
{ type: "flatAmount", transform: _translateDecimal },
|
|
418
|
+
{ type: "unitAmount", transform: _translateDecimal },
|
|
419
|
+
{ type: "upTo", transform: _translateDecimal }
|
|
420
|
+
]
|
|
421
|
+
);
|
|
422
|
+
const LicenseFeeDescriptor = new _ShapeDescriptor(
|
|
423
|
+
"LicenseFee",
|
|
424
|
+
[
|
|
425
|
+
{ type: "id", transform: _required() },
|
|
426
|
+
{ type: "lookupKey", transform: _identity },
|
|
427
|
+
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) },
|
|
428
|
+
{
|
|
429
|
+
type: "serviceInterval",
|
|
430
|
+
transform: _required(_translateEnum(recurringPriceIntervalEnumValues))
|
|
431
|
+
},
|
|
432
|
+
{ type: "serviceIntervalCount", transform: _required() },
|
|
433
|
+
{ type: "tieringMode", transform: _translateEnum(pricingTierModeEnumValues) },
|
|
434
|
+
{
|
|
435
|
+
type: "tiers",
|
|
436
|
+
transform: _required(
|
|
437
|
+
_translateArray(_translateShape(() => LicenseFeeTierDescriptor))
|
|
438
|
+
)
|
|
439
|
+
},
|
|
440
|
+
{ type: "currency", transform: _required(_translateEnum(currencyEnumValues)) },
|
|
441
|
+
{ type: "unitAmount", transform: _translateDecimal }
|
|
442
|
+
]
|
|
443
|
+
);
|
|
444
|
+
const LicenseFeeTierDescriptor = new _ShapeDescriptor(
|
|
445
|
+
"LicenseFeeTier",
|
|
446
|
+
[
|
|
447
|
+
{ type: "flatAmount", transform: _translateDecimal },
|
|
448
|
+
{ type: "unitAmount", transform: _translateDecimal },
|
|
449
|
+
{ type: "upTo", transform: _translateDecimal }
|
|
450
|
+
]
|
|
451
|
+
);
|
|
452
|
+
const PriceDescriptor = new _ShapeDescriptor("Price", [
|
|
453
|
+
{ type: "id", transform: _required() },
|
|
454
|
+
{ type: "product", transform: _required(_translateShape(() => ProductDescriptor)) },
|
|
455
|
+
{ type: "recurring", transform: _translateShape(() => RecurringPriceDescriptor) },
|
|
456
|
+
{
|
|
457
|
+
type: "billingScheme",
|
|
458
|
+
transform: _required(_translateEnum(pricingSchemeEnumValues))
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
type: "tiers",
|
|
462
|
+
transform: _required(_translateArray(_translateShape(() => PriceTierDescriptor)))
|
|
463
|
+
},
|
|
464
|
+
{ type: "type", transform: _required(_translateEnum(priceTypeEnumValues)) },
|
|
465
|
+
{ type: "tiersMode", transform: _translateEnum(pricingTierModeEnumValues) },
|
|
466
|
+
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) },
|
|
467
|
+
{ type: "currency", transform: _required(_translateEnum(currencyEnumValues)) },
|
|
468
|
+
{ type: "unitAmount", transform: _translateDecimal }
|
|
469
|
+
]);
|
|
470
|
+
const PriceTierDescriptor = new _ShapeDescriptor(
|
|
471
|
+
"PriceTier",
|
|
472
|
+
[
|
|
473
|
+
{ type: "flatAmount", transform: _translateDecimal },
|
|
474
|
+
{ type: "unitAmount", transform: _translateDecimal },
|
|
475
|
+
{ type: "upTo", transform: _identity }
|
|
476
|
+
]
|
|
477
|
+
);
|
|
478
|
+
const RecurringPriceDescriptor = new _ShapeDescriptor(
|
|
479
|
+
"RecurringPrice",
|
|
480
|
+
[
|
|
481
|
+
{
|
|
482
|
+
type: "interval",
|
|
483
|
+
transform: _required(_translateEnum(recurringPriceIntervalEnumValues))
|
|
484
|
+
},
|
|
485
|
+
{ type: "intervalCount", transform: _required() },
|
|
486
|
+
{ type: "usageType", transform: _translateEnum(usageTypeEnumValues) },
|
|
487
|
+
{ type: "meter", transform: _identity }
|
|
488
|
+
]
|
|
489
|
+
);
|
|
490
|
+
const ProductDescriptor = new _ShapeDescriptor("Product", [
|
|
491
|
+
{ type: "id", transform: _required() },
|
|
492
|
+
{ type: "name", transform: _required() },
|
|
493
|
+
{ type: "metadata", transform: _required(_translateMap(_identity, _identity)) }
|
|
494
|
+
]);
|
|
495
|
+
const FilterItemsResultDescriptor = new _ShapeDescriptor(
|
|
496
|
+
"FilterItemsResult",
|
|
497
|
+
[
|
|
498
|
+
{
|
|
499
|
+
type: "items",
|
|
500
|
+
transform: _required(
|
|
501
|
+
_translateArray(_translateShape(() => ItemToInvoiceDescriptor))
|
|
502
|
+
)
|
|
503
|
+
}
|
|
504
|
+
]
|
|
505
|
+
);
|
|
506
|
+
const ItemToInvoiceDescriptor = new _ShapeDescriptor(
|
|
507
|
+
"ItemToInvoice",
|
|
508
|
+
[{ type: "key", transform: _required() }]
|
|
509
|
+
);
|
|
510
|
+
const FilterItemsInputDescriptor = new _ShapeDescriptor(
|
|
511
|
+
"FilterItemsInput",
|
|
512
|
+
[
|
|
513
|
+
{
|
|
514
|
+
type: "items",
|
|
515
|
+
transform: _required(_translateArray(_translateShape(() => ItemDescriptor)))
|
|
516
|
+
}
|
|
517
|
+
]
|
|
518
|
+
);
|
|
519
|
+
const BeforeItemCreationResultDescriptor = new _ShapeDescriptor("BeforeItemCreationResult", [
|
|
520
|
+
{
|
|
521
|
+
type: "items",
|
|
522
|
+
transform: _required(
|
|
523
|
+
_translateArray(_translateShape(() => ItemWithCreationStrategyDescriptor))
|
|
524
|
+
)
|
|
525
|
+
}
|
|
526
|
+
]);
|
|
527
|
+
const ItemWithCreationStrategyDescriptor = new _ShapeDescriptor(
|
|
528
|
+
"ItemWithCreationStrategy",
|
|
529
|
+
[{ type: "key", transform: _required() }],
|
|
530
|
+
[
|
|
531
|
+
{
|
|
532
|
+
discriminant: "creationStrategy",
|
|
533
|
+
optional: true,
|
|
534
|
+
branches: [
|
|
535
|
+
{ wireKey: "doNotCreate", typeKey: "doNotCreate" },
|
|
536
|
+
{ wireKey: "invoice", typeKey: "invoice" }
|
|
537
|
+
]
|
|
538
|
+
}
|
|
539
|
+
]
|
|
540
|
+
);
|
|
541
|
+
const BeforeItemCreationInputDescriptor = new _ShapeDescriptor("BeforeItemCreationInput", [
|
|
542
|
+
{
|
|
543
|
+
type: "items",
|
|
544
|
+
transform: _required(_translateArray(_translateShape(() => ItemDescriptor)))
|
|
545
|
+
}
|
|
546
|
+
]);
|
|
547
|
+
const AnyTimeRangeDescriptor = new _UnionDescriptor(
|
|
548
|
+
"AnyTimeRange",
|
|
549
|
+
"value",
|
|
550
|
+
[
|
|
551
|
+
{
|
|
552
|
+
wireKey: "oneTime",
|
|
553
|
+
typeKey: "oneTime",
|
|
554
|
+
shape: [{ type: "at", transform: _required(_translateDateTime) }]
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
wireKey: "timeRange",
|
|
558
|
+
typeKey: "timeRange",
|
|
559
|
+
shape: [
|
|
560
|
+
{ type: "startDate", transform: _required(_translateDateTime) },
|
|
561
|
+
{ type: "endDate", transform: _required(_translateDateTime) }
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
]
|
|
565
|
+
);
|
|
566
|
+
function $platformWrapBeforeItemCreation(configTransformer) {
|
|
567
|
+
return (cls, wireArgs, wireConfig, ctx) => {
|
|
568
|
+
const instance = new cls();
|
|
569
|
+
const request = _apply(
|
|
570
|
+
BeforeItemCreationInputDescriptor,
|
|
571
|
+
_ProtoWireToType,
|
|
572
|
+
wireArgs
|
|
573
|
+
);
|
|
574
|
+
const config = configTransformer !== void 0 ? configTransformer(wireConfig, _configAppContextFromContext(ctx)) : wireConfig;
|
|
575
|
+
const result = instance.beforeItemCreation(request, config, ctx);
|
|
576
|
+
if (_isPromiseLike(result)) {
|
|
577
|
+
return Promise.resolve(result).then((r) => {
|
|
578
|
+
const typedR = r;
|
|
579
|
+
return _apply(BeforeItemCreationResultDescriptor, _TypeToProtoWire, typedR);
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
const typedResult = result;
|
|
583
|
+
return _apply(BeforeItemCreationResultDescriptor, _TypeToProtoWire, typedResult);
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
RecurringBillingItemHandling2.$platformWrapBeforeItemCreation = $platformWrapBeforeItemCreation;
|
|
587
|
+
function $platformWrapFilterItems(configTransformer) {
|
|
588
|
+
return (cls, wireArgs, wireConfig, ctx) => {
|
|
589
|
+
const instance = new cls();
|
|
590
|
+
const request = _apply(
|
|
591
|
+
FilterItemsInputDescriptor,
|
|
592
|
+
_ProtoWireToType,
|
|
593
|
+
wireArgs
|
|
594
|
+
);
|
|
595
|
+
const config = configTransformer !== void 0 ? configTransformer(wireConfig, _configAppContextFromContext(ctx)) : wireConfig;
|
|
596
|
+
const result = instance.filterItems(request, config, ctx);
|
|
597
|
+
if (_isPromiseLike(result)) {
|
|
598
|
+
return Promise.resolve(result).then((r) => {
|
|
599
|
+
const typedR = r;
|
|
600
|
+
return _apply(FilterItemsResultDescriptor, _TypeToProtoWire, typedR);
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
const typedResult = result;
|
|
604
|
+
return _apply(FilterItemsResultDescriptor, _TypeToProtoWire, typedResult);
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
RecurringBillingItemHandling2.$platformWrapFilterItems = $platformWrapFilterItems;
|
|
608
|
+
function $platformWrapGroupItems(configTransformer) {
|
|
609
|
+
return (cls, wireArgs, wireConfig, ctx) => {
|
|
610
|
+
const instance = new cls();
|
|
611
|
+
const request = _apply(
|
|
612
|
+
GroupItemsInputDescriptor,
|
|
613
|
+
_ProtoWireToType,
|
|
614
|
+
wireArgs
|
|
615
|
+
);
|
|
616
|
+
const config = configTransformer !== void 0 ? configTransformer(wireConfig, _configAppContextFromContext(ctx)) : wireConfig;
|
|
617
|
+
const result = instance.groupItems(request, config, ctx);
|
|
618
|
+
if (_isPromiseLike(result)) {
|
|
619
|
+
return Promise.resolve(result).then((r) => {
|
|
620
|
+
const typedR = r;
|
|
621
|
+
return _apply(GroupItemsResultDescriptor, _TypeToProtoWire, typedR);
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
const typedResult = result;
|
|
625
|
+
return _apply(GroupItemsResultDescriptor, _TypeToProtoWire, typedResult);
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
RecurringBillingItemHandling2.$platformWrapGroupItems = $platformWrapGroupItems;
|
|
629
|
+
})(RecurringBillingItemHandling || (RecurringBillingItemHandling = {}));
|
|
630
|
+
export {
|
|
631
|
+
RecurringBillingItemHandling
|
|
632
|
+
};
|