@stripe/extensibility-dev-tools 0.23.7 → 0.24.2
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/dist/bin/build-custom-object-definitions.cjs +22 -13
- package/dist/bin/build-custom-object-definitions.js +22 -13
- package/dist/bin/create-upload-image.cjs +22 -13
- package/dist/bin/create-upload-image.js +22 -13
- package/dist/bin/dev-tools-rpc.cjs +8 -7
- package/dist/bin/dev-tools-rpc.js +8 -7
- package/dist/bin/gen-workspace.cjs +8 -7
- package/dist/bin/gen-workspace.js +8 -7
- package/dist/bin/template-info.cjs +8 -7
- package/dist/bin/template-info.js +8 -7
- package/dist/custom-objects/to-proto-json.d.ts +2 -1
- package/dist/custom-objects/to-proto-json.d.ts.map +1 -1
- package/dist/dependencies/index.d.ts +7 -7
- package/dist/index.cjs +8 -7
- package/dist/index.js +8 -7
- package/dist/manifest/manifest-v2.d.ts +8 -3
- package/dist/templates/diff-viewer/types.d.ts +2 -2
- package/dist/templates/extensions/base.d.ts +4 -2
- package/dist/templates/extensions/core.workflows.custom_action.d.ts.map +1 -1
- package/dist/templates/extensions/types.d.ts +9 -3
- package/dist/templates/file-writer.d.ts +2 -2
- package/dist/templates/index.cjs +8 -7
- package/dist/templates/index.js +8 -7
- package/dist/templates/root/index.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/workspace/index.cjs +8 -7
- package/dist/workspace/index.d.ts +34 -30
- package/dist/workspace/index.js +8 -7
- package/package.json +2 -2
- package/templates/extensions/billing.bill.discount_calculation/index.ts +1 -1
- package/templates/extensions/billing.customer_balance_application/index.ts +1 -1
- package/templates/extensions/billing.invoice_collection_setting/index.ts +1 -1
- package/templates/extensions/billing.prorations/index.ts +1 -1
- package/templates/extensions/billing.recurring_billing_item_handling/index.ts +1 -1
- package/templates/extensions/core.workflows.custom_action/index.ts +1 -1
- package/templates/extensions/extend.workflows.custom_action/index.ts +1 -1
- package/dist/api-surface.d.ts.map +0 -1
|
@@ -1177,7 +1177,7 @@ describe('MyDiscountCalculation', () => {
|
|
|
1177
1177
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1178
1178
|
|
|
1179
1179
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1180
|
-
interface MyDiscountCalculationConfig
|
|
1180
|
+
interface MyDiscountCalculationConfig {}
|
|
1181
1181
|
|
|
1182
1182
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
1183
1183
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -1219,7 +1219,7 @@ describe('MyBalanceApp', () => {
|
|
|
1219
1219
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1220
1220
|
|
|
1221
1221
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1222
|
-
interface MyBalanceAppConfig
|
|
1222
|
+
interface MyBalanceAppConfig {}
|
|
1223
1223
|
|
|
1224
1224
|
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
1225
1225
|
computeAppliedCustomerBalance(
|
|
@@ -1260,7 +1260,7 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
1260
1260
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1261
1261
|
|
|
1262
1262
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1263
|
-
interface MyInvoiceCollectionSettingConfig
|
|
1263
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
1264
1264
|
|
|
1265
1265
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
1266
1266
|
collectionOverride(
|
|
@@ -1299,7 +1299,7 @@ describe('MyProrations', () => {
|
|
|
1299
1299
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1300
1300
|
|
|
1301
1301
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1302
|
-
interface MyProrationsConfig
|
|
1302
|
+
interface MyProrationsConfig {}
|
|
1303
1303
|
|
|
1304
1304
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
1305
1305
|
prorateItems(
|
|
@@ -1340,7 +1340,7 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
1340
1340
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1341
1341
|
|
|
1342
1342
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1343
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
1343
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
1344
1344
|
|
|
1345
1345
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
1346
1346
|
beforeItemCreation(
|
|
@@ -1590,7 +1590,7 @@ describe('MyCustomAction', () => {
|
|
|
1590
1590
|
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
1591
1591
|
|
|
1592
1592
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1593
|
-
interface MyCustomActionConfig
|
|
1593
|
+
interface MyCustomActionConfig {}
|
|
1594
1594
|
|
|
1595
1595
|
export default class MyCustomAction implements Core.Workflows
|
|
1596
1596
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1653,7 +1653,7 @@ describe('MyCustomAction', () => {
|
|
|
1653
1653
|
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
1654
1654
|
|
|
1655
1655
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1656
|
-
interface MyCustomActionConfig
|
|
1656
|
+
interface MyCustomActionConfig {}
|
|
1657
1657
|
|
|
1658
1658
|
export default class MyCustomAction implements Extend.Workflows
|
|
1659
1659
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -2793,6 +2793,7 @@ function _createBaseOutput(params, context) {
|
|
|
2793
2793
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
2794
2794
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
2795
2795
|
var customActionTemplate = {
|
|
2796
|
+
deprecated: true,
|
|
2796
2797
|
methods: {
|
|
2797
2798
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
2798
2799
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
|
@@ -76,7 +76,7 @@ describe('MyDiscountCalculation', () => {
|
|
|
76
76
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
77
77
|
|
|
78
78
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
79
|
-
interface MyDiscountCalculationConfig
|
|
79
|
+
interface MyDiscountCalculationConfig {}
|
|
80
80
|
|
|
81
81
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
82
82
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -118,7 +118,7 @@ describe('MyBalanceApp', () => {
|
|
|
118
118
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
119
119
|
|
|
120
120
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
121
|
-
interface MyBalanceAppConfig
|
|
121
|
+
interface MyBalanceAppConfig {}
|
|
122
122
|
|
|
123
123
|
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
124
124
|
computeAppliedCustomerBalance(
|
|
@@ -159,7 +159,7 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
159
159
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
160
160
|
|
|
161
161
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
162
|
-
interface MyInvoiceCollectionSettingConfig
|
|
162
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
163
163
|
|
|
164
164
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
165
165
|
collectionOverride(
|
|
@@ -198,7 +198,7 @@ describe('MyProrations', () => {
|
|
|
198
198
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
199
199
|
|
|
200
200
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
201
|
-
interface MyProrationsConfig
|
|
201
|
+
interface MyProrationsConfig {}
|
|
202
202
|
|
|
203
203
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
204
204
|
prorateItems(
|
|
@@ -239,7 +239,7 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
239
239
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
240
240
|
|
|
241
241
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
242
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
242
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
243
243
|
|
|
244
244
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
245
245
|
beforeItemCreation(
|
|
@@ -489,7 +489,7 @@ describe('MyCustomAction', () => {
|
|
|
489
489
|
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
490
490
|
|
|
491
491
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
492
|
-
interface MyCustomActionConfig
|
|
492
|
+
interface MyCustomActionConfig {}
|
|
493
493
|
|
|
494
494
|
export default class MyCustomAction implements Core.Workflows
|
|
495
495
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -552,7 +552,7 @@ describe('MyCustomAction', () => {
|
|
|
552
552
|
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
553
553
|
|
|
554
554
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
555
|
-
interface MyCustomActionConfig
|
|
555
|
+
interface MyCustomActionConfig {}
|
|
556
556
|
|
|
557
557
|
export default class MyCustomAction implements Extend.Workflows
|
|
558
558
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1076,6 +1076,7 @@ function _createBaseOutput(params, context) {
|
|
|
1076
1076
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
1077
1077
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
1078
1078
|
var customActionTemplate = {
|
|
1079
|
+
deprecated: true,
|
|
1079
1080
|
methods: {
|
|
1080
1081
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
1081
1082
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
|
@@ -53,7 +53,7 @@ describe('MyDiscountCalculation', () => {
|
|
|
53
53
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
54
54
|
|
|
55
55
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
56
|
-
interface MyDiscountCalculationConfig
|
|
56
|
+
interface MyDiscountCalculationConfig {}
|
|
57
57
|
|
|
58
58
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
59
59
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -95,7 +95,7 @@ describe('MyBalanceApp', () => {
|
|
|
95
95
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
96
96
|
|
|
97
97
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
98
|
-
interface MyBalanceAppConfig
|
|
98
|
+
interface MyBalanceAppConfig {}
|
|
99
99
|
|
|
100
100
|
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
101
101
|
computeAppliedCustomerBalance(
|
|
@@ -136,7 +136,7 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
136
136
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
137
137
|
|
|
138
138
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
139
|
-
interface MyInvoiceCollectionSettingConfig
|
|
139
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
140
140
|
|
|
141
141
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
142
142
|
collectionOverride(
|
|
@@ -175,7 +175,7 @@ describe('MyProrations', () => {
|
|
|
175
175
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
176
176
|
|
|
177
177
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
178
|
-
interface MyProrationsConfig
|
|
178
|
+
interface MyProrationsConfig {}
|
|
179
179
|
|
|
180
180
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
181
181
|
prorateItems(
|
|
@@ -216,7 +216,7 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
216
216
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
217
217
|
|
|
218
218
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
219
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
219
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
220
220
|
|
|
221
221
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
222
222
|
beforeItemCreation(
|
|
@@ -466,7 +466,7 @@ describe('MyCustomAction', () => {
|
|
|
466
466
|
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
467
467
|
|
|
468
468
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
469
|
-
interface MyCustomActionConfig
|
|
469
|
+
interface MyCustomActionConfig {}
|
|
470
470
|
|
|
471
471
|
export default class MyCustomAction implements Core.Workflows
|
|
472
472
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -529,7 +529,7 @@ describe('MyCustomAction', () => {
|
|
|
529
529
|
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
530
530
|
|
|
531
531
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
532
|
-
interface MyCustomActionConfig
|
|
532
|
+
interface MyCustomActionConfig {}
|
|
533
533
|
|
|
534
534
|
export default class MyCustomAction implements Extend.Workflows
|
|
535
535
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1053,6 +1053,7 @@ function _createBaseOutput(params, context) {
|
|
|
1053
1053
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
1054
1054
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
1055
1055
|
var customActionTemplate = {
|
|
1056
|
+
deprecated: true,
|
|
1056
1057
|
methods: {
|
|
1057
1058
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
1058
1059
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
|
@@ -11,7 +11,8 @@ import type { UpsertObjectDefinitionRequest } from './generated/proto/custom_obj
|
|
|
11
11
|
*
|
|
12
12
|
* @internal
|
|
13
13
|
*/
|
|
14
|
-
export declare function toUpsertRequestJson(buildArtifact: CustomObjectBuildResult): Omit<UpsertObjectDefinitionRequest, 'apiActions'> & {
|
|
14
|
+
export declare function toUpsertRequestJson(buildArtifact: CustomObjectBuildResult): Omit<UpsertObjectDefinitionRequest, 'apiActions' | 'properties'> & {
|
|
15
15
|
apiActions: Record<string, Record<string, unknown>>;
|
|
16
|
+
properties: Record<string, Record<string, unknown>>;
|
|
16
17
|
};
|
|
17
18
|
//# sourceMappingURL=to-proto-json.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-proto-json.d.ts","sourceRoot":"","sources":["../../src/custom-objects/to-proto-json.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uFAAuF,CAAC;
|
|
1
|
+
{"version":3,"file":"to-proto-json.d.ts","sourceRoot":"","sources":["../../src/custom-objects/to-proto-json.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uFAAuF,CAAC;AAO3I;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,uBAAuB,GAAG,IAAI,CAC/E,6BAA6B,EAC7B,YAAY,GAAG,YAAY,CAC5B,GAAG;IACF,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACpD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD,CAgBA"}
|
|
@@ -50,7 +50,7 @@ export interface _StripeCliPluginDependency {
|
|
|
50
50
|
* A dependency that the workspace needs: npm runtime, npm dev, or Stripe CLI plugin.
|
|
51
51
|
* @internal
|
|
52
52
|
*/
|
|
53
|
-
export type _Dependency =
|
|
53
|
+
export type _Dependency = _NpmDependency | _DevNpmDependency | _StripeCliPluginDependency;
|
|
54
54
|
/**
|
|
55
55
|
* Create a runtime npm dependency descriptor.
|
|
56
56
|
* @internal
|
|
@@ -96,7 +96,7 @@ export interface _ConflictResult {
|
|
|
96
96
|
* The action to take for a dependency: add new, update existing, no-op, or flag a conflict.
|
|
97
97
|
* @internal
|
|
98
98
|
*/
|
|
99
|
-
export type _DependencyAction = 'add' | '
|
|
99
|
+
export type _DependencyAction = 'add' | 'update' | 'already-satisfied' | 'conflict';
|
|
100
100
|
/**
|
|
101
101
|
* A pending dependency change accumulated by the dependency manager before commit.
|
|
102
102
|
* @internal
|
|
@@ -147,7 +147,7 @@ export interface _CommitResult {
|
|
|
147
147
|
* Package manager detected in the workspace.
|
|
148
148
|
* @internal
|
|
149
149
|
*/
|
|
150
|
-
export type _PackageManager = '
|
|
150
|
+
export type _PackageManager = 'pnpm' | 'yarn' | 'npm';
|
|
151
151
|
/**
|
|
152
152
|
* Detect the package manager used in the workspace by looking for lockfiles.
|
|
153
153
|
* @internal
|
|
@@ -197,16 +197,16 @@ export declare class _NpmDependencyHandler implements _DependencyHandler<_NpmDep
|
|
|
197
197
|
private get dependencyKey();
|
|
198
198
|
private get dependencyLabel();
|
|
199
199
|
/** Check whether the npm dependency is already present in package.json. */
|
|
200
|
-
check(dep:
|
|
200
|
+
check(dep: _NpmDependency | _DevNpmDependency): Promise<_CheckResult>;
|
|
201
201
|
/** Check whether the requested version conflicts with the currently installed version. */
|
|
202
|
-
checkConflict(dep:
|
|
202
|
+
checkConflict(dep: _NpmDependency | _DevNpmDependency): Promise<_ConflictResult>;
|
|
203
203
|
/** Add or update the npm dependency in package.json. */
|
|
204
|
-
add(dep:
|
|
204
|
+
add(dep: _NpmDependency | _DevNpmDependency): Promise<{
|
|
205
205
|
action: 'add' | 'update';
|
|
206
206
|
message: string;
|
|
207
207
|
}>;
|
|
208
208
|
/** Run the package manager install command in the working directory. */
|
|
209
|
-
install(_deps: (
|
|
209
|
+
install(_deps: (_NpmDependency | _DevNpmDependency)[]): Promise<void>;
|
|
210
210
|
private versionsCompatible;
|
|
211
211
|
private extractMajorVersion;
|
|
212
212
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -94,7 +94,7 @@ describe('MyDiscountCalculation', () => {
|
|
|
94
94
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
95
95
|
|
|
96
96
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
97
|
-
interface MyDiscountCalculationConfig
|
|
97
|
+
interface MyDiscountCalculationConfig {}
|
|
98
98
|
|
|
99
99
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
100
100
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -136,7 +136,7 @@ describe('MyBalanceApp', () => {
|
|
|
136
136
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
137
137
|
|
|
138
138
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
139
|
-
interface MyBalanceAppConfig
|
|
139
|
+
interface MyBalanceAppConfig {}
|
|
140
140
|
|
|
141
141
|
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
142
142
|
computeAppliedCustomerBalance(
|
|
@@ -177,7 +177,7 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
177
177
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
178
178
|
|
|
179
179
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
180
|
-
interface MyInvoiceCollectionSettingConfig
|
|
180
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
181
181
|
|
|
182
182
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
183
183
|
collectionOverride(
|
|
@@ -216,7 +216,7 @@ describe('MyProrations', () => {
|
|
|
216
216
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
217
217
|
|
|
218
218
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
219
|
-
interface MyProrationsConfig
|
|
219
|
+
interface MyProrationsConfig {}
|
|
220
220
|
|
|
221
221
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
222
222
|
prorateItems(
|
|
@@ -257,7 +257,7 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
257
257
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
258
258
|
|
|
259
259
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
260
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
260
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
261
261
|
|
|
262
262
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
263
263
|
beforeItemCreation(
|
|
@@ -507,7 +507,7 @@ describe('MyCustomAction', () => {
|
|
|
507
507
|
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
508
508
|
|
|
509
509
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
510
|
-
interface MyCustomActionConfig
|
|
510
|
+
interface MyCustomActionConfig {}
|
|
511
511
|
|
|
512
512
|
export default class MyCustomAction implements Core.Workflows
|
|
513
513
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -570,7 +570,7 @@ describe('MyCustomAction', () => {
|
|
|
570
570
|
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
571
571
|
|
|
572
572
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
573
|
-
interface MyCustomActionConfig
|
|
573
|
+
interface MyCustomActionConfig {}
|
|
574
574
|
|
|
575
575
|
export default class MyCustomAction implements Extend.Workflows
|
|
576
576
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -2258,6 +2258,7 @@ function _createBaseOutput(params, context) {
|
|
|
2258
2258
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
2259
2259
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
2260
2260
|
var customActionTemplate = {
|
|
2261
|
+
deprecated: true,
|
|
2261
2262
|
methods: {
|
|
2262
2263
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
2263
2264
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ describe('MyDiscountCalculation', () => {
|
|
|
30
30
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
31
31
|
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
33
|
-
interface MyDiscountCalculationConfig
|
|
33
|
+
interface MyDiscountCalculationConfig {}
|
|
34
34
|
|
|
35
35
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
36
36
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -72,7 +72,7 @@ describe('MyBalanceApp', () => {
|
|
|
72
72
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
73
73
|
|
|
74
74
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
75
|
-
interface MyBalanceAppConfig
|
|
75
|
+
interface MyBalanceAppConfig {}
|
|
76
76
|
|
|
77
77
|
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
78
78
|
computeAppliedCustomerBalance(
|
|
@@ -113,7 +113,7 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
113
113
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
114
114
|
|
|
115
115
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
116
|
-
interface MyInvoiceCollectionSettingConfig
|
|
116
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
117
117
|
|
|
118
118
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
119
119
|
collectionOverride(
|
|
@@ -152,7 +152,7 @@ describe('MyProrations', () => {
|
|
|
152
152
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
153
153
|
|
|
154
154
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
155
|
-
interface MyProrationsConfig
|
|
155
|
+
interface MyProrationsConfig {}
|
|
156
156
|
|
|
157
157
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
158
158
|
prorateItems(
|
|
@@ -193,7 +193,7 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
193
193
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
194
194
|
|
|
195
195
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
196
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
196
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
197
197
|
|
|
198
198
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
199
199
|
beforeItemCreation(
|
|
@@ -443,7 +443,7 @@ describe('MyCustomAction', () => {
|
|
|
443
443
|
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
444
444
|
|
|
445
445
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
446
|
-
interface MyCustomActionConfig
|
|
446
|
+
interface MyCustomActionConfig {}
|
|
447
447
|
|
|
448
448
|
export default class MyCustomAction implements Core.Workflows
|
|
449
449
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -506,7 +506,7 @@ describe('MyCustomAction', () => {
|
|
|
506
506
|
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
507
507
|
|
|
508
508
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
509
|
-
interface MyCustomActionConfig
|
|
509
|
+
interface MyCustomActionConfig {}
|
|
510
510
|
|
|
511
511
|
export default class MyCustomAction implements Extend.Workflows
|
|
512
512
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -2198,6 +2198,7 @@ function _createBaseOutput(params, context) {
|
|
|
2198
2198
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
2199
2199
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
2200
2200
|
var customActionTemplate = {
|
|
2201
|
+
deprecated: true,
|
|
2201
2202
|
methods: {
|
|
2202
2203
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
2203
2204
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
|
@@ -39,8 +39,8 @@ export interface _CustomObjectDefinitionYaml {
|
|
|
39
39
|
id: string;
|
|
40
40
|
/** Specification describing the type and source file for the definition. */
|
|
41
41
|
specification: {
|
|
42
|
-
content: string;
|
|
43
42
|
type: string;
|
|
43
|
+
content: string;
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -119,8 +119,8 @@ export interface _ExtensionConfig {
|
|
|
119
119
|
script_entry_point?: string;
|
|
120
120
|
/** Inline script definition (type + content path). */
|
|
121
121
|
script?: {
|
|
122
|
-
content: string;
|
|
123
122
|
type: string;
|
|
123
|
+
content: string;
|
|
124
124
|
};
|
|
125
125
|
/** Required permissions for the extension. */
|
|
126
126
|
permissions: string[];
|
|
@@ -130,11 +130,16 @@ export interface _ExtensionConfig {
|
|
|
130
130
|
configuration?: _ExtensionConfiguration;
|
|
131
131
|
/** Remote function endpoints for the extension. */
|
|
132
132
|
endpoints?: {
|
|
133
|
+
/** The unique identifier for the endpoint. */
|
|
133
134
|
id: string;
|
|
135
|
+
/** The type of endpoint. */
|
|
136
|
+
type: 'remote_function' | 'custom_http';
|
|
137
|
+
/** Configuration for the live environment. */
|
|
134
138
|
live?: _EndpointDefinition;
|
|
139
|
+
/** Configuration for the managed sandbox environment. */
|
|
135
140
|
managed_sandbox?: _EndpointDefinition;
|
|
141
|
+
/** Configuration for the test environment. */
|
|
136
142
|
test?: _EndpointDefinition;
|
|
137
|
-
type: 'custom_http' | 'remote_function';
|
|
138
143
|
}[];
|
|
139
144
|
}
|
|
140
145
|
/**
|
|
@@ -6,7 +6,7 @@ export type { _OverwriteDecision };
|
|
|
6
6
|
*/
|
|
7
7
|
export interface DiffLine {
|
|
8
8
|
/** The type of change this line represents */
|
|
9
|
-
type: 'add' | '
|
|
9
|
+
type: 'add' | 'remove' | 'context' | 'header';
|
|
10
10
|
/** The text content of the line (including +/- prefix from diff) */
|
|
11
11
|
text: string;
|
|
12
12
|
/** Line number in the old file (for remove/context lines) */
|
|
@@ -54,5 +54,5 @@ export interface ViewerState {
|
|
|
54
54
|
* Internal result from keypress handler.
|
|
55
55
|
* @internal
|
|
56
56
|
*/
|
|
57
|
-
export type KeypressResult =
|
|
57
|
+
export type KeypressResult = 'continue' | _OverwriteDecision;
|
|
58
58
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -5,7 +5,7 @@ export declare const LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-langu
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
export declare const LANGUAGE_SERVER_PACKAGE_VERSION: string;
|
|
7
7
|
/** @internal */
|
|
8
|
-
export type _ExecutionProfile = '
|
|
8
|
+
export type _ExecutionProfile = 'restricted' | 'egress';
|
|
9
9
|
/** @internal */
|
|
10
10
|
export interface _BaseTemplateParams extends _ExtensionParams {
|
|
11
11
|
extensionInterfaceId: string;
|
|
@@ -15,7 +15,9 @@ export interface _BaseTemplateParams extends _ExtensionParams {
|
|
|
15
15
|
* Generate the ESLint config file for an extension workspace.
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
|
-
export declare function _createExtensionEslintConfigFile(params:
|
|
18
|
+
export declare function _createExtensionEslintConfigFile(params: Pick<_ExtensionParams, 'id'> & {
|
|
19
|
+
extensionInterfaceId: string;
|
|
20
|
+
}, context: _TemplateContext): _GeneratedFile;
|
|
19
21
|
/** @internal */
|
|
20
22
|
export declare function _createBaseOutput(params: _BaseTemplateParams, context: _TemplateContext): _ExtensionTemplateOutput;
|
|
21
23
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.workflows.custom_action.d.ts","sourceRoot":"","sources":["../../../src/templates/extensions/core.workflows.custom_action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"core.workflows.custom_action.d.ts","sourceRoot":"","sources":["../../../src/templates/extensions/core.workflows.custom_action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;;;;AA+DrD,wBAEE"}
|
|
@@ -13,11 +13,15 @@ import type { _Template, _TemplateOutput } from '../types.js';
|
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
15
|
export type _PostGenerationHook = {
|
|
16
|
+
/** Script name to run via `pnpm run <script>` */
|
|
17
|
+
script: string;
|
|
18
|
+
/** Optional description of what this hook does */
|
|
16
19
|
description?: string;
|
|
17
|
-
exec: string;
|
|
18
20
|
} | {
|
|
21
|
+
/** Command to run via `pnpm exec <command>` */
|
|
22
|
+
exec: string;
|
|
23
|
+
/** Optional description of what this hook does */
|
|
19
24
|
description?: string;
|
|
20
|
-
script: string;
|
|
21
25
|
};
|
|
22
26
|
/**
|
|
23
27
|
* Parameters for extension template generation
|
|
@@ -40,8 +44,10 @@ export interface _ExtensionTemplateOutput extends _TemplateOutput {
|
|
|
40
44
|
methods: Record<string, unknown>;
|
|
41
45
|
/** Dependencies required by the extension */
|
|
42
46
|
dependencies?: {
|
|
43
|
-
|
|
47
|
+
/** Regular dependencies (added to dependencies field) */
|
|
44
48
|
runtime?: _NpmDependency[];
|
|
49
|
+
/** Development dependencies (added to devDependencies field) */
|
|
50
|
+
dev?: _DevNpmDependency[];
|
|
45
51
|
};
|
|
46
52
|
/** Post-generation hooks to run after files are generated and dependencies installed */
|
|
47
53
|
postGenerationHooks?: _PostGenerationHook[];
|
|
@@ -9,7 +9,7 @@ import type { _GeneratedFile } from './types.js';
|
|
|
9
9
|
* User decision when prompted about overwriting a file
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
|
-
export type _OverwriteDecision = '
|
|
12
|
+
export type _OverwriteDecision = 'overwrite' | 'skip' | 'overwrite-all' | 'abort';
|
|
13
13
|
/**
|
|
14
14
|
* Callback function for prompting about file overwrites
|
|
15
15
|
* @param path - Relative path to the file that would be overwritten
|
|
@@ -27,7 +27,7 @@ export type _OverwritePromptCallback = (path: string, cwd: string, newContent: s
|
|
|
27
27
|
* - function: Prompt before overwriting each file (interactive ask mode)
|
|
28
28
|
* @internal
|
|
29
29
|
*/
|
|
30
|
-
export type _WriteMode =
|
|
30
|
+
export type _WriteMode = 'overwrite-all' | 'abort-if-existing' | 'if-missing' | _OverwritePromptCallback;
|
|
31
31
|
/**
|
|
32
32
|
* Options for writing generated files
|
|
33
33
|
* @internal
|
package/dist/templates/index.cjs
CHANGED
|
@@ -78,7 +78,7 @@ describe('MyDiscountCalculation', () => {
|
|
|
78
78
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
79
79
|
|
|
80
80
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
81
|
-
interface MyDiscountCalculationConfig
|
|
81
|
+
interface MyDiscountCalculationConfig {}
|
|
82
82
|
|
|
83
83
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
84
84
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -120,7 +120,7 @@ describe('MyBalanceApp', () => {
|
|
|
120
120
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
121
121
|
|
|
122
122
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
123
|
-
interface MyBalanceAppConfig
|
|
123
|
+
interface MyBalanceAppConfig {}
|
|
124
124
|
|
|
125
125
|
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
126
126
|
computeAppliedCustomerBalance(
|
|
@@ -161,7 +161,7 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
161
161
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
162
162
|
|
|
163
163
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
164
|
-
interface MyInvoiceCollectionSettingConfig
|
|
164
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
165
165
|
|
|
166
166
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
167
167
|
collectionOverride(
|
|
@@ -200,7 +200,7 @@ describe('MyProrations', () => {
|
|
|
200
200
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
201
201
|
|
|
202
202
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
203
|
-
interface MyProrationsConfig
|
|
203
|
+
interface MyProrationsConfig {}
|
|
204
204
|
|
|
205
205
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
206
206
|
prorateItems(
|
|
@@ -241,7 +241,7 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
241
241
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
242
242
|
|
|
243
243
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
244
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
244
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
245
245
|
|
|
246
246
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
247
247
|
beforeItemCreation(
|
|
@@ -491,7 +491,7 @@ describe('MyCustomAction', () => {
|
|
|
491
491
|
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
492
492
|
|
|
493
493
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
494
|
-
interface MyCustomActionConfig
|
|
494
|
+
interface MyCustomActionConfig {}
|
|
495
495
|
|
|
496
496
|
export default class MyCustomAction implements Core.Workflows
|
|
497
497
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -554,7 +554,7 @@ describe('MyCustomAction', () => {
|
|
|
554
554
|
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
555
555
|
|
|
556
556
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
557
|
-
interface MyCustomActionConfig
|
|
557
|
+
interface MyCustomActionConfig {}
|
|
558
558
|
|
|
559
559
|
export default class MyCustomAction implements Extend.Workflows
|
|
560
560
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1706,6 +1706,7 @@ function _createBaseOutput(params, context) {
|
|
|
1706
1706
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
1707
1707
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
1708
1708
|
var customActionTemplate = {
|
|
1709
|
+
deprecated: true,
|
|
1709
1710
|
methods: {
|
|
1710
1711
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
1711
1712
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|