@stripe/extensibility-dev-tools 0.23.5 → 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/README.md +28 -0
- package/dist/bin/build-custom-object-definitions.cjs +42 -36
- package/dist/bin/build-custom-object-definitions.js +42 -36
- package/dist/bin/create-upload-image.cjs +42 -36
- package/dist/bin/create-upload-image.js +42 -36
- package/dist/bin/dev-tools-rpc.cjs +42 -31
- package/dist/bin/dev-tools-rpc.js +42 -31
- package/dist/bin/gen-workspace.cjs +42 -31
- package/dist/bin/gen-workspace.js +42 -31
- package/dist/bin/template-info.cjs +28 -30
- package/dist/bin/template-info.js +28 -30
- 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/index.cjs +42 -31
- package/dist/index.js +42 -31
- package/dist/templates/extensions/base.d.ts +1 -1
- package/dist/templates/extensions/base.d.ts.map +1 -1
- package/dist/templates/extensions/core.workflows.custom_action.d.ts.map +1 -1
- package/dist/templates/index.cjs +42 -31
- package/dist/templates/index.js +42 -31
- package/dist/templates/root/index.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/workspace/index.cjs +42 -31
- package/dist/workspace/index.js +42 -31
- package/package.json +4 -4
- package/templates/extensions/billing.bill.discount_calculation/index.ts +2 -3
- package/templates/extensions/billing.customer_balance_application/index.test.ts +5 -5
- package/templates/extensions/billing.customer_balance_application/index.ts +4 -4
- package/templates/extensions/billing.invoice_collection_setting/index.ts +2 -2
- package/templates/extensions/billing.prorations/index.ts +2 -2
- package/templates/extensions/billing.recurring_billing_item_handling/index.ts +2 -2
- package/templates/extensions/core.workflows.custom_action/index.ts +2 -3
- package/templates/extensions/extend.workflows.custom_action/index.ts +2 -3
- package/templates/root/custom-objects/{package.json → package.json.mustache} +4 -4
- package/dist/extensibility-dev-tools-alpha.d.ts +0 -199
- package/dist/extensibility-dev-tools-beta.d.ts +0 -199
- package/dist/extensibility-dev-tools-dependencies-alpha.d.ts +0 -51
- package/dist/extensibility-dev-tools-dependencies-beta.d.ts +0 -51
- package/dist/extensibility-dev-tools-dependencies-internal.d.ts +0 -372
- package/dist/extensibility-dev-tools-dependencies-public.d.ts +0 -51
- package/dist/extensibility-dev-tools-internal.d.ts +0 -1722
- package/dist/extensibility-dev-tools-jsonschema-tools-alpha.d.ts +0 -57
- package/dist/extensibility-dev-tools-jsonschema-tools-beta.d.ts +0 -57
- package/dist/extensibility-dev-tools-jsonschema-tools-internal.d.ts +0 -123
- package/dist/extensibility-dev-tools-jsonschema-tools-public.d.ts +0 -57
- package/dist/extensibility-dev-tools-manifest-alpha.d.ts +0 -31
- package/dist/extensibility-dev-tools-manifest-beta.d.ts +0 -31
- package/dist/extensibility-dev-tools-manifest-internal.d.ts +0 -461
- package/dist/extensibility-dev-tools-manifest-public.d.ts +0 -31
- package/dist/extensibility-dev-tools-public.d.ts +0 -199
- package/dist/extensibility-dev-tools-schemas-alpha.d.ts +0 -9
- package/dist/extensibility-dev-tools-schemas-beta.d.ts +0 -9
- package/dist/extensibility-dev-tools-schemas-internal.d.ts +0 -41
- package/dist/extensibility-dev-tools-schemas-public.d.ts +0 -9
- package/dist/extensibility-dev-tools-templates-alpha.d.ts +0 -67
- package/dist/extensibility-dev-tools-templates-beta.d.ts +0 -67
- package/dist/extensibility-dev-tools-templates-internal.d.ts +0 -554
- package/dist/extensibility-dev-tools-templates-public.d.ts +0 -67
- package/dist/extensibility-dev-tools-workspace-alpha.d.ts +0 -51
- package/dist/extensibility-dev-tools-workspace-beta.d.ts +0 -51
- package/dist/extensibility-dev-tools-workspace-internal.d.ts +0 -410
- package/dist/extensibility-dev-tools-workspace-public.d.ts +0 -51
package/dist/workspace/index.cjs
CHANGED
|
@@ -1191,11 +1191,10 @@ describe('MyDiscountCalculation', () => {
|
|
|
1191
1191
|
},
|
|
1192
1192
|
{
|
|
1193
1193
|
path: "extensions/billing.bill.discount_calculation/index.ts",
|
|
1194
|
-
content: `import type { Billing } from '@stripe/extensibility-sdk
|
|
1195
|
-
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
1194
|
+
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1196
1195
|
|
|
1197
1196
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1198
|
-
interface MyDiscountCalculationConfig
|
|
1197
|
+
interface MyDiscountCalculationConfig {}
|
|
1199
1198
|
|
|
1200
1199
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
1201
1200
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -1217,32 +1216,32 @@ export default class MyDiscountCalculation implements Billing.Bill
|
|
|
1217
1216
|
path: "extensions/billing.customer_balance_application/index.test.ts",
|
|
1218
1217
|
content: `import { beforeEach, describe, it, expect } from 'vitest';
|
|
1219
1218
|
|
|
1220
|
-
import
|
|
1219
|
+
import MyBalanceApp from './index.js';
|
|
1221
1220
|
|
|
1222
|
-
describe('
|
|
1223
|
-
let instance:
|
|
1221
|
+
describe('MyBalanceApp', () => {
|
|
1222
|
+
let instance: MyBalanceApp;
|
|
1224
1223
|
|
|
1225
1224
|
beforeEach(() => {
|
|
1226
|
-
instance = new
|
|
1225
|
+
instance = new MyBalanceApp();
|
|
1227
1226
|
});
|
|
1228
1227
|
|
|
1229
1228
|
it('should be constructable', () => {
|
|
1230
|
-
expect(instance).toBeInstanceOf(
|
|
1229
|
+
expect(instance).toBeInstanceOf(MyBalanceApp);
|
|
1231
1230
|
});
|
|
1232
1231
|
});
|
|
1233
1232
|
`
|
|
1234
1233
|
},
|
|
1235
1234
|
{
|
|
1236
1235
|
path: "extensions/billing.customer_balance_application/index.ts",
|
|
1237
|
-
content: `import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1236
|
+
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1238
1237
|
|
|
1239
1238
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1240
|
-
interface
|
|
1239
|
+
interface MyBalanceAppConfig {}
|
|
1241
1240
|
|
|
1242
|
-
export default class
|
|
1241
|
+
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
1243
1242
|
computeAppliedCustomerBalance(
|
|
1244
1243
|
request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
|
|
1245
|
-
_config:
|
|
1244
|
+
_config: MyBalanceAppConfig,
|
|
1246
1245
|
_context: Context
|
|
1247
1246
|
) {
|
|
1248
1247
|
// TODO: implement your customer balance logic here
|
|
@@ -1275,10 +1274,10 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
1275
1274
|
},
|
|
1276
1275
|
{
|
|
1277
1276
|
path: "extensions/billing.invoice_collection_setting/index.ts",
|
|
1278
|
-
content: `import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1277
|
+
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1279
1278
|
|
|
1280
1279
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1281
|
-
interface MyInvoiceCollectionSettingConfig
|
|
1280
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
1282
1281
|
|
|
1283
1282
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
1284
1283
|
collectionOverride(
|
|
@@ -1314,10 +1313,10 @@ describe('MyProrations', () => {
|
|
|
1314
1313
|
},
|
|
1315
1314
|
{
|
|
1316
1315
|
path: "extensions/billing.prorations/index.ts",
|
|
1317
|
-
content: `import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1316
|
+
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1318
1317
|
|
|
1319
1318
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1320
|
-
interface MyProrationsConfig
|
|
1319
|
+
interface MyProrationsConfig {}
|
|
1321
1320
|
|
|
1322
1321
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
1323
1322
|
prorateItems(
|
|
@@ -1355,10 +1354,10 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
1355
1354
|
},
|
|
1356
1355
|
{
|
|
1357
1356
|
path: "extensions/billing.recurring_billing_item_handling/index.ts",
|
|
1358
|
-
content: `import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1357
|
+
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1359
1358
|
|
|
1360
1359
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1361
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
1360
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
1362
1361
|
|
|
1363
1362
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
1364
1363
|
beforeItemCreation(
|
|
@@ -1605,11 +1604,10 @@ describe('MyCustomAction', () => {
|
|
|
1605
1604
|
},
|
|
1606
1605
|
{
|
|
1607
1606
|
path: "extensions/core.workflows.custom_action/index.ts",
|
|
1608
|
-
content: `import type { Core } from '@stripe/extensibility-sdk
|
|
1609
|
-
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
1607
|
+
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
1610
1608
|
|
|
1611
1609
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1612
|
-
interface MyCustomActionConfig
|
|
1610
|
+
interface MyCustomActionConfig {}
|
|
1613
1611
|
|
|
1614
1612
|
export default class MyCustomAction implements Core.Workflows
|
|
1615
1613
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1669,11 +1667,10 @@ describe('MyCustomAction', () => {
|
|
|
1669
1667
|
},
|
|
1670
1668
|
{
|
|
1671
1669
|
path: "extensions/extend.workflows.custom_action/index.ts",
|
|
1672
|
-
content: `import type { Extend } from '@stripe/extensibility-sdk
|
|
1673
|
-
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
1670
|
+
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
1674
1671
|
|
|
1675
1672
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1676
|
-
interface MyCustomActionConfig
|
|
1673
|
+
interface MyCustomActionConfig {}
|
|
1677
1674
|
|
|
1678
1675
|
export default class MyCustomAction implements Extend.Workflows
|
|
1679
1676
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1760,7 +1757,7 @@ generated
|
|
|
1760
1757
|
`
|
|
1761
1758
|
},
|
|
1762
1759
|
{
|
|
1763
|
-
path: "root/custom-objects/package.json",
|
|
1760
|
+
path: "root/custom-objects/package.json.mustache",
|
|
1764
1761
|
content: `{
|
|
1765
1762
|
"name": "custom-objects",
|
|
1766
1763
|
"type": "module",
|
|
@@ -1773,12 +1770,12 @@ generated
|
|
|
1773
1770
|
"test": "vitest run"
|
|
1774
1771
|
},
|
|
1775
1772
|
"dependencies": {
|
|
1776
|
-
"@stripe/extensibility-custom-objects": "
|
|
1777
|
-
"@stripe/extensibility-sdk": "
|
|
1773
|
+
"@stripe/extensibility-custom-objects": "{{ customObjectsVersion }}",
|
|
1774
|
+
"@stripe/extensibility-sdk": "{{ sdkVersion }}"
|
|
1778
1775
|
},
|
|
1779
1776
|
"devDependencies": {
|
|
1780
|
-
"@stripe/extensibility-custom-objects-tools": "
|
|
1781
|
-
"@stripe/extensibility-test-helpers": "
|
|
1777
|
+
"@stripe/extensibility-custom-objects-tools": "{{ customObjectsToolsVersion }}",
|
|
1778
|
+
"@stripe/extensibility-test-helpers": "{{ testHelpersVersion }}"
|
|
1782
1779
|
}
|
|
1783
1780
|
}
|
|
1784
1781
|
`
|
|
@@ -2747,7 +2744,7 @@ var _ExtensionTemplateManager = class extends import_extensibility_tool_utils4._
|
|
|
2747
2744
|
var import_extensibility_tool_utils9 = require("@stripe/extensibility-tool-utils");
|
|
2748
2745
|
var SDK_PACKAGE_NAME = "@stripe/extensibility-sdk";
|
|
2749
2746
|
var LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-language-server";
|
|
2750
|
-
var LANGUAGE_SERVER_PACKAGE_VERSION =
|
|
2747
|
+
var LANGUAGE_SERVER_PACKAGE_VERSION = `^${(0, import_extensibility_tool_utils9._workspaceVersion)(LANGUAGE_SERVER_PACKAGE_NAME)}`;
|
|
2751
2748
|
function _createExtensionEslintConfigFile(params, context) {
|
|
2752
2749
|
const { id, extensionInterfaceId } = params;
|
|
2753
2750
|
const { fs: fs2 } = context;
|
|
@@ -2809,6 +2806,7 @@ function _createBaseOutput(params, context) {
|
|
|
2809
2806
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
2810
2807
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
2811
2808
|
var customActionTemplate = {
|
|
2809
|
+
deprecated: true,
|
|
2812
2810
|
methods: {
|
|
2813
2811
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
2814
2812
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
|
@@ -3267,7 +3265,20 @@ var _rootWorkspaceTemplate = {
|
|
|
3267
3265
|
},
|
|
3268
3266
|
{
|
|
3269
3267
|
path: "custom-objects/package.json",
|
|
3270
|
-
content: fs2.
|
|
3268
|
+
content: fs2.mustache(
|
|
3269
|
+
{
|
|
3270
|
+
customObjectsVersion: (0, import_extensibility_tool_utils10._workspaceVersion)(
|
|
3271
|
+
"@stripe/extensibility-custom-objects"
|
|
3272
|
+
),
|
|
3273
|
+
sdkVersion: (0, import_extensibility_tool_utils10._workspaceVersion)("@stripe/extensibility-sdk"),
|
|
3274
|
+
customObjectsToolsVersion: (0, import_extensibility_tool_utils10._workspaceVersion)(
|
|
3275
|
+
"@stripe/extensibility-custom-objects-tools"
|
|
3276
|
+
),
|
|
3277
|
+
testHelpersVersion: (0, import_extensibility_tool_utils10._workspaceVersion)("@stripe/extensibility-test-helpers")
|
|
3278
|
+
},
|
|
3279
|
+
"custom-objects",
|
|
3280
|
+
"package.json.mustache"
|
|
3281
|
+
),
|
|
3271
3282
|
precious: true
|
|
3272
3283
|
},
|
|
3273
3284
|
{
|
package/dist/workspace/index.js
CHANGED
|
@@ -1163,11 +1163,10 @@ describe('MyDiscountCalculation', () => {
|
|
|
1163
1163
|
},
|
|
1164
1164
|
{
|
|
1165
1165
|
path: "extensions/billing.bill.discount_calculation/index.ts",
|
|
1166
|
-
content: `import type { Billing } from '@stripe/extensibility-sdk
|
|
1167
|
-
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
1166
|
+
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1168
1167
|
|
|
1169
1168
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1170
|
-
interface MyDiscountCalculationConfig
|
|
1169
|
+
interface MyDiscountCalculationConfig {}
|
|
1171
1170
|
|
|
1172
1171
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
1173
1172
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -1189,32 +1188,32 @@ export default class MyDiscountCalculation implements Billing.Bill
|
|
|
1189
1188
|
path: "extensions/billing.customer_balance_application/index.test.ts",
|
|
1190
1189
|
content: `import { beforeEach, describe, it, expect } from 'vitest';
|
|
1191
1190
|
|
|
1192
|
-
import
|
|
1191
|
+
import MyBalanceApp from './index.js';
|
|
1193
1192
|
|
|
1194
|
-
describe('
|
|
1195
|
-
let instance:
|
|
1193
|
+
describe('MyBalanceApp', () => {
|
|
1194
|
+
let instance: MyBalanceApp;
|
|
1196
1195
|
|
|
1197
1196
|
beforeEach(() => {
|
|
1198
|
-
instance = new
|
|
1197
|
+
instance = new MyBalanceApp();
|
|
1199
1198
|
});
|
|
1200
1199
|
|
|
1201
1200
|
it('should be constructable', () => {
|
|
1202
|
-
expect(instance).toBeInstanceOf(
|
|
1201
|
+
expect(instance).toBeInstanceOf(MyBalanceApp);
|
|
1203
1202
|
});
|
|
1204
1203
|
});
|
|
1205
1204
|
`
|
|
1206
1205
|
},
|
|
1207
1206
|
{
|
|
1208
1207
|
path: "extensions/billing.customer_balance_application/index.ts",
|
|
1209
|
-
content: `import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1208
|
+
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1210
1209
|
|
|
1211
1210
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1212
|
-
interface
|
|
1211
|
+
interface MyBalanceAppConfig {}
|
|
1213
1212
|
|
|
1214
|
-
export default class
|
|
1213
|
+
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
1215
1214
|
computeAppliedCustomerBalance(
|
|
1216
1215
|
request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
|
|
1217
|
-
_config:
|
|
1216
|
+
_config: MyBalanceAppConfig,
|
|
1218
1217
|
_context: Context
|
|
1219
1218
|
) {
|
|
1220
1219
|
// TODO: implement your customer balance logic here
|
|
@@ -1247,10 +1246,10 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
1247
1246
|
},
|
|
1248
1247
|
{
|
|
1249
1248
|
path: "extensions/billing.invoice_collection_setting/index.ts",
|
|
1250
|
-
content: `import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1249
|
+
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1251
1250
|
|
|
1252
1251
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1253
|
-
interface MyInvoiceCollectionSettingConfig
|
|
1252
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
1254
1253
|
|
|
1255
1254
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
1256
1255
|
collectionOverride(
|
|
@@ -1286,10 +1285,10 @@ describe('MyProrations', () => {
|
|
|
1286
1285
|
},
|
|
1287
1286
|
{
|
|
1288
1287
|
path: "extensions/billing.prorations/index.ts",
|
|
1289
|
-
content: `import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1288
|
+
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1290
1289
|
|
|
1291
1290
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1292
|
-
interface MyProrationsConfig
|
|
1291
|
+
interface MyProrationsConfig {}
|
|
1293
1292
|
|
|
1294
1293
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
1295
1294
|
prorateItems(
|
|
@@ -1327,10 +1326,10 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
1327
1326
|
},
|
|
1328
1327
|
{
|
|
1329
1328
|
path: "extensions/billing.recurring_billing_item_handling/index.ts",
|
|
1330
|
-
content: `import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1329
|
+
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
1331
1330
|
|
|
1332
1331
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1333
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
1332
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
1334
1333
|
|
|
1335
1334
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
1336
1335
|
beforeItemCreation(
|
|
@@ -1577,11 +1576,10 @@ describe('MyCustomAction', () => {
|
|
|
1577
1576
|
},
|
|
1578
1577
|
{
|
|
1579
1578
|
path: "extensions/core.workflows.custom_action/index.ts",
|
|
1580
|
-
content: `import type { Core } from '@stripe/extensibility-sdk
|
|
1581
|
-
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
1579
|
+
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
1582
1580
|
|
|
1583
1581
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1584
|
-
interface MyCustomActionConfig
|
|
1582
|
+
interface MyCustomActionConfig {}
|
|
1585
1583
|
|
|
1586
1584
|
export default class MyCustomAction implements Core.Workflows
|
|
1587
1585
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1641,11 +1639,10 @@ describe('MyCustomAction', () => {
|
|
|
1641
1639
|
},
|
|
1642
1640
|
{
|
|
1643
1641
|
path: "extensions/extend.workflows.custom_action/index.ts",
|
|
1644
|
-
content: `import type { Extend } from '@stripe/extensibility-sdk
|
|
1645
|
-
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
1642
|
+
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
1646
1643
|
|
|
1647
1644
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
1648
|
-
interface MyCustomActionConfig
|
|
1645
|
+
interface MyCustomActionConfig {}
|
|
1649
1646
|
|
|
1650
1647
|
export default class MyCustomAction implements Extend.Workflows
|
|
1651
1648
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1732,7 +1729,7 @@ generated
|
|
|
1732
1729
|
`
|
|
1733
1730
|
},
|
|
1734
1731
|
{
|
|
1735
|
-
path: "root/custom-objects/package.json",
|
|
1732
|
+
path: "root/custom-objects/package.json.mustache",
|
|
1736
1733
|
content: `{
|
|
1737
1734
|
"name": "custom-objects",
|
|
1738
1735
|
"type": "module",
|
|
@@ -1745,12 +1742,12 @@ generated
|
|
|
1745
1742
|
"test": "vitest run"
|
|
1746
1743
|
},
|
|
1747
1744
|
"dependencies": {
|
|
1748
|
-
"@stripe/extensibility-custom-objects": "
|
|
1749
|
-
"@stripe/extensibility-sdk": "
|
|
1745
|
+
"@stripe/extensibility-custom-objects": "{{ customObjectsVersion }}",
|
|
1746
|
+
"@stripe/extensibility-sdk": "{{ sdkVersion }}"
|
|
1750
1747
|
},
|
|
1751
1748
|
"devDependencies": {
|
|
1752
|
-
"@stripe/extensibility-custom-objects-tools": "
|
|
1753
|
-
"@stripe/extensibility-test-helpers": "
|
|
1749
|
+
"@stripe/extensibility-custom-objects-tools": "{{ customObjectsToolsVersion }}",
|
|
1750
|
+
"@stripe/extensibility-test-helpers": "{{ testHelpersVersion }}"
|
|
1754
1751
|
}
|
|
1755
1752
|
}
|
|
1756
1753
|
`
|
|
@@ -2723,7 +2720,7 @@ var _ExtensionTemplateManager = class extends _TemplateManager {
|
|
|
2723
2720
|
import { _workspaceVersion } from "@stripe/extensibility-tool-utils";
|
|
2724
2721
|
var SDK_PACKAGE_NAME = "@stripe/extensibility-sdk";
|
|
2725
2722
|
var LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-language-server";
|
|
2726
|
-
var LANGUAGE_SERVER_PACKAGE_VERSION =
|
|
2723
|
+
var LANGUAGE_SERVER_PACKAGE_VERSION = `^${_workspaceVersion(LANGUAGE_SERVER_PACKAGE_NAME)}`;
|
|
2727
2724
|
function _createExtensionEslintConfigFile(params, context) {
|
|
2728
2725
|
const { id, extensionInterfaceId } = params;
|
|
2729
2726
|
const { fs: fs2 } = context;
|
|
@@ -2785,6 +2782,7 @@ function _createBaseOutput(params, context) {
|
|
|
2785
2782
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
2786
2783
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
2787
2784
|
var customActionTemplate = {
|
|
2785
|
+
deprecated: true,
|
|
2788
2786
|
methods: {
|
|
2789
2787
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
2790
2788
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
|
@@ -3243,7 +3241,20 @@ var _rootWorkspaceTemplate = {
|
|
|
3243
3241
|
},
|
|
3244
3242
|
{
|
|
3245
3243
|
path: "custom-objects/package.json",
|
|
3246
|
-
content: fs2.
|
|
3244
|
+
content: fs2.mustache(
|
|
3245
|
+
{
|
|
3246
|
+
customObjectsVersion: _workspaceVersion2(
|
|
3247
|
+
"@stripe/extensibility-custom-objects"
|
|
3248
|
+
),
|
|
3249
|
+
sdkVersion: _workspaceVersion2("@stripe/extensibility-sdk"),
|
|
3250
|
+
customObjectsToolsVersion: _workspaceVersion2(
|
|
3251
|
+
"@stripe/extensibility-custom-objects-tools"
|
|
3252
|
+
),
|
|
3253
|
+
testHelpersVersion: _workspaceVersion2("@stripe/extensibility-test-helpers")
|
|
3254
|
+
},
|
|
3255
|
+
"custom-objects",
|
|
3256
|
+
"package.json.mustache"
|
|
3257
|
+
),
|
|
3247
3258
|
precious: true
|
|
3248
3259
|
},
|
|
3249
3260
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stripe/extensibility-dev-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"yaml": "^2.8.3",
|
|
73
73
|
"yargs": "^17.7.2",
|
|
74
74
|
"zod": "^4.3.6",
|
|
75
|
-
"@stripe/extensibility-custom-objects-tools": "0.
|
|
76
|
-
"@stripe/extensibility-tool-utils": "0.6.
|
|
75
|
+
"@stripe/extensibility-custom-objects-tools": "0.41.0",
|
|
76
|
+
"@stripe/extensibility-tool-utils": "0.6.7"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@protobuf-ts/protoc": "^2.8.2",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@types/yargs": "^17.0.35",
|
|
84
84
|
"ts-proto": "^2.11.2",
|
|
85
85
|
"tsd": "^0.33.0",
|
|
86
|
-
"@stripe/extensibility-jsonschema-tools": "0.6.
|
|
86
|
+
"@stripe/extensibility-jsonschema-tools": "0.6.6"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"typescript": "^5.8.0"
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { Billing } from '@stripe/extensibility-sdk
|
|
2
|
-
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
1
|
+
import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
3
2
|
|
|
4
3
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
5
|
-
interface MyDiscountCalculationConfig
|
|
4
|
+
interface MyDiscountCalculationConfig {}
|
|
6
5
|
|
|
7
6
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
8
7
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { beforeEach, describe, it, expect } from 'vitest';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import MyBalanceApp from './index.js';
|
|
4
4
|
|
|
5
|
-
describe('
|
|
6
|
-
let instance:
|
|
5
|
+
describe('MyBalanceApp', () => {
|
|
6
|
+
let instance: MyBalanceApp;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
|
-
instance = new
|
|
9
|
+
instance = new MyBalanceApp();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
it('should be constructable', () => {
|
|
13
|
-
expect(instance).toBeInstanceOf(
|
|
13
|
+
expect(instance).toBeInstanceOf(MyBalanceApp);
|
|
14
14
|
});
|
|
15
15
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1
|
+
import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
4
|
-
interface
|
|
4
|
+
interface MyBalanceAppConfig {}
|
|
5
5
|
|
|
6
|
-
export default class
|
|
6
|
+
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
7
7
|
computeAppliedCustomerBalance(
|
|
8
8
|
request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
|
|
9
|
-
_config:
|
|
9
|
+
_config: MyBalanceAppConfig,
|
|
10
10
|
_context: Context
|
|
11
11
|
) {
|
|
12
12
|
// TODO: implement your customer balance logic here
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1
|
+
import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
4
|
-
interface MyInvoiceCollectionSettingConfig
|
|
4
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
5
5
|
|
|
6
6
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
7
7
|
collectionOverride(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1
|
+
import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
4
|
-
interface MyProrationsConfig
|
|
4
|
+
interface MyProrationsConfig {}
|
|
5
5
|
|
|
6
6
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
7
7
|
prorateItems(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Billing, Context } from '@stripe/extensibility-sdk
|
|
1
|
+
import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
4
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
4
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
5
5
|
|
|
6
6
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
7
7
|
beforeItemCreation(
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { Core } from '@stripe/extensibility-sdk
|
|
2
|
-
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
1
|
+
import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
3
2
|
|
|
4
3
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
5
|
-
interface MyCustomActionConfig
|
|
4
|
+
interface MyCustomActionConfig {}
|
|
6
5
|
|
|
7
6
|
export default class MyCustomAction implements Core.Workflows
|
|
8
7
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { Extend } from '@stripe/extensibility-sdk
|
|
2
|
-
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
1
|
+
import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
3
2
|
|
|
4
3
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
5
|
-
interface MyCustomActionConfig
|
|
4
|
+
interface MyCustomActionConfig {}
|
|
6
5
|
|
|
7
6
|
export default class MyCustomAction implements Extend.Workflows
|
|
8
7
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"test": "vitest run"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@stripe/extensibility-custom-objects": "
|
|
14
|
-
"@stripe/extensibility-sdk": "
|
|
13
|
+
"@stripe/extensibility-custom-objects": "{{ customObjectsVersion }}",
|
|
14
|
+
"@stripe/extensibility-sdk": "{{ sdkVersion }}"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@stripe/extensibility-custom-objects-tools": "
|
|
18
|
-
"@stripe/extensibility-test-helpers": "
|
|
17
|
+
"@stripe/extensibility-custom-objects-tools": "{{ customObjectsToolsVersion }}",
|
|
18
|
+
"@stripe/extensibility-test-helpers": "{{ testHelpersVersion }}"
|
|
19
19
|
}
|
|
20
20
|
}
|