@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
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/* Excluded from this release type: _ConfigApplicationContext */
|
|
2
|
+
|
|
3
|
+
/** @public */
|
|
4
|
+
declare interface Context {
|
|
5
|
+
type: string;
|
|
6
|
+
id: string;
|
|
7
|
+
livemode: boolean;
|
|
8
|
+
stripeContext?: string;
|
|
9
|
+
clockTime?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** @public */
|
|
13
|
+
export declare namespace CustomAction {
|
|
14
|
+
/**
|
|
15
|
+
* Response payload for GetFormState.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export interface GetFormStateResponse {
|
|
19
|
+
/** 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. */
|
|
20
|
+
values?: Record<string, unknown>;
|
|
21
|
+
/** Per-field configuration keyed by field name. */
|
|
22
|
+
config: Record<string, FormStateFieldConfig>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Configuration for a single form field, returned by GetFormState.
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export interface FormStateFieldConfig {
|
|
29
|
+
/** Dropdown options for `dynamic_select` fields. */
|
|
30
|
+
options: SelectOption[];
|
|
31
|
+
/** JSON Schema for dynamic_schema fields. Defines the structure of a dynamic object field (for example, template merge variables). V0 limitation: must be a flat object with string properties only. */
|
|
32
|
+
schema: Record<string, unknown>;
|
|
33
|
+
/** Whether the field is disabled (non-interactive). */
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** Whether the field is hidden from the form. */
|
|
36
|
+
hidden?: boolean;
|
|
37
|
+
/** Warning message displayed on the field. You can still save the workflow. */
|
|
38
|
+
warning?: string;
|
|
39
|
+
/** Error message displayed on the field. Blocks saving the workflow. */
|
|
40
|
+
error?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* An option in a dynamic_select dropdown.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export interface SelectOption {
|
|
47
|
+
value: string;
|
|
48
|
+
label: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Request payload for GetFormState, sent at configuration time.
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export interface GetFormStateRequest {
|
|
55
|
+
/** Current form field values. Contains all field values in the form, including fields the user has not yet interacted with (which might be null). */
|
|
56
|
+
values: Record<string, unknown>;
|
|
57
|
+
/** The name of the field that just changed, triggering this request. Empty on initial form load; set to the field name (for example, `audience_id`) when a user changes a value. */
|
|
58
|
+
changedField?: string;
|
|
59
|
+
}
|
|
60
|
+
/** @public */
|
|
61
|
+
export type ExecuteCustomActionResponse = Record<string, never>;
|
|
62
|
+
/**
|
|
63
|
+
* Request payload for executing a custom action, provided at workflow runtime.
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
export interface ExecuteCustomActionRequest {
|
|
67
|
+
/** 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. */
|
|
68
|
+
customInput: Record<string, unknown>;
|
|
69
|
+
}
|
|
70
|
+
/* Excluded from this release type: $platformWrapExecute */
|
|
71
|
+
/* Excluded from this release type: $platformWrapGetFormState */
|
|
72
|
+
/**
|
|
73
|
+
* Executes the custom action at workflow runtime. Called when a workflow triggers this action, with the configured input values.
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export type ExecuteFunction<Config> = (request: ExecuteCustomActionRequest, config: Config, context: Context) => ExecuteCustomActionResponse | PromiseLike<ExecuteCustomActionResponse>;
|
|
77
|
+
/**
|
|
78
|
+
* Returns the current form state for the action's configuration UI. Called at configuration time (not runtime) to power dynamic form behavior, including dropdown options, dynamic JSON schemas, field visibility, and validation.
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
export type GetFormStateFunction<Config> = (request: GetFormStateRequest, config: Config, context: Context) => GetFormStateResponse | PromiseLike<GetFormStateResponse>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
88
|
+
*
|
|
89
|
+
* // eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
90
|
+
* interface MyCustomActionConfig {}
|
|
91
|
+
*
|
|
92
|
+
* export default class MyCustomAction implements Extend.Workflows
|
|
93
|
+
* .CustomAction<MyCustomActionConfig> {
|
|
94
|
+
* execute(
|
|
95
|
+
* _request: Extend.Workflows.CustomAction.ExecuteCustomActionRequest,
|
|
96
|
+
* _config: MyCustomActionConfig,
|
|
97
|
+
* _context: Context
|
|
98
|
+
* ) {
|
|
99
|
+
* // TODO: implement your action logic here
|
|
100
|
+
*
|
|
101
|
+
* return {};
|
|
102
|
+
* }
|
|
103
|
+
*
|
|
104
|
+
* getFormState(
|
|
105
|
+
* _request: Extend.Workflows.CustomAction.GetFormStateRequest,
|
|
106
|
+
* _config: MyCustomActionConfig,
|
|
107
|
+
* _context: Context
|
|
108
|
+
* ) {
|
|
109
|
+
* // TODO: implement your logic here
|
|
110
|
+
*
|
|
111
|
+
* return {
|
|
112
|
+
* values: {},
|
|
113
|
+
* config: {},
|
|
114
|
+
* };
|
|
115
|
+
* }
|
|
116
|
+
* }
|
|
117
|
+
*
|
|
118
|
+
* ```
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
export declare interface CustomAction<Config> {
|
|
122
|
+
execute: CustomAction.ExecuteFunction<Config>;
|
|
123
|
+
getFormState?: CustomAction.GetFormStateFunction<Config>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export { }
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context values threaded into config application at runtime.
|
|
3
|
+
*
|
|
4
|
+
* The platform dispatch layer builds this from the extension context
|
|
5
|
+
* (`_configAppContextFromContext`) and passes it through the config
|
|
6
|
+
* transformer into `_applyConfig`.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
declare interface _ConfigApplicationContext {
|
|
11
|
+
/** ISO 8601 clock time for Billing test clocks. */
|
|
12
|
+
clockTime?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** @public */
|
|
16
|
+
declare interface Context {
|
|
17
|
+
type: string;
|
|
18
|
+
id: string;
|
|
19
|
+
livemode: boolean;
|
|
20
|
+
stripeContext?: string;
|
|
21
|
+
clockTime?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** @public */
|
|
25
|
+
export declare namespace CustomAction {
|
|
26
|
+
/**
|
|
27
|
+
* Response payload for GetFormState.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export interface GetFormStateResponse {
|
|
31
|
+
/** 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. */
|
|
32
|
+
values?: Record<string, unknown>;
|
|
33
|
+
/** Per-field configuration keyed by field name. */
|
|
34
|
+
config: Record<string, FormStateFieldConfig>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Configuration for a single form field, returned by GetFormState.
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export interface FormStateFieldConfig {
|
|
41
|
+
/** Dropdown options for `dynamic_select` fields. */
|
|
42
|
+
options: SelectOption[];
|
|
43
|
+
/** JSON Schema for dynamic_schema fields. Defines the structure of a dynamic object field (for example, template merge variables). V0 limitation: must be a flat object with string properties only. */
|
|
44
|
+
schema: Record<string, unknown>;
|
|
45
|
+
/** Whether the field is disabled (non-interactive). */
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
/** Whether the field is hidden from the form. */
|
|
48
|
+
hidden?: boolean;
|
|
49
|
+
/** Warning message displayed on the field. You can still save the workflow. */
|
|
50
|
+
warning?: string;
|
|
51
|
+
/** Error message displayed on the field. Blocks saving the workflow. */
|
|
52
|
+
error?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* An option in a dynamic_select dropdown.
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
export interface SelectOption {
|
|
59
|
+
value: string;
|
|
60
|
+
label: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Request payload for GetFormState, sent at configuration time.
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
export interface GetFormStateRequest {
|
|
67
|
+
/** Current form field values. Contains all field values in the form, including fields the user has not yet interacted with (which might be null). */
|
|
68
|
+
values: Record<string, unknown>;
|
|
69
|
+
/** The name of the field that just changed, triggering this request. Empty on initial form load; set to the field name (for example, `audience_id`) when a user changes a value. */
|
|
70
|
+
changedField?: string;
|
|
71
|
+
}
|
|
72
|
+
/** @public */
|
|
73
|
+
export type ExecuteCustomActionResponse = Record<string, never>;
|
|
74
|
+
/**
|
|
75
|
+
* Request payload for executing a custom action, provided at workflow runtime.
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
export interface ExecuteCustomActionRequest {
|
|
79
|
+
/** 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. */
|
|
80
|
+
customInput: Record<string, unknown>;
|
|
81
|
+
}
|
|
82
|
+
/** @internal */
|
|
83
|
+
export function $platformWrapExecute(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { execute(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
84
|
+
/** @internal */
|
|
85
|
+
export function $platformWrapGetFormState(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { getFormState(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
86
|
+
/**
|
|
87
|
+
* Executes the custom action at workflow runtime. Called when a workflow triggers this action, with the configured input values.
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export type ExecuteFunction<Config> = (request: ExecuteCustomActionRequest, config: Config, context: Context) => ExecuteCustomActionResponse | PromiseLike<ExecuteCustomActionResponse>;
|
|
91
|
+
/**
|
|
92
|
+
* Returns the current form state for the action's configuration UI. Called at configuration time (not runtime) to power dynamic form behavior, including dropdown options, dynamic JSON schemas, field visibility, and validation.
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
export type GetFormStateFunction<Config> = (request: GetFormStateRequest, config: Config, context: Context) => GetFormStateResponse | PromiseLike<GetFormStateResponse>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
102
|
+
*
|
|
103
|
+
* // eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
104
|
+
* interface MyCustomActionConfig {}
|
|
105
|
+
*
|
|
106
|
+
* export default class MyCustomAction implements Extend.Workflows
|
|
107
|
+
* .CustomAction<MyCustomActionConfig> {
|
|
108
|
+
* execute(
|
|
109
|
+
* _request: Extend.Workflows.CustomAction.ExecuteCustomActionRequest,
|
|
110
|
+
* _config: MyCustomActionConfig,
|
|
111
|
+
* _context: Context
|
|
112
|
+
* ) {
|
|
113
|
+
* // TODO: implement your action logic here
|
|
114
|
+
*
|
|
115
|
+
* return {};
|
|
116
|
+
* }
|
|
117
|
+
*
|
|
118
|
+
* getFormState(
|
|
119
|
+
* _request: Extend.Workflows.CustomAction.GetFormStateRequest,
|
|
120
|
+
* _config: MyCustomActionConfig,
|
|
121
|
+
* _context: Context
|
|
122
|
+
* ) {
|
|
123
|
+
* // TODO: implement your logic here
|
|
124
|
+
*
|
|
125
|
+
* return {
|
|
126
|
+
* values: {},
|
|
127
|
+
* config: {},
|
|
128
|
+
* };
|
|
129
|
+
* }
|
|
130
|
+
* }
|
|
131
|
+
*
|
|
132
|
+
* ```
|
|
133
|
+
* @public
|
|
134
|
+
*/
|
|
135
|
+
export declare interface CustomAction<Config> {
|
|
136
|
+
execute: CustomAction.ExecuteFunction<Config>;
|
|
137
|
+
getFormState?: CustomAction.GetFormStateFunction<Config>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export { }
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/* Excluded from this release type: _ConfigApplicationContext */
|
|
2
|
+
|
|
3
|
+
/** @public */
|
|
4
|
+
declare interface Context {
|
|
5
|
+
type: string;
|
|
6
|
+
id: string;
|
|
7
|
+
livemode: boolean;
|
|
8
|
+
stripeContext?: string;
|
|
9
|
+
clockTime?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** @public */
|
|
13
|
+
export declare namespace CustomAction {
|
|
14
|
+
/**
|
|
15
|
+
* Response payload for GetFormState.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export interface GetFormStateResponse {
|
|
19
|
+
/** 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. */
|
|
20
|
+
values?: Record<string, unknown>;
|
|
21
|
+
/** Per-field configuration keyed by field name. */
|
|
22
|
+
config: Record<string, FormStateFieldConfig>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Configuration for a single form field, returned by GetFormState.
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export interface FormStateFieldConfig {
|
|
29
|
+
/** Dropdown options for `dynamic_select` fields. */
|
|
30
|
+
options: SelectOption[];
|
|
31
|
+
/** JSON Schema for dynamic_schema fields. Defines the structure of a dynamic object field (for example, template merge variables). V0 limitation: must be a flat object with string properties only. */
|
|
32
|
+
schema: Record<string, unknown>;
|
|
33
|
+
/** Whether the field is disabled (non-interactive). */
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** Whether the field is hidden from the form. */
|
|
36
|
+
hidden?: boolean;
|
|
37
|
+
/** Warning message displayed on the field. You can still save the workflow. */
|
|
38
|
+
warning?: string;
|
|
39
|
+
/** Error message displayed on the field. Blocks saving the workflow. */
|
|
40
|
+
error?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* An option in a dynamic_select dropdown.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export interface SelectOption {
|
|
47
|
+
value: string;
|
|
48
|
+
label: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Request payload for GetFormState, sent at configuration time.
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export interface GetFormStateRequest {
|
|
55
|
+
/** Current form field values. Contains all field values in the form, including fields the user has not yet interacted with (which might be null). */
|
|
56
|
+
values: Record<string, unknown>;
|
|
57
|
+
/** The name of the field that just changed, triggering this request. Empty on initial form load; set to the field name (for example, `audience_id`) when a user changes a value. */
|
|
58
|
+
changedField?: string;
|
|
59
|
+
}
|
|
60
|
+
/** @public */
|
|
61
|
+
export type ExecuteCustomActionResponse = Record<string, never>;
|
|
62
|
+
/**
|
|
63
|
+
* Request payload for executing a custom action, provided at workflow runtime.
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
export interface ExecuteCustomActionRequest {
|
|
67
|
+
/** 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. */
|
|
68
|
+
customInput: Record<string, unknown>;
|
|
69
|
+
}
|
|
70
|
+
/* Excluded from this release type: $platformWrapExecute */
|
|
71
|
+
/* Excluded from this release type: $platformWrapGetFormState */
|
|
72
|
+
/**
|
|
73
|
+
* Executes the custom action at workflow runtime. Called when a workflow triggers this action, with the configured input values.
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export type ExecuteFunction<Config> = (request: ExecuteCustomActionRequest, config: Config, context: Context) => ExecuteCustomActionResponse | PromiseLike<ExecuteCustomActionResponse>;
|
|
77
|
+
/**
|
|
78
|
+
* Returns the current form state for the action's configuration UI. Called at configuration time (not runtime) to power dynamic form behavior, including dropdown options, dynamic JSON schemas, field visibility, and validation.
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
export type GetFormStateFunction<Config> = (request: GetFormStateRequest, config: Config, context: Context) => GetFormStateResponse | PromiseLike<GetFormStateResponse>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
88
|
+
*
|
|
89
|
+
* // eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
90
|
+
* interface MyCustomActionConfig {}
|
|
91
|
+
*
|
|
92
|
+
* export default class MyCustomAction implements Extend.Workflows
|
|
93
|
+
* .CustomAction<MyCustomActionConfig> {
|
|
94
|
+
* execute(
|
|
95
|
+
* _request: Extend.Workflows.CustomAction.ExecuteCustomActionRequest,
|
|
96
|
+
* _config: MyCustomActionConfig,
|
|
97
|
+
* _context: Context
|
|
98
|
+
* ) {
|
|
99
|
+
* // TODO: implement your action logic here
|
|
100
|
+
*
|
|
101
|
+
* return {};
|
|
102
|
+
* }
|
|
103
|
+
*
|
|
104
|
+
* getFormState(
|
|
105
|
+
* _request: Extend.Workflows.CustomAction.GetFormStateRequest,
|
|
106
|
+
* _config: MyCustomActionConfig,
|
|
107
|
+
* _context: Context
|
|
108
|
+
* ) {
|
|
109
|
+
* // TODO: implement your logic here
|
|
110
|
+
*
|
|
111
|
+
* return {
|
|
112
|
+
* values: {},
|
|
113
|
+
* config: {},
|
|
114
|
+
* };
|
|
115
|
+
* }
|
|
116
|
+
* }
|
|
117
|
+
*
|
|
118
|
+
* ```
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
export declare interface CustomAction<Config> {
|
|
122
|
+
execute: CustomAction.ExecuteFunction<Config>;
|
|
123
|
+
getFormState?: CustomAction.GetFormStateFunction<Config>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export { }
|
|
@@ -132,7 +132,7 @@ declare namespace Core {
|
|
|
132
132
|
export { Core }
|
|
133
133
|
|
|
134
134
|
/** @public */
|
|
135
|
-
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';
|
|
135
|
+
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';
|
|
136
136
|
|
|
137
137
|
/** @public */
|
|
138
138
|
declare namespace CustomAction {
|
|
@@ -142,7 +142,7 @@ declare namespace CustomAction {
|
|
|
142
142
|
*/
|
|
143
143
|
interface GetFormStateResponse {
|
|
144
144
|
/** 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. */
|
|
145
|
-
values
|
|
145
|
+
values?: Record<string, unknown>;
|
|
146
146
|
/** Per-field configuration keyed by field name. */
|
|
147
147
|
config: Record<string, FormStateFieldConfig>;
|
|
148
148
|
}
|
|
@@ -192,28 +192,8 @@ declare namespace CustomAction {
|
|
|
192
192
|
/** 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. */
|
|
193
193
|
customInput: Record<string, unknown>;
|
|
194
194
|
}
|
|
195
|
-
/**
|
|
196
|
-
* @public
|
|
197
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
198
|
-
*/
|
|
199
|
-
function prepareArgsExecute(proto: unknown): ExecuteCustomActionRequest;
|
|
200
|
-
/**
|
|
201
|
-
* @public
|
|
202
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
203
|
-
*/
|
|
204
|
-
function prepareResultExecute(result: ExecuteCustomActionResponse): ExecuteCustomActionResponse;
|
|
205
195
|
/** @internal */
|
|
206
196
|
function $platformWrapExecute(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { execute(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
207
|
-
/**
|
|
208
|
-
* @public
|
|
209
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
210
|
-
*/
|
|
211
|
-
function prepareArgsGetFormState(proto: unknown): GetFormStateRequest;
|
|
212
|
-
/**
|
|
213
|
-
* @public
|
|
214
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
215
|
-
*/
|
|
216
|
-
function prepareResultGetFormState(result: GetFormStateResponse): GetFormStateResponse;
|
|
217
197
|
/** @internal */
|
|
218
198
|
function $platformWrapGetFormState(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { getFormState(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
219
199
|
/**
|
|
@@ -278,7 +258,7 @@ declare namespace CustomAction_2 {
|
|
|
278
258
|
*/
|
|
279
259
|
interface GetFormStateResponse {
|
|
280
260
|
/** 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. */
|
|
281
|
-
values
|
|
261
|
+
values?: Record<string, unknown>;
|
|
282
262
|
/** Per-field configuration keyed by field name. */
|
|
283
263
|
config: Record<string, FormStateFieldConfig>;
|
|
284
264
|
}
|
|
@@ -328,28 +308,8 @@ declare namespace CustomAction_2 {
|
|
|
328
308
|
/** 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. */
|
|
329
309
|
customInput: Record<string, unknown>;
|
|
330
310
|
}
|
|
331
|
-
/**
|
|
332
|
-
* @public
|
|
333
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
334
|
-
*/
|
|
335
|
-
function prepareArgsExecute(proto: unknown): ExecuteCustomActionRequest;
|
|
336
|
-
/**
|
|
337
|
-
* @public
|
|
338
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
339
|
-
*/
|
|
340
|
-
function prepareResultExecute(result: ExecuteCustomActionResponse): ExecuteCustomActionResponse;
|
|
341
311
|
/** @internal */
|
|
342
312
|
function $platformWrapExecute(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { execute(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
343
|
-
/**
|
|
344
|
-
* @public
|
|
345
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
346
|
-
*/
|
|
347
|
-
function prepareArgsGetFormState(proto: unknown): GetFormStateRequest;
|
|
348
|
-
/**
|
|
349
|
-
* @public
|
|
350
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
351
|
-
*/
|
|
352
|
-
function prepareResultGetFormState(result: GetFormStateResponse): GetFormStateResponse;
|
|
353
313
|
/** @internal */
|
|
354
314
|
function $platformWrapGetFormState(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { getFormState(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
355
315
|
/**
|
|
@@ -426,28 +386,8 @@ declare namespace CustomerBalanceApplication {
|
|
|
426
386
|
/** The current customer balance available to apply. Positive values indicate debits (the customer owes money), negative values indicate credits. */
|
|
427
387
|
customerBalance: MonetaryAmount;
|
|
428
388
|
}
|
|
429
|
-
/**
|
|
430
|
-
* @public
|
|
431
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
432
|
-
*/
|
|
433
|
-
function prepareArgsComputeAppliedCustomerBalance(proto: unknown): CustomerBalanceApplicationInput;
|
|
434
|
-
/**
|
|
435
|
-
* @public
|
|
436
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
437
|
-
*/
|
|
438
|
-
function prepareResultComputeAppliedCustomerBalance(result: CustomerBalanceApplicationResult): CustomerBalanceApplicationResult;
|
|
439
389
|
/** @internal */
|
|
440
390
|
function $platformWrapComputeAppliedCustomerBalance(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { computeAppliedCustomerBalance(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
441
|
-
/**
|
|
442
|
-
* @public
|
|
443
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
444
|
-
*/
|
|
445
|
-
const prepareArgs: typeof prepareArgsComputeAppliedCustomerBalance;
|
|
446
|
-
/**
|
|
447
|
-
* @public
|
|
448
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
449
|
-
*/
|
|
450
|
-
const prepareResult: typeof prepareResultComputeAppliedCustomerBalance;
|
|
451
391
|
/**
|
|
452
392
|
* 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.
|
|
453
393
|
* @public
|
|
@@ -894,28 +834,8 @@ declare namespace DiscountCalculation {
|
|
|
894
834
|
/** Custom key-value pairs attached to the product. */
|
|
895
835
|
metadata: Record<string, string>;
|
|
896
836
|
}
|
|
897
|
-
/**
|
|
898
|
-
* @public
|
|
899
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
900
|
-
*/
|
|
901
|
-
function prepareArgsComputeDiscounts(proto: unknown): DiscountableItem;
|
|
902
|
-
/**
|
|
903
|
-
* @public
|
|
904
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
905
|
-
*/
|
|
906
|
-
function prepareResultComputeDiscounts(result: DiscountResult): DiscountResult;
|
|
907
837
|
/** @internal */
|
|
908
838
|
function $platformWrapComputeDiscounts(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { computeDiscounts(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
909
|
-
/**
|
|
910
|
-
* @public
|
|
911
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
912
|
-
*/
|
|
913
|
-
const prepareArgs: typeof prepareArgsComputeDiscounts;
|
|
914
|
-
/**
|
|
915
|
-
* @public
|
|
916
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
917
|
-
*/
|
|
918
|
-
const prepareResult: typeof prepareResultComputeDiscounts;
|
|
919
839
|
/**
|
|
920
840
|
* Computes discount amounts for a discountable item and returns a discount result.
|
|
921
841
|
* @public
|
|
@@ -1015,8 +935,8 @@ declare namespace InvoiceCollectionOptions {
|
|
|
1015
935
|
* @public
|
|
1016
936
|
*/
|
|
1017
937
|
interface InvoiceCollectionOptionsResult {
|
|
1018
|
-
/** Override the auto-advancement setting. Set to false to keep the invoice in draft.
|
|
1019
|
-
autoAdvance
|
|
938
|
+
/** Override the auto-advancement setting. Set to false to keep the invoice in draft. */
|
|
939
|
+
autoAdvance: boolean;
|
|
1020
940
|
}
|
|
1021
941
|
/** @public */
|
|
1022
942
|
type InvoiceCollectionOptionsInput = ({
|
|
@@ -1067,28 +987,8 @@ declare namespace InvoiceCollectionOptions {
|
|
|
1067
987
|
/** The payment methods configured for this invoice. */
|
|
1068
988
|
paymentMethods: PaymentMethodType[];
|
|
1069
989
|
}
|
|
1070
|
-
/**
|
|
1071
|
-
* @public
|
|
1072
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1073
|
-
*/
|
|
1074
|
-
function prepareArgsOverrideOptions(proto: unknown): InvoiceCollectionOptionsInput;
|
|
1075
|
-
/**
|
|
1076
|
-
* @public
|
|
1077
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1078
|
-
*/
|
|
1079
|
-
function prepareResultOverrideOptions(result: InvoiceCollectionOptionsResult): InvoiceCollectionOptionsResult;
|
|
1080
990
|
/** @internal */
|
|
1081
991
|
function $platformWrapOverrideOptions(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { overrideOptions(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1082
|
-
/**
|
|
1083
|
-
* @public
|
|
1084
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1085
|
-
*/
|
|
1086
|
-
const prepareArgs: typeof prepareArgsOverrideOptions;
|
|
1087
|
-
/**
|
|
1088
|
-
* @public
|
|
1089
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1090
|
-
*/
|
|
1091
|
-
const prepareResult: typeof prepareResultOverrideOptions;
|
|
1092
992
|
/**
|
|
1093
993
|
* Overrides invoice collection options before a draft invoice is created.
|
|
1094
994
|
* @public
|
|
@@ -1106,13 +1006,13 @@ declare namespace InvoiceCollectionOptions {
|
|
|
1106
1006
|
*
|
|
1107
1007
|
* export default class MyInvoiceCollectionOptions implements Billing.InvoiceCollectionOptions<MyInvoiceCollectionOptionsConfig> {
|
|
1108
1008
|
* overrideOptions(
|
|
1109
|
-
*
|
|
1009
|
+
* request: Billing.InvoiceCollectionOptions.InvoiceCollectionOptionsInput,
|
|
1110
1010
|
* _config: MyInvoiceCollectionOptionsConfig,
|
|
1111
1011
|
* _context: Context
|
|
1112
1012
|
* ) {
|
|
1113
1013
|
* // TODO: implement your collection setting logic here
|
|
1114
1014
|
*
|
|
1115
|
-
* return {};
|
|
1015
|
+
* return { autoAdvance: request.collectionOptions.autoAdvance };
|
|
1116
1016
|
* }
|
|
1117
1017
|
* }
|
|
1118
1018
|
*
|
|
@@ -1343,28 +1243,8 @@ declare namespace Prorations {
|
|
|
1343
1243
|
name: string;
|
|
1344
1244
|
metadata: Record<string, string>;
|
|
1345
1245
|
}
|
|
1346
|
-
/**
|
|
1347
|
-
* @public
|
|
1348
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1349
|
-
*/
|
|
1350
|
-
function prepareArgsProrateItems(proto: unknown): ProrateItemsInput;
|
|
1351
|
-
/**
|
|
1352
|
-
* @public
|
|
1353
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1354
|
-
*/
|
|
1355
|
-
function prepareResultProrateItems(result: ProrateItemsResult): ProrateItemsResult;
|
|
1356
1246
|
/** @internal */
|
|
1357
1247
|
function $platformWrapProrateItems(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { prorateItems(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1358
|
-
/**
|
|
1359
|
-
* @public
|
|
1360
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1361
|
-
*/
|
|
1362
|
-
const prepareArgs: typeof prepareArgsProrateItems;
|
|
1363
|
-
/**
|
|
1364
|
-
* @public
|
|
1365
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1366
|
-
*/
|
|
1367
|
-
const prepareResult: typeof prepareResultProrateItems;
|
|
1368
1248
|
/**
|
|
1369
1249
|
* 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.
|
|
1370
1250
|
* @public
|
|
@@ -1642,40 +1522,10 @@ declare namespace RecurringBillingItemHandling {
|
|
|
1642
1522
|
/** The list of items to evaluate for creation. */
|
|
1643
1523
|
items: Item[];
|
|
1644
1524
|
}
|
|
1645
|
-
/**
|
|
1646
|
-
* @public
|
|
1647
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1648
|
-
*/
|
|
1649
|
-
function prepareArgsBeforeItemCreation(proto: unknown): BeforeItemCreationInput;
|
|
1650
|
-
/**
|
|
1651
|
-
* @public
|
|
1652
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1653
|
-
*/
|
|
1654
|
-
function prepareResultBeforeItemCreation(result: BeforeItemCreationResult): BeforeItemCreationResult;
|
|
1655
1525
|
/** @internal */
|
|
1656
1526
|
function $platformWrapBeforeItemCreation(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { beforeItemCreation(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1657
|
-
/**
|
|
1658
|
-
* @public
|
|
1659
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1660
|
-
*/
|
|
1661
|
-
function prepareArgsFilterItems(proto: unknown): FilterItemsInput;
|
|
1662
|
-
/**
|
|
1663
|
-
* @public
|
|
1664
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1665
|
-
*/
|
|
1666
|
-
function prepareResultFilterItems(result: FilterItemsResult): FilterItemsResult;
|
|
1667
1527
|
/** @internal */
|
|
1668
1528
|
function $platformWrapFilterItems(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { filterItems(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1669
|
-
/**
|
|
1670
|
-
* @public
|
|
1671
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1672
|
-
*/
|
|
1673
|
-
function prepareArgsGroupItems(proto: unknown): GroupItemsInput;
|
|
1674
|
-
/**
|
|
1675
|
-
* @public
|
|
1676
|
-
* @deprecated Platform dispatch handles wire/SDK conversion.
|
|
1677
|
-
*/
|
|
1678
|
-
function prepareResultGroupItems(result: GroupItemsResult): GroupItemsResult;
|
|
1679
1529
|
/** @internal */
|
|
1680
1530
|
function $platformWrapGroupItems(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { groupItems(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
|
|
1681
1531
|
/**
|