@stripe/extensibility-script-build-tools 1.5.4

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.
Files changed (63) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +180 -0
  3. package/dist/config-introspect.d.ts +17 -0
  4. package/dist/config-introspect.d.ts.map +1 -0
  5. package/dist/dispatch.d.ts +24 -0
  6. package/dist/dispatch.d.ts.map +1 -0
  7. package/dist/errors.d.ts +26 -0
  8. package/dist/errors.d.ts.map +1 -0
  9. package/dist/extensibility-script-build-tools-alpha.d.ts +19 -0
  10. package/dist/extensibility-script-build-tools-beta.d.ts +19 -0
  11. package/dist/extensibility-script-build-tools-internal.d.ts +93 -0
  12. package/dist/extensibility-script-build-tools-public.d.ts +19 -0
  13. package/dist/index.cjs +237827 -0
  14. package/dist/index.d.cts +89 -0
  15. package/dist/index.d.ts +89 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +237820 -0
  18. package/dist/plugin.d.ts +41 -0
  19. package/dist/plugin.d.ts.map +1 -0
  20. package/dist/runtime-introspect.d.ts +24 -0
  21. package/dist/runtime-introspect.d.ts.map +1 -0
  22. package/dist/sdk-types/extensions/billing/bill/discount_calculation.d.ts +226 -0
  23. package/dist/sdk-types/extensions/billing/bill/discount_calculation.d.ts.map +1 -0
  24. package/dist/sdk-types/extensions/billing/bill/index.d.ts +2 -0
  25. package/dist/sdk-types/extensions/billing/bill/index.d.ts.map +1 -0
  26. package/dist/sdk-types/extensions/billing/customer_balance_application.d.ts +82 -0
  27. package/dist/sdk-types/extensions/billing/customer_balance_application.d.ts.map +1 -0
  28. package/dist/sdk-types/extensions/billing/index.d.ts +8 -0
  29. package/dist/sdk-types/extensions/billing/index.d.ts.map +1 -0
  30. package/dist/sdk-types/extensions/billing/invoice_collection_setting.d.ts +117 -0
  31. package/dist/sdk-types/extensions/billing/invoice_collection_setting.d.ts.map +1 -0
  32. package/dist/sdk-types/extensions/billing/prorations.d.ts +222 -0
  33. package/dist/sdk-types/extensions/billing/prorations.d.ts.map +1 -0
  34. package/dist/sdk-types/extensions/billing/recurring_billing_item_handling.d.ts +326 -0
  35. package/dist/sdk-types/extensions/billing/recurring_billing_item_handling.d.ts.map +1 -0
  36. package/dist/sdk-types/extensions/billing/types.d.ts +33 -0
  37. package/dist/sdk-types/extensions/billing/types.d.ts.map +1 -0
  38. package/dist/sdk-types/extensions/context.d.ts +9 -0
  39. package/dist/sdk-types/extensions/context.d.ts.map +1 -0
  40. package/dist/sdk-types/extensions/core/index.d.ts +3 -0
  41. package/dist/sdk-types/extensions/core/index.d.ts.map +1 -0
  42. package/dist/sdk-types/extensions/core/workflows/custom_action.d.ts +142 -0
  43. package/dist/sdk-types/extensions/core/workflows/custom_action.d.ts.map +1 -0
  44. package/dist/sdk-types/extensions/core/workflows/index.d.ts +2 -0
  45. package/dist/sdk-types/extensions/core/workflows/index.d.ts.map +1 -0
  46. package/dist/sdk-types/extensions/extend/index.d.ts +3 -0
  47. package/dist/sdk-types/extensions/extend/index.d.ts.map +1 -0
  48. package/dist/sdk-types/extensions/extend/workflows/custom_action.d.ts +142 -0
  49. package/dist/sdk-types/extensions/extend/workflows/custom_action.d.ts.map +1 -0
  50. package/dist/sdk-types/extensions/extend/workflows/index.d.ts +2 -0
  51. package/dist/sdk-types/extensions/extend/workflows/index.d.ts.map +1 -0
  52. package/dist/sdk-types/extensions/index.d.ts +9 -0
  53. package/dist/sdk-types/extensions/index.d.ts.map +1 -0
  54. package/dist/sdk-types/extensions/registry.d.ts +19 -0
  55. package/dist/sdk-types/extensions/registry.d.ts.map +1 -0
  56. package/dist/sdk-types/extensions/types.d.ts +10 -0
  57. package/dist/sdk-types/extensions/types.d.ts.map +1 -0
  58. package/dist/transform.d.ts +49 -0
  59. package/dist/transform.d.ts.map +1 -0
  60. package/dist/tsconfig.build.tsbuildinfo +1 -0
  61. package/dist/types.d.ts +40 -0
  62. package/dist/types.d.ts.map +1 -0
  63. package/package.json +57 -0
