@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
|
@@ -85,6 +85,58 @@ declare type AnyTimeRange = {
|
|
|
85
85
|
value: 'other';
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Stage-2 outgoing strategy: transforms API-JSON to proto wire format.
|
|
90
|
+
* Performs structural transformations (camelCase → snake_case key renaming,
|
|
91
|
+
* SDK enum → proto enum translation, discriminated union → proto oneof,
|
|
92
|
+
* plain string → `{value: string}` decimal wrapping).
|
|
93
|
+
*
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
export declare const _ApiJsonToProto: _ApiJsonToProtoStrategy;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Branded strategy for API-JSON → proto wire (stage 2 outgoing).
|
|
100
|
+
* Performs structural transformations (key renaming back to snake_case,
|
|
101
|
+
* enum translation to proto values, union restructuring to oneof, decimal
|
|
102
|
+
* wrapping as `{value: string}`).
|
|
103
|
+
*
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
export declare interface _ApiJsonToProtoStrategy extends _ApplyStrategy {
|
|
107
|
+
/**
|
|
108
|
+
* Brand marker distinguishing this strategy from other `_ApplyStrategy` implementations.
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
readonly _brand: 'ApiJsonToProto';
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Stage-2 incoming strategy: hydrates SDK objects from API-JSON.
|
|
116
|
+
* Reads from camelCase keys (already renamed by stage 1), constructs
|
|
117
|
+
* Decimal and Date instances from plain strings, validates required
|
|
118
|
+
* fields, and recursively hydrates nested shapes and unions that are
|
|
119
|
+
* already in discriminated form.
|
|
120
|
+
*
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
export declare const _ApiJsonToType: _ApiJsonToTypeStrategy;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Branded strategy for API-JSON → SDK types (stage 2 incoming).
|
|
127
|
+
* Hydrates JS objects (Decimal, Date) from the already-restructured
|
|
128
|
+
* API-JSON intermediate format.
|
|
129
|
+
*
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
export declare interface _ApiJsonToTypeStrategy extends _ApplyStrategy {
|
|
133
|
+
/**
|
|
134
|
+
* Brand marker distinguishing this strategy from other `_ApplyStrategy` implementations.
|
|
135
|
+
* @internal
|
|
136
|
+
*/
|
|
137
|
+
readonly _brand: 'ApiJsonToType';
|
|
138
|
+
}
|
|
139
|
+
|
|
88
140
|
/**
|
|
89
141
|
* Apply a strategy to a field array, transforming each field.
|
|
90
142
|
* The strategy determines direction (proto→SDK, SDK→proto, or JSON→SDK).
|
|
@@ -105,15 +157,13 @@ export declare function _applyConfig<T, S extends _JsonWireToTypeStrategy>(descr
|
|
|
105
157
|
|
|
106
158
|
/**
|
|
107
159
|
* Apply _ProtoWireToType to a descriptor, returning the typed SDK value.
|
|
108
|
-
* Eliminates the `as unknown as T` exit cast at call sites.
|
|
109
160
|
*
|
|
110
161
|
* @internal
|
|
111
162
|
*/
|
|
112
163
|
export declare function _applyIncoming<T, S extends _ProtoWireToTypeStrategy>(descriptor: _ShapeDescriptor<S, T>, inputObject: unknown): T;
|
|
113
164
|
|
|
114
165
|
/**
|
|
115
|
-
* Apply _TypeToProtoWire to a descriptor.
|
|
116
|
-
* catching wrong-direction mistakes at compile time.
|
|
166
|
+
* Apply _TypeToProtoWire to a descriptor.
|
|
117
167
|
*
|
|
118
168
|
* @internal
|
|
119
169
|
*/
|
|
@@ -225,6 +275,13 @@ export declare class _ConfigEnum implements _EnumSpec {
|
|
|
225
275
|
toWire(value: string): null | string;
|
|
226
276
|
}
|
|
227
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Union of strategies that process config data (JSON → SDK types).
|
|
280
|
+
*
|
|
281
|
+
* @internal
|
|
282
|
+
*/
|
|
283
|
+
export declare type _ConfigStrategy = _JsonWireToTypeStrategy;
|
|
284
|
+
|
|
228
285
|
/** @public */
|
|
229
286
|
export declare interface Context {
|
|
230
287
|
type: string;
|
|
@@ -242,7 +299,7 @@ declare namespace Core {
|
|
|
242
299
|
export { Core }
|
|
243
300
|
|
|
244
301
|
/** @public */
|
|
245
|
-
export declare type Currency = 'aed' | 'afn' | 'all' | 'amd' | 'ang' | 'aoa' | 'apt' | 'arb' | 'ars' | 'aud' | 'avax' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bhd' | 'bif' | 'bmd' | 'bnb' | 'bnd' | 'bob' | 'bov' | 'brl' | 'bsd' | 'btc' | 'btn' | 'buidl' | 'bwp' | 'byn' | 'byr' | 'bzd' | 'cad' | 'cdf' | 'celo' | 'che' | 'chf' | 'chw' | 'clf' | 'clp' | 'cny' | 'cop' | 'cou' | 'crc' | 'cuc' | 'cup' | 'cve' | 'czk' | 'dai' | 'djf' | 'dkk' | 'dop' | 'dzd' | 'eek' | 'egp' | 'ern' | 'etb' | 'eth' | 'eur' | 'eurc' | 'fjd' | 'fkp' | 'frxusd' | 'gbp' | 'gel' | 'ghc' | 'ghs' | 'gip' | 'gmd' | 'gnf' | 'gtq' | 'gyd' | 'hkd' | 'hnl' | 'hrk' | 'htg' | 'huf' | 'hype' | 'idr' | 'ils' | 'inr' | 'iqd' | 'irr' | 'isk' | 'jmd' | 'jod' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'kpw' | 'krw' | 'kwd' | 'kyd' | 'kzt' | 'lak' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'ltl' | 'lvl' | 'lyd' | 'lzd' | 'm' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mru' | 'mur' | 'mvr' | 'mwk' | 'mxn' | 'mxv' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nio' | 'nok' | 'npr' | 'nzd' | 'omr' | 'pab' | 'pen' | 'pgk' | 'php' | 'pkr' | 'pln' | 'pol' | 'pyg' | 'pyusd' | 'qar' | 'rd' | 're' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sdg' | 'sek' | 'sgd' | 'shp' | 'sle' | 'sll' | 'sol' | 'sos' | 'srd' | 'ssp' | 'std' | 'stn' | 'sui' | 'svc' | 'syp' | 'szl' | 'thb' | 'tjs' | 'tmt' | 'tnd' | 'top' | 'trx' | 'try' | 'ttd' | 'twd' | 'tzs' | 'uah' | 'ugx' | 'usd' | 'usdb' | 'usdc' | 'usdg' | 'usdp' | 'usdt' | 'usn' | 'ustb' | 'uyi' | 'uyu' | 'uzs' | 'vef' | 'ves' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'xcg' | 'xeur' | 'xlm' | 'xof' | 'xpf' | 'xpl' | 'xusd' | 'yer' | 'zar' | 'zmk' | 'zmw' | 'zwd' | 'zwg' | 'zwl';
|
|
302
|
+
export declare type Currency = 'aed' | 'afn' | 'all' | 'amd' | 'ang' | 'aoa' | 'apt' | 'arb' | 'ars' | 'aud' | 'avax' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bhd' | 'bif' | 'bmd' | 'bnb' | 'bnd' | 'bob' | 'bov' | 'brl' | 'bsd' | 'btc' | 'btn' | 'buidl' | 'bwp' | 'byn' | 'byr' | 'bzd' | 'cad' | 'cdf' | 'celo' | 'che' | 'chf' | 'chw' | 'clf' | 'clp' | 'cny' | 'cop' | 'cou' | 'crc' | 'cuc' | 'cup' | 'cve' | 'czk' | 'dai' | 'djf' | 'dkk' | 'dop' | 'dzd' | 'eek' | 'egp' | 'ern' | 'etb' | 'eth' | 'eur' | 'eurc' | 'fjd' | 'fkp' | 'frxusd' | 'gbp' | 'gel' | 'ghc' | 'ghs' | 'gip' | 'gmd' | 'gnf' | 'gtq' | 'gyd' | 'hkd' | 'hnl' | 'hrk' | 'htg' | 'huf' | 'hype' | 'idr' | 'ils' | 'inr' | 'iqd' | 'irr' | 'isk' | 'jmd' | 'jod' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'kpw' | 'krw' | 'kwd' | 'kyd' | 'kzt' | 'lak' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'ltl' | 'lvl' | 'lyd' | 'lzd' | 'm' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mon' | 'mop' | 'mro' | 'mru' | 'mur' | 'mvr' | 'mwk' | 'mxn' | 'mxv' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nio' | 'nok' | 'npr' | 'nzd' | 'omr' | 'open_usd' | 'ord' | 'pab' | 'pen' | 'pgk' | 'php' | 'pkr' | 'pln' | 'pol' | 'pyg' | 'pyusd' | 'qar' | 'rd' | 're' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sdg' | 'sek' | 'sgd' | 'shp' | 'sle' | 'sll' | 'sol' | 'sos' | 'srd' | 'ssp' | 'std' | 'stn' | 'sui' | 'svc' | 'syp' | 'szl' | 'thb' | 'tjs' | 'tmt' | 'tnd' | 'top' | 'trx' | 'try' | 'ttd' | 'twd' | 'tzs' | 'uah' | 'ugx' | 'usd' | 'usdb' | 'usdc' | 'usdg' | 'usdp' | 'usdsui' | 'usdt' | 'usn' | 'ustb' | 'uyi' | 'uyu' | 'uzs' | 'vef' | 'ves' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'xcg' | 'xeur' | 'xlm' | 'xof' | 'xpf' | 'xpl' | 'xusd' | 'yer' | 'zar' | 'zmk' | 'zmw' | 'zwd' | 'zwg' | 'zwl';
|
|
246
303
|
|
|
247
304
|
/** @public */
|
|
248
305
|
declare namespace CustomAction {
|
|
@@ -252,7 +309,7 @@ declare namespace CustomAction {
|
|
|
252
309
|
*/
|
|
253
310
|
interface GetFormStateResponse {
|
|
254
311
|
/** Updated form field values. Use this to set defaults, clear dependent fields when a parent changes, or preserve matching values across schema changes. Only fields included here are updated. Omitted fields keep their current values. */
|
|
255
|
-
values
|
|
312
|
+
values?: Record<string, unknown>;
|
|
256
313
|
/** Per-field configuration keyed by field name. */
|
|
257
314
|
config: Record<string, FormStateFieldConfig>;
|
|
258
315
|
}
|
|
@@ -302,28 +359,8 @@ declare namespace CustomAction {
|
|
|
302
359
|
/** Custom input data for the action, validated against the app's input_schema. Contains the field values configured by the user in the workflow builder. */
|
|
303
360
|
customInput: Record<string, unknown>;
|
|
304
361
|
}
|
|
305
|
-
/**
|
|
306
|
-
* @public
|
|
307
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
308
|
-
*/
|
|
309
|
-
function prepareArgsExecute(proto: unknown): ExecuteCustomActionRequest;
|
|
310
|
-
/**
|
|
311
|
-
* @public
|
|
312
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
313
|
-
*/
|
|
314
|
-
function prepareResultExecute(result: ExecuteCustomActionResponse): ExecuteCustomActionResponse;
|
|
315
362
|
/** @internal */
|
|
316
363
|
function $platformWrapExecute(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { execute(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
317
|
-
/**
|
|
318
|
-
* @public
|
|
319
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
320
|
-
*/
|
|
321
|
-
function prepareArgsGetFormState(proto: unknown): GetFormStateRequest;
|
|
322
|
-
/**
|
|
323
|
-
* @public
|
|
324
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
325
|
-
*/
|
|
326
|
-
function prepareResultGetFormState(result: GetFormStateResponse): GetFormStateResponse;
|
|
327
364
|
/** @internal */
|
|
328
365
|
function $platformWrapGetFormState(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { getFormState(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
329
366
|
/**
|
|
@@ -388,7 +425,7 @@ declare namespace CustomAction_2 {
|
|
|
388
425
|
*/
|
|
389
426
|
interface GetFormStateResponse {
|
|
390
427
|
/** Updated form field values. Use this to set defaults, clear dependent fields when a parent changes, or preserve matching values across schema changes. Only fields included here are updated. Omitted fields keep their current values. */
|
|
391
|
-
values
|
|
428
|
+
values?: Record<string, unknown>;
|
|
392
429
|
/** Per-field configuration keyed by field name. */
|
|
393
430
|
config: Record<string, FormStateFieldConfig>;
|
|
394
431
|
}
|
|
@@ -438,28 +475,8 @@ declare namespace CustomAction_2 {
|
|
|
438
475
|
/** Custom input data for the action, validated against the app's input_schema. Contains the field values configured by the user in the workflow builder. */
|
|
439
476
|
customInput: Record<string, unknown>;
|
|
440
477
|
}
|
|
441
|
-
/**
|
|
442
|
-
* @public
|
|
443
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
444
|
-
*/
|
|
445
|
-
function prepareArgsExecute(proto: unknown): ExecuteCustomActionRequest;
|
|
446
|
-
/**
|
|
447
|
-
* @public
|
|
448
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
449
|
-
*/
|
|
450
|
-
function prepareResultExecute(result: ExecuteCustomActionResponse): ExecuteCustomActionResponse;
|
|
451
478
|
/** @internal */
|
|
452
479
|
function $platformWrapExecute(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { execute(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
453
|
-
/**
|
|
454
|
-
* @public
|
|
455
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
456
|
-
*/
|
|
457
|
-
function prepareArgsGetFormState(proto: unknown): GetFormStateRequest;
|
|
458
|
-
/**
|
|
459
|
-
* @public
|
|
460
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
461
|
-
*/
|
|
462
|
-
function prepareResultGetFormState(result: GetFormStateResponse): GetFormStateResponse;
|
|
463
480
|
/** @internal */
|
|
464
481
|
function $platformWrapGetFormState(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { getFormState(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
465
482
|
/**
|
|
@@ -536,28 +553,8 @@ declare namespace CustomerBalanceApplication {
|
|
|
536
553
|
/** The current customer balance available to apply. Positive values indicate debits (the customer owes money), negative values indicate credits. */
|
|
537
554
|
customerBalance: MonetaryAmount;
|
|
538
555
|
}
|
|
539
|
-
/**
|
|
540
|
-
* @public
|
|
541
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
542
|
-
*/
|
|
543
|
-
function prepareArgsComputeAppliedCustomerBalance(proto: unknown): CustomerBalanceApplicationInput;
|
|
544
|
-
/**
|
|
545
|
-
* @public
|
|
546
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
547
|
-
*/
|
|
548
|
-
function prepareResultComputeAppliedCustomerBalance(result: CustomerBalanceApplicationResult): CustomerBalanceApplicationResult;
|
|
549
556
|
/** @internal */
|
|
550
557
|
function $platformWrapComputeAppliedCustomerBalance(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { computeAppliedCustomerBalance(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
551
|
-
/**
|
|
552
|
-
* @public
|
|
553
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
554
|
-
*/
|
|
555
|
-
const prepareArgs: typeof prepareArgsComputeAppliedCustomerBalance;
|
|
556
|
-
/**
|
|
557
|
-
* @public
|
|
558
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
559
|
-
*/
|
|
560
|
-
const prepareResult: typeof prepareResultComputeAppliedCustomerBalance;
|
|
561
558
|
/**
|
|
562
559
|
* Determines how much of the customer's balance to apply toward a bill total. The script receives the invoice total and current customer balance, then returns how much of that balance to apply.
|
|
563
560
|
* @public
|
|
@@ -1035,28 +1032,8 @@ declare namespace DiscountCalculation {
|
|
|
1035
1032
|
/** Custom key-value pairs attached to the product. */
|
|
1036
1033
|
metadata: Record<string, string>;
|
|
1037
1034
|
}
|
|
1038
|
-
/**
|
|
1039
|
-
* @public
|
|
1040
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1041
|
-
*/
|
|
1042
|
-
function prepareArgsComputeDiscounts(proto: unknown): DiscountableItem;
|
|
1043
|
-
/**
|
|
1044
|
-
* @public
|
|
1045
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1046
|
-
*/
|
|
1047
|
-
function prepareResultComputeDiscounts(result: DiscountResult): DiscountResult;
|
|
1048
1035
|
/** @internal */
|
|
1049
1036
|
function $platformWrapComputeDiscounts(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { computeDiscounts(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1050
|
-
/**
|
|
1051
|
-
* @public
|
|
1052
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1053
|
-
*/
|
|
1054
|
-
const prepareArgs: typeof prepareArgsComputeDiscounts;
|
|
1055
|
-
/**
|
|
1056
|
-
* @public
|
|
1057
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1058
|
-
*/
|
|
1059
|
-
const prepareResult: typeof prepareResultComputeDiscounts;
|
|
1060
1037
|
/**
|
|
1061
1038
|
* Computes discount amounts for a discountable item and returns a discount result.
|
|
1062
1039
|
* @public
|
|
@@ -1158,6 +1135,16 @@ export declare type _FieldTransformer = (strategy: _ApplyStrategy, value: unknow
|
|
|
1158
1135
|
*/
|
|
1159
1136
|
export declare const _identity: _FieldTransformer;
|
|
1160
1137
|
|
|
1138
|
+
/**
|
|
1139
|
+
* Union of strategies that process incoming runtime data (proto-JSON or
|
|
1140
|
+
* API-JSON). Descriptors branded with this type can be used with either the
|
|
1141
|
+
* full composed pipeline (_ProtoWireToType) or just the hydration stage
|
|
1142
|
+
* (_ApiJsonToType) when structural transformation has already occurred.
|
|
1143
|
+
*
|
|
1144
|
+
* @internal
|
|
1145
|
+
*/
|
|
1146
|
+
export declare type _IncomingRuntimeStrategy = _ApiJsonToTypeStrategy | _ProtoWireToTypeStrategy;
|
|
1147
|
+
|
|
1161
1148
|
/** A branded integer — a `number` guaranteed to satisfy `Number.isInteger`. @public */
|
|
1162
1149
|
export declare type Integer = {
|
|
1163
1150
|
readonly [__integerBrand]: true;
|
|
@@ -1213,8 +1200,8 @@ declare namespace InvoiceCollectionOptions {
|
|
|
1213
1200
|
* @public
|
|
1214
1201
|
*/
|
|
1215
1202
|
interface InvoiceCollectionOptionsResult {
|
|
1216
|
-
/** Override the auto-advancement setting. Set to false to keep the invoice in draft.
|
|
1217
|
-
autoAdvance
|
|
1203
|
+
/** Override the auto-advancement setting. Set to false to keep the invoice in draft. */
|
|
1204
|
+
autoAdvance: boolean;
|
|
1218
1205
|
}
|
|
1219
1206
|
/** @public */
|
|
1220
1207
|
type InvoiceCollectionOptionsInput = ({
|
|
@@ -1265,28 +1252,8 @@ declare namespace InvoiceCollectionOptions {
|
|
|
1265
1252
|
/** The payment methods configured for this invoice. */
|
|
1266
1253
|
paymentMethods: PaymentMethodType[];
|
|
1267
1254
|
}
|
|
1268
|
-
/**
|
|
1269
|
-
* @public
|
|
1270
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1271
|
-
*/
|
|
1272
|
-
function prepareArgsOverrideOptions(proto: unknown): InvoiceCollectionOptionsInput;
|
|
1273
|
-
/**
|
|
1274
|
-
* @public
|
|
1275
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1276
|
-
*/
|
|
1277
|
-
function prepareResultOverrideOptions(result: InvoiceCollectionOptionsResult): InvoiceCollectionOptionsResult;
|
|
1278
1255
|
/** @internal */
|
|
1279
1256
|
function $platformWrapOverrideOptions(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { overrideOptions(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1280
|
-
/**
|
|
1281
|
-
* @public
|
|
1282
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1283
|
-
*/
|
|
1284
|
-
const prepareArgs: typeof prepareArgsOverrideOptions;
|
|
1285
|
-
/**
|
|
1286
|
-
* @public
|
|
1287
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1288
|
-
*/
|
|
1289
|
-
const prepareResult: typeof prepareResultOverrideOptions;
|
|
1290
1257
|
/**
|
|
1291
1258
|
* Overrides invoice collection options before a draft invoice is created.
|
|
1292
1259
|
* @public
|
|
@@ -1304,13 +1271,13 @@ declare namespace InvoiceCollectionOptions {
|
|
|
1304
1271
|
*
|
|
1305
1272
|
* export default class MyInvoiceCollectionOptions implements Billing.InvoiceCollectionOptions<MyInvoiceCollectionOptionsConfig> {
|
|
1306
1273
|
* overrideOptions(
|
|
1307
|
-
*
|
|
1274
|
+
* request: Billing.InvoiceCollectionOptions.InvoiceCollectionOptionsInput,
|
|
1308
1275
|
* _config: MyInvoiceCollectionOptionsConfig,
|
|
1309
1276
|
* _context: Context
|
|
1310
1277
|
* ) {
|
|
1311
1278
|
* // TODO: implement your collection setting logic here
|
|
1312
1279
|
*
|
|
1313
|
-
* return {};
|
|
1280
|
+
* return { autoAdvance: request.collectionOptions.autoAdvance };
|
|
1314
1281
|
* }
|
|
1315
1282
|
* }
|
|
1316
1283
|
*
|
|
@@ -1399,6 +1366,17 @@ declare interface OneTime {
|
|
|
1399
1366
|
at: Date;
|
|
1400
1367
|
}
|
|
1401
1368
|
|
|
1369
|
+
/**
|
|
1370
|
+
* Union of strategies that process outgoing runtime data (SDK types to
|
|
1371
|
+
* proto-JSON or API-JSON). Descriptors branded with this type can be used
|
|
1372
|
+
* with either the full composed pipeline (_TypeToProtoWire) or just the
|
|
1373
|
+
* dehydration stage (_TypeToApiJson) when structural transformation will
|
|
1374
|
+
* occur externally.
|
|
1375
|
+
*
|
|
1376
|
+
* @internal
|
|
1377
|
+
*/
|
|
1378
|
+
export declare type _OutgoingRuntimeStrategy = _TypeToApiJsonStrategy | _TypeToProtoWireStrategy;
|
|
1379
|
+
|
|
1402
1380
|
/**
|
|
1403
1381
|
* Represents a percentage number value (0-100).
|
|
1404
1382
|
* @format percent
|
|
@@ -1598,28 +1576,8 @@ declare namespace Prorations {
|
|
|
1598
1576
|
name: string;
|
|
1599
1577
|
metadata: Record<string, string>;
|
|
1600
1578
|
}
|
|
1601
|
-
/**
|
|
1602
|
-
* @public
|
|
1603
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1604
|
-
*/
|
|
1605
|
-
function prepareArgsProrateItems(proto: unknown): ProrateItemsInput;
|
|
1606
|
-
/**
|
|
1607
|
-
* @public
|
|
1608
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1609
|
-
*/
|
|
1610
|
-
function prepareResultProrateItems(result: ProrateItemsResult): ProrateItemsResult;
|
|
1611
1579
|
/** @internal */
|
|
1612
1580
|
function $platformWrapProrateItems(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { prorateItems(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1613
|
-
/**
|
|
1614
|
-
* @public
|
|
1615
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1616
|
-
*/
|
|
1617
|
-
const prepareArgs: typeof prepareArgsProrateItems;
|
|
1618
|
-
/**
|
|
1619
|
-
* @public
|
|
1620
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1621
|
-
*/
|
|
1622
|
-
const prepareResult: typeof prepareResultProrateItems;
|
|
1623
1581
|
/**
|
|
1624
1582
|
* Calculates prorated amounts for subscription items when changes occur mid-billing period. The script receives the invoice items, then returns computed proration factors for each item.
|
|
1625
1583
|
* @public
|
|
@@ -1680,7 +1638,35 @@ export declare class _ProtoEnum implements _EnumSpec {
|
|
|
1680
1638
|
}
|
|
1681
1639
|
|
|
1682
1640
|
/**
|
|
1683
|
-
*
|
|
1641
|
+
* Stage-1 incoming strategy: transforms proto wire data to API-JSON.
|
|
1642
|
+
* Performs all structural operations (key renaming, enum translation,
|
|
1643
|
+
* union/oneof restructuring) but leaves values as plain JSON -- decimals
|
|
1644
|
+
* become plain strings (unwrapped from the proto `{value}` wrapper) and
|
|
1645
|
+
* datetimes pass through as ISO strings.
|
|
1646
|
+
*
|
|
1647
|
+
* @internal
|
|
1648
|
+
*/
|
|
1649
|
+
export declare const _ProtoToApiJson: _ProtoToApiJsonStrategy;
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* Branded strategy for proto wire → API-JSON (stage 1 incoming).
|
|
1653
|
+
* Performs structural transformations (key renaming, enum translation,
|
|
1654
|
+
* union restructuring, decimal unwrapping) without hydrating JS objects.
|
|
1655
|
+
*
|
|
1656
|
+
* @internal
|
|
1657
|
+
*/
|
|
1658
|
+
export declare interface _ProtoToApiJsonStrategy extends _ApplyStrategy {
|
|
1659
|
+
/**
|
|
1660
|
+
* Brand marker distinguishing this strategy from other `_ApplyStrategy` implementations.
|
|
1661
|
+
* @internal
|
|
1662
|
+
*/
|
|
1663
|
+
readonly _brand: 'ProtoToApiJson';
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* Composed incoming strategy (proto wire → SDK types).
|
|
1668
|
+
* Delegates structural work to {@link _ProtoToApiJson} and hydration to
|
|
1669
|
+
* {@link _ApiJsonToType}, composed at the per-field-translator level.
|
|
1684
1670
|
*
|
|
1685
1671
|
* @internal
|
|
1686
1672
|
*/
|
|
@@ -1940,40 +1926,10 @@ declare namespace RecurringBillingItemHandling {
|
|
|
1940
1926
|
/** The list of items to evaluate for creation. */
|
|
1941
1927
|
items: Item[];
|
|
1942
1928
|
}
|
|
1943
|
-
/**
|
|
1944
|
-
* @public
|
|
1945
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1946
|
-
*/
|
|
1947
|
-
function prepareArgsBeforeItemCreation(proto: unknown): BeforeItemCreationInput;
|
|
1948
|
-
/**
|
|
1949
|
-
* @public
|
|
1950
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1951
|
-
*/
|
|
1952
|
-
function prepareResultBeforeItemCreation(result: BeforeItemCreationResult): BeforeItemCreationResult;
|
|
1953
1929
|
/** @internal */
|
|
1954
1930
|
function $platformWrapBeforeItemCreation(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { beforeItemCreation(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1955
|
-
/**
|
|
1956
|
-
* @public
|
|
1957
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1958
|
-
*/
|
|
1959
|
-
function prepareArgsFilterItems(proto: unknown): FilterItemsInput;
|
|
1960
|
-
/**
|
|
1961
|
-
* @public
|
|
1962
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1963
|
-
*/
|
|
1964
|
-
function prepareResultFilterItems(result: FilterItemsResult): FilterItemsResult;
|
|
1965
1931
|
/** @internal */
|
|
1966
1932
|
function $platformWrapFilterItems(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { filterItems(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1967
|
-
/**
|
|
1968
|
-
* @public
|
|
1969
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1970
|
-
*/
|
|
1971
|
-
function prepareArgsGroupItems(proto: unknown): GroupItemsInput;
|
|
1972
|
-
/**
|
|
1973
|
-
* @public
|
|
1974
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1975
|
-
*/
|
|
1976
|
-
function prepareResultGroupItems(result: GroupItemsResult): GroupItemsResult;
|
|
1977
1933
|
/** @internal */
|
|
1978
1934
|
function $platformWrapGroupItems(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { groupItems(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1979
1935
|
/**
|
|
@@ -2225,7 +2181,34 @@ export declare function _translateShape(getDesc: () => _ShapeDescriptor): _Field
|
|
|
2225
2181
|
export declare function _translateUnion(getDesc: () => _UnionDescriptor): _FieldTransformer;
|
|
2226
2182
|
|
|
2227
2183
|
/**
|
|
2228
|
-
*
|
|
2184
|
+
* Stage-1 outgoing strategy: dehydrates SDK objects to API-JSON.
|
|
2185
|
+
* Converts Decimal → string, Date → ISO string, but keeps camelCase keys
|
|
2186
|
+
* and SDK enum values unchanged (structural transformation is stage 2).
|
|
2187
|
+
*
|
|
2188
|
+
* @internal
|
|
2189
|
+
*/
|
|
2190
|
+
export declare const _TypeToApiJson: _TypeToApiJsonStrategy;
|
|
2191
|
+
|
|
2192
|
+
/**
|
|
2193
|
+
* Branded strategy for SDK types → API-JSON (stage 1 outgoing).
|
|
2194
|
+
* Dehydrates JS objects (Decimal → string, Date → ISO string) without
|
|
2195
|
+
* performing structural transformations (key renaming stays camelCase).
|
|
2196
|
+
*
|
|
2197
|
+
* @internal
|
|
2198
|
+
*/
|
|
2199
|
+
export declare interface _TypeToApiJsonStrategy extends _ApplyStrategy {
|
|
2200
|
+
/**
|
|
2201
|
+
* Brand marker distinguishing this strategy from other `_ApplyStrategy` implementations.
|
|
2202
|
+
* @internal
|
|
2203
|
+
*/
|
|
2204
|
+
readonly _brand: 'TypeToApiJson';
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
/**
|
|
2208
|
+
* Composed outgoing strategy (SDK types → proto wire).
|
|
2209
|
+
* Delegates dehydration to {@link _TypeToApiJson} and structural
|
|
2210
|
+
* transformation to {@link _ApiJsonToProto}, composed at the
|
|
2211
|
+
* per-field-translator level.
|
|
2229
2212
|
*
|
|
2230
2213
|
* @internal
|
|
2231
2214
|
*/
|