@@ -0,0 +1,142 @@
1
+ import type { Context } from '../../context.js';
2
+ import type { _ConfigApplicationContext } from '../../../stdlib/index.js';
3
+ /** @public */
4
+ export declare namespace CustomAction {
5
+ /**
6
+ * Response payload for GetFormState.
7
+ * @public
8
+ */
9
+ interface GetFormStateResponse {
10
+ /** 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. */
11
+ values: Record<string, unknown>;
12
+ /** Per-field configuration keyed by field name. */
13
+ config: Record<string, FormStateFieldConfig>;
14
+ }
15
+ /**
16
+ * Configuration for a single form field, returned by GetFormState.
17
+ * @public
18
+ */
19
+ interface FormStateFieldConfig {
20
+ /** Dropdown options for `dynamic_select` fields. */
21
+ options: SelectOption[];
22
+ /** 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. */
23
+ schema: Record<string, unknown>;
24
+ /** Whether the field is disabled (non-interactive). */
25
+ disabled?: boolean;
26
+ /** Whether the field is hidden from the form. */
27
+ hidden?: boolean;
28
+ /** Warning message displayed on the field. You can still save the workflow. */
29
+ warning?: string;
30
+ /** Error message displayed on the field. Blocks saving the workflow. */
31
+ error?: string;
32
+ }
33
+ /**
34
+ * An option in a dynamic_select dropdown.
35
+ * @public
36
+ */
37
+ interface SelectOption {
38
+ value: string;
39
+ label: string;
40
+ }
41
+ /**
42
+ * Request payload for GetFormState, sent at configuration time.
43
+ * @public
44
+ */
45
+ interface GetFormStateRequest {
46
+ /** Current form field values. Contains all field values in the form, including fields the user has not yet interacted with (which might be null). */
47
+ values: Record<string, unknown>;
48
+ /** 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. */
49
+ changedField?: string;
50
+ }
51
+ /** @public */
52
+ type ExecuteCustomActionResponse = Record<string, never>;
53
+ /**
54
+ * **************************************************************************** DEPRECATED: This proto is deprecated and should no longer be used. Please use the following proto instead: ***************************************************************************** / /** Request payload for executing a custom action, provided at workflow runtime.
55
+ * @public
56
+ */
57
+ interface ExecuteCustomActionRequest {
58
+ /** 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. */
59
+ customInput: Record<string, unknown>;
60
+ }
61
+ /**
62
+ * @public
63
+ * @deprecated Platform dispatch handles wire/SDK conversion.
64
+ */
65
+ function prepareArgsExecute(proto: unknown): ExecuteCustomActionRequest;
66
+ /**
67
+ * @public
68
+ * @deprecated Platform dispatch handles wire/SDK conversion.
69
+ */
70
+ function prepareResultExecute(result: ExecuteCustomActionResponse): ExecuteCustomActionResponse;
71
+ /** @internal */
72
+ function $platformWrapExecute(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => {
73
+ execute(...a: unknown[]): unknown;
74
+ }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
75
+ /**
76
+ * @public
77
+ * @deprecated Platform dispatch handles wire/SDK conversion.
78
+ */
79
+ function prepareArgsGetFormState(proto: unknown): GetFormStateRequest;
80
+ /**
81
+ * @public
82
+ * @deprecated Platform dispatch handles wire/SDK conversion.
83
+ */
84
+ function prepareResultGetFormState(result: GetFormStateResponse): GetFormStateResponse;
85
+ /** @internal */
86
+ function $platformWrapGetFormState(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => {
87
+ getFormState(...a: unknown[]): unknown;
88
+ }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
89
+ /**
90
+ * Executes the custom action at workflow runtime. Called when a workflow triggers this action, with the configured input values.
91
+ * @public
92
+ */
93
+ type ExecuteFunction<Config extends Record<string, unknown>> = (request: ExecuteCustomActionRequest, config: Config, context: Context) => ExecuteCustomActionResponse | PromiseLike<ExecuteCustomActionResponse>;
94
+ /**
95
+ * 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.
96
+ * @public
97
+ */
98
+ type GetFormStateFunction<Config extends Record<string, unknown>> = (request: GetFormStateRequest, config: Config, context: Context) => GetFormStateResponse | PromiseLike<GetFormStateResponse>;
99
+ }
100
+ /**
101
+ * @example
102
+ * ```ts
103
+ * import type { Core } from '@stripe/extensibility-sdk/extensions';
104
+ * import type { Context } from '@stripe/extensibility-sdk/extensions';
105
+ *
106
+ * // eslint-disable-next-line @typescript-eslint/no-empty-object-type
107
+ * interface MyCustomActionConfig extends Record<string, unknown> {}
108
+ *
109
+ * export default class MyCustomAction implements Core.Workflows
110
+ * .CustomAction<MyCustomActionConfig> {
111
+ * execute(
112
+ * _request: Core.Workflows.CustomAction.ExecuteCustomActionRequest,
113
+ * _config: MyCustomActionConfig,
114
+ * _context: Context
115
+ * ) {
116
+ * // TODO: implement your action logic here
117
+ *
118
+ * return {};
119
+ * }
120
+ *
121
+ * getFormState(
122
+ * _request: Core.Workflows.CustomAction.GetFormStateRequest,
123
+ * _config: MyCustomActionConfig,
124
+ * _context: Context
125
+ * ) {
126
+ * // TODO: implement your logic here
127
+ *
128
+ * return {
129
+ * values: {},
130
+ * config: {},
131
+ * };
132
+ * }
133
+ * }
134
+ *
135
+ * ```
136
+ * @public
137
+ */
138
+ export interface CustomAction<Config extends Record<string, unknown>> {
139
+ execute: CustomAction.ExecuteFunction<Config>;
140
+ getFormState?: CustomAction.GetFormStateFunction<Config>;
141
+ }
142
+ //# sourceMappingURL=custom_action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom_action.d.ts","sourceRoot":"","sources":["../../../../src/extensions/core/workflows/custom_action.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,KAAK,EAEV,yBAAyB,EAI1B,MAAM,0BAA0B,CAAC;AAwBlC,cAAc;AACd,yBAAiB,YAAY,CAAC;IAC5B;;;OAGG;IACH,UAAiB,oBAAoB;QACnC,6OAA6O;QAC7O,MAAM,EAAE,MAAM,CAAC,MA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OAAO,CAAC;IAClE,OAAO,EAAE,YAAY,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;CAC1D"}
@@ -0,0 +1,2 @@
1
+ export * from './custom_action.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/core/workflows/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import * as Workflows from './workflows/index.js';
2
+ export { Workflows };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extensions/extend/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,142 @@
1
+ import type { Context } from '../../context.js';
2
+ import type { _ConfigApplicationContext } from '../../../stdlib/index.js';
3
+ /** @public */
4
+ export declare namespace CustomAction {
5
+ /**
6
+ * Response payload for GetFormState.
7
+ * @public
8
+ */
9
+ interface GetFormStateResponse {
10
+ /** 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. */
11
+ values: Record<string, unknown>;
12
+ /** Per-field configuration keyed by field name. */
13
+ config: Record<string, FormStateFieldConfig>;
14
+ }
15
+ /**
16
+ * Configuration for a single form field, returned by GetFormState.
17
+ * @public
18
+ */
19
+ interface FormStateFieldConfig {
20
+ /** Dropdown options for `dynamic_select` fields. */
21
+ options: SelectOption[];
22
+ /** 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. */
23
+ schema: Record<string, unknown>;
24
+ /** Whether the field is disabled (non-interactive). */
25
+ disabled?: boolean;
26
+ /** Whether the field is hidden from the form. */
27
+ hidden?: boolean;
28
+ /** Warning message displayed on the field. You can still save the workflow. */
29
+ warning?: string;
30
+ /** Error message displayed on the field. Blocks saving the workflow. */
31
+ error?: string;
32
+ }
33
+ /**
34
+ * An option in a dynamic_select dropdown.
35
+ * @public
36
+ */
37
+ interface SelectOption {
38
+ value: string;
39
+ label: string;
40
+ }
41
+ /**
42
+ * Request payload for GetFormState, sent at configuration time.
43
+ * @public
44
+ */
45
+ interface GetFormStateRequest {
46
+ /** Current form field values. Contains all field values in the form, including fields the user has not yet interacted with (which might be null). */
47
+ values: Record<string, unknown>;
48
+ /** 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. */
49
+ changedField?: string;
50
+ }
51
+ /** @public */
52
+ type ExecuteCustomActionResponse = Record<string, never>;
53
+ /**
54
+ * Request payload for executing a custom action, provided at workflow runtime.
55
+ * @public
56
+ */
57
+ interface ExecuteCustomActionRequest {
58
+ /** 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. */
59
+ customInput: Record<string, unknown>;
60
+ }
61
+ /**
62
+ * @public
63
+ * @deprecated Platform dispatch handles wire/SDK conversion.
64
+ */
65
+ function prepareArgsExecute(proto: unknown): ExecuteCustomActionRequest;
66
+ /**
67
+ * @public
68
+ * @deprecated Platform dispatch handles wire/SDK conversion.
69
+ */
70
+ function prepareResultExecute(result: ExecuteCustomActionResponse): ExecuteCustomActionResponse;
71
+ /** @internal */
72
+ function $platformWrapExecute(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => {
73
+ execute(...a: unknown[]): unknown;
74
+ }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
75
+ /**
76
+ * @public
77
+ * @deprecated Platform dispatch handles wire/SDK conversion.
78
+ */
79
+ function prepareArgsGetFormState(proto: unknown): GetFormStateRequest;
80
+ /**
81
+ * @public
82
+ * @deprecated Platform dispatch handles wire/SDK conversion.
83
+ */
84
+ function prepareResultGetFormState(result: GetFormStateResponse): GetFormStateResponse;
85
+ /** @internal */
86
+ function $platformWrapGetFormState(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => {
87
+ getFormState(...a: unknown[]): unknown;
88
+ }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
89
+ /**
90
+ * Executes the custom action at workflow runtime. Called when a workflow triggers this action, with the configured input values.
91
+ * @public
92
+ */
93
+ type ExecuteFunction<Config extends Record<string, unknown>> = (request: ExecuteCustomActionRequest, config: Config, context: Context) => ExecuteCustomActionResponse | PromiseLike<ExecuteCustomActionResponse>;
94
+ /**
95
+ * 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.
96
+ * @public
97
+ */
98
+ type GetFormStateFunction<Config extends Record<string, unknown>> = (request: GetFormStateRequest, config: Config, context: Context) => GetFormStateResponse | PromiseLike<GetFormStateResponse>;
99
+ }
100
+ /**
101
+ * @example
102
+ * ```ts
103
+ * import type { Extend } from '@stripe/extensibility-sdk/extensions';
104
+ * import type { Context } from '@stripe/extensibility-sdk/extensions';
105
+ *
106
+ * // eslint-disable-next-line @typescript-eslint/no-empty-object-type
107
+ * interface MyCustomActionConfig extends Record<string, unknown> {}
108
+ *
109
+ * export default class MyCustomAction implements Extend.Workflows
110
+ * .CustomAction<MyCustomActionConfig> {
111
+ * execute(
112
+ * _request: Extend.Workflows.CustomAction.ExecuteCustomActionRequest,
113
+ * _config: MyCustomActionConfig,
114
+ * _context: Context
115
+ * ) {
116
+ * // TODO: implement your action logic here
117
+ *
118
+ * return {};
119
+ * }
120
+ *
121
+ * getFormState(
122
+ * _request: Extend.Workflows.CustomAction.GetFormStateRequest,
123
+ * _config: MyCustomActionConfig,
124
+ * _context: Context
125
+ * ) {
126
+ * // TODO: implement your logic here
127
+ *
128
+ * return {
129
+ * values: {},
130
+ * config: {},
131
+ * };
132
+ * }
133
+ * }
134
+ *
135
+ * ```
136
+ * @public
137
+ */
138
+ export interface CustomAction<Config extends Record<string, unknown>> {
139
+ execute: CustomAction.ExecuteFunction<Config>;
140
+ getFormState?: CustomAction.GetFormStateFunction<Config>;
141
+ }
142
+ //# sourceMappingURL=custom_action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom_action.d.ts","sourceRoot":"","sources":["../../../../src/extensions/extend/workflows/custom_action.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,KAAK,EAEV,yBAAyB,EAI1B,MAAM,0BAA0B,CAAC;AAwBlC,cAAc;AACd,yBAAiB,YAAY,CAAC;IAC5B;;;OAGG;IACH,UAAiB,oBAAoB;QACnC,6OAA6O;QAC7O,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChC,mDAAmD;QACnD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;KAC9C;IAED;;;OAGG;IACH,UAAiB,oBAAoB;QACnC,oDAAoD;QACpD,OAAO,EAAE,YAAY,EAAE,CAAC;QACxB,wMAAwM;QACxM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChC,uDAAuD;QACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,iDAAiD;QACjD,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,+EAA+E;QAC/E,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,wEAAwE;QACxE,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAED;;;OAGG;IACH,UAAiB,YAAY;QAC3B,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf;IAED;;;OAGG;IACH,UAAiB,mBAAmB;QAClC,qJAAqJ;QACrJ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC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AAY,eAAe,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CACpE,OAAO,EAAE,0BAA0B,EACnC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,KACb,2BAA2B,GAAG,WAAW,CAAC,2BAA2B,CAAC,CAAC;IAE5E;;;OAGG;IACH,KAAY,oBAAoB,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CACzE,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,KACb,oBAAoB,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;CAC/D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,WAAW,YAAY,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClE,OAAO,EAAE,YAAY,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC9C,YAAY,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;CAC1D"}
@@ -0,0 +1,2 @@
1
+ export * from './custom_action.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/extend/workflows/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { Decimal, DecimalRoundingPresets } from '../stdlib/index.js';
2
+ export type { DecimalRoundingOptions, RoundDirection } from '../stdlib/index.js';
3
+ export * from './types.js';
4
+ export type { Context } from './context.js';
5
+ import * as Billing from './billing/index.js';
6
+ import * as Core from './core/index.js';
7
+ import * as Extend from './extend/index.js';
8
+ export { Billing, Core, Extend };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACrE,YAAY,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACjF,cAAc,YAAY,CAAC;AAC3B,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ /** @internal */
2
+ export interface ExtensionMethodEntry {
3
+ outputName: string;
4
+ prepareArgsName: string;
5
+ prepareResultName: string;
6
+ platformWrapName: string;
7
+ }
8
+ /** @internal */
9
+ export interface ExtensionInterfaceEntry {
10
+ interfaceId: string;
11
+ sdkFqn: string;
12
+ namespacePath: string[];
13
+ methods: ExtensionMethodEntry[];
14
+ }
15
+ /** @internal */
16
+ export declare const BY_SDK_FQN: ReadonlyMap<string, ExtensionInterfaceEntry>;
17
+ /** @internal */
18
+ export declare const BY_INTERFACE_ID: ReadonlyMap<string, ExtensionInterfaceEntry>;
19
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/extensions/registry.ts"],"names":[],"mappings":"AAEA,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,oBAAoB,EAAE,CAAC;CACjC;AAwHD,gBAAgB;AAChB,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,uBAAuB,CAEnE,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,uBAAuB,CAExE,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Represents a percentage number value (0-100).
3
+ * @format percent
4
+ * @public
5
+ */
6
+ export interface Percent {
7
+ /** The percentage value. */
8
+ value: number;
9
+ }
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/extensions/types.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACtB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,49 @@
1
+ /** @internal */
2
+ export interface InjectionPoint {
3
+ /** 1-based line number in the original source after which a line was injected. */
4
+ afterOriginalLine: number;
5
+ }
6
+ /** @internal */
7
+ export interface TransformResult {
8
+ code: string;
9
+ injections: InjectionPoint[];
10
+ }
11
+ /**
12
+ * Per-method descriptor passed to `injectPlatformDecorator`. Each optional
13
+ * string is a fully-qualified accessor expression that will be written into the
14
+ * decorator call. Absent fields are omitted from the call — that transform is
15
+ * skipped at runtime.
16
+ *
17
+ * The caller (plugin) is responsible for setting or clearing fields based on
18
+ * build-time options; `injectPlatformDecorator` itself is option-unaware.
19
+ * @internal
20
+ */
21
+ export interface ExtensionMethodDescriptor {
22
+ outputName: string;
23
+ /** e.g. `__stripe_sdk_ext__.Billing.Sales.Prorations.prepareArgsProrateItems` */
24
+ prepareArgs?: string;
25
+ /** e.g. `__stripe_sdk_ext__.Billing.Sales.Prorations.prepareResultProrateItems` */
26
+ prepareResult?: string;
27
+ /** Reserved for future config-transform wiring. */
28
+ transformConfig?: string;
29
+ }
30
+ /**
31
+ * Import alias injected into extension source — used as the namespace prefix for transform accessors.
32
+ * @internal
33
+ */
34
+ export declare const SDK_EXT_ALIAS = "__stripe_sdk_ext__";
35
+ /**
36
+ * Injects `@__platformMethod__` before each named method in the default-export
37
+ * class, and appends the helper function at the end of the file.
38
+ *
39
+ * Returns `{ code: source, injections: [] }` unchanged if `methods` is empty
40
+ * or if the source contains no default-export class.
41
+ * Propagates any parse error to the caller.
42
+ *
43
+ * Each descriptor's optional accessor strings control which transformers appear
44
+ * in the call — absent fields are omitted. The SDK ignores any transformers
45
+ * passed to it until they are implemented in a future SDK version.
46
+ * @internal
47
+ */
48
+ export declare function injectPlatformDecorator(source: string, fileName: string, methods: ExtensionMethodDescriptor[]): TransformResult;
49
+ //# sourceMappingURL=transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":"AAGA,gBAAgB;AAChB,MAAM,WAAW,cAAc;IAC7B,kFAAkF;IAClF,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,gBAAgB;AAChB,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,uBAAuB,CAAC;AAyBlD;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,yBAAyB,EAAE,GACnC,eAAe,CAkDjB"}