@stripe/extensibility-dev-tools 0.23.7 → 0.24.3

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 (38) hide show
  1. package/dist/bin/build-custom-object-definitions.cjs +56 -21
  2. package/dist/bin/build-custom-object-definitions.js +56 -21
  3. package/dist/bin/create-upload-image.cjs +63 -25
  4. package/dist/bin/create-upload-image.js +63 -25
  5. package/dist/bin/dev-tools-rpc.cjs +8 -7
  6. package/dist/bin/dev-tools-rpc.js +8 -7
  7. package/dist/bin/gen-workspace.cjs +8 -7
  8. package/dist/bin/gen-workspace.js +8 -7
  9. package/dist/bin/template-info.cjs +8 -7
  10. package/dist/bin/template-info.js +8 -7
  11. package/dist/custom-objects/build-definitions.d.ts.map +1 -1
  12. package/dist/custom-objects/to-proto-json.d.ts +2 -1
  13. package/dist/custom-objects/to-proto-json.d.ts.map +1 -1
  14. package/dist/dependencies/index.d.ts +7 -7
  15. package/dist/index.cjs +8 -7
  16. package/dist/index.js +8 -7
  17. package/dist/manifest/manifest-v2.d.ts +8 -3
  18. package/dist/templates/diff-viewer/types.d.ts +2 -2
  19. package/dist/templates/extensions/base.d.ts +4 -2
  20. package/dist/templates/extensions/core.workflows.custom_action.d.ts.map +1 -1
  21. package/dist/templates/extensions/types.d.ts +9 -3
  22. package/dist/templates/file-writer.d.ts +2 -2
  23. package/dist/templates/index.cjs +8 -7
  24. package/dist/templates/index.js +8 -7
  25. package/dist/templates/root/index.d.ts +1 -1
  26. package/dist/tsconfig.build.tsbuildinfo +1 -1
  27. package/dist/workspace/index.cjs +8 -7
  28. package/dist/workspace/index.d.ts +34 -30
  29. package/dist/workspace/index.js +8 -7
  30. package/package.json +3 -3
  31. package/templates/extensions/billing.bill.discount_calculation/index.ts +1 -1
  32. package/templates/extensions/billing.customer_balance_application/index.ts +1 -1
  33. package/templates/extensions/billing.invoice_collection_setting/index.ts +1 -1
  34. package/templates/extensions/billing.prorations/index.ts +1 -1
  35. package/templates/extensions/billing.recurring_billing_item_handling/index.ts +1 -1
  36. package/templates/extensions/core.workflows.custom_action/index.ts +1 -1
  37. package/templates/extensions/extend.workflows.custom_action/index.ts +1 -1
  38. package/dist/api-surface.d.ts.map +0 -1
@@ -5,6 +5,7 @@ import { execSync as execSync2 } from "child_process";
5
5
  import * as fs3 from "fs";
6
6
  import * as os2 from "os";
7
7
  import * as path3 from "path";
8
+ import { _createCliContext as _createCliContext3, _createLogger } from "@stripe/extensibility-tool-utils";
8
9
 
9
10
  // src/custom-objects/build-definitions.ts
10
11
  import * as fs2 from "fs";
@@ -308,7 +309,7 @@ describe('MyDiscountCalculation', () => {
308
309
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
309
310
 
310
311
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
311
- interface MyDiscountCalculationConfig extends Record<string, unknown> {}
312
+ interface MyDiscountCalculationConfig {}
312
313
 
313
314
  export default class MyDiscountCalculation implements Billing.Bill
314
315
  .DiscountCalculation<MyDiscountCalculationConfig> {
@@ -350,7 +351,7 @@ describe('MyBalanceApp', () => {
350
351
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
351
352
 
352
353
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
353
- interface MyBalanceAppConfig extends Record<string, unknown> {}
354
+ interface MyBalanceAppConfig {}
354
355
 
355
356
  export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
356
357
  computeAppliedCustomerBalance(
@@ -391,7 +392,7 @@ describe('MyInvoiceCollectionSetting', () => {
391
392
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
392
393
 
393
394
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
394
- interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
395
+ interface MyInvoiceCollectionSettingConfig {}
395
396
 
396
397
  export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
397
398
  collectionOverride(
@@ -430,7 +431,7 @@ describe('MyProrations', () => {
430
431
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
431
432
 
432
433
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
433
- interface MyProrationsConfig extends Record<string, unknown> {}
434
+ interface MyProrationsConfig {}
434
435
 
435
436
  export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
436
437
  prorateItems(
@@ -471,7 +472,7 @@ describe('MyRecurringBillingItemHandling', () => {
471
472
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
472
473
 
473
474
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
474
- interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
475
+ interface MyRecurringBillingItemHandlingConfig {}
475
476
 
476
477
  export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
477
478
  beforeItemCreation(
@@ -721,7 +722,7 @@ describe('MyCustomAction', () => {
721
722
  content: `import type { Core, Context } from '@stripe/extensibility-sdk';
722
723
 
723
724
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
724
- interface MyCustomActionConfig extends Record<string, unknown> {}
725
+ interface MyCustomActionConfig {}
725
726
 
726
727
  export default class MyCustomAction implements Core.Workflows
727
728
  .CustomAction<MyCustomActionConfig> {
@@ -784,7 +785,7 @@ describe('MyCustomAction', () => {
784
785
  content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
785
786
 
786
787
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
787
- interface MyCustomActionConfig extends Record<string, unknown> {}
788
+ interface MyCustomActionConfig {}
788
789
 
789
790
  export default class MyCustomAction implements Extend.Workflows
790
791
  .CustomAction<MyCustomActionConfig> {
@@ -1308,6 +1309,7 @@ function _createBaseOutput(params, context) {
1308
1309
  // src/templates/extensions/core.workflows.custom_action.ts
1309
1310
  var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
1310
1311
  var customActionTemplate = {
1312
+ deprecated: true,
1311
1313
  methods: {
1312
1314
  execute: { implementation_types: ["script", "remote-function"] },
1313
1315
  get_form_state: { implementation_types: ["script", "remote-function"] }
@@ -1764,10 +1766,11 @@ function mapActions(actions) {
1764
1766
  }
1765
1767
  function mapProperties(schema) {
1766
1768
  const result = {};
1767
- const requiredSet = new Set(schema?.required ?? []);
1768
- if (!schema?.properties) return result;
1769
- const defs = schema.$defs ?? {};
1770
- for (const [key, propSchema] of Object.entries(schema.properties)) {
1769
+ const resolvedSchema = schema === null || schema === void 0 ? schema : resolveRef(schema, schema.$defs ?? {});
1770
+ const requiredSet = new Set(resolvedSchema?.required ?? []);
1771
+ if (!resolvedSchema?.properties) return result;
1772
+ const defs = resolvedSchema.$defs ?? {};
1773
+ for (const [key, propSchema] of Object.entries(resolvedSchema.properties)) {
1771
1774
  result[key] = toFieldSchema(resolveRef(propSchema, defs), requiredSet.has(key));
1772
1775
  }
1773
1776
  return result;
@@ -1811,7 +1814,13 @@ function toFieldSchema(schema, required) {
1811
1814
  fieldSchema.valuesPresence = FieldPresence.PRESENT;
1812
1815
  }
1813
1816
  if (schema.default !== void 0) {
1814
- fieldSchema.default = toDefaultValue(schema.default, fieldSchema.type);
1817
+ if (dataType === DataType.ENUM_TYPE && enumValues) {
1818
+ validateEnumDefault(schema.default, enumValues);
1819
+ }
1820
+ if (dataType === DataType.DATETIME_TYPE) {
1821
+ validateDatetimeDefault(schema.default);
1822
+ }
1823
+ fieldSchema.default = toDefaultValue(schema.default, dataType);
1815
1824
  }
1816
1825
  return fieldSchema;
1817
1826
  }
@@ -1823,7 +1832,6 @@ function resolveDataType(schema, enumValues, refTarget) {
1823
1832
  if (schema.format === "date-time") return DataType.DATETIME_TYPE;
1824
1833
  return DataType.STRING_TYPE;
1825
1834
  case "integer":
1826
- case "number":
1827
1835
  return DataType.INTEGER_TYPE;
1828
1836
  case "boolean":
1829
1837
  return DataType.BOOLEAN_TYPE;
@@ -1860,33 +1868,61 @@ function extractSingleLiteral(schema) {
1860
1868
  return null;
1861
1869
  }
1862
1870
  function extractEnumValues(schema) {
1863
- if (schema.enum) {
1871
+ if (Array.isArray(schema.enum) && schema.enum.every((value) => typeof value === "string")) {
1864
1872
  return schema.enum.map(String);
1865
1873
  }
1866
- if (Array.isArray(schema.oneOf) && schema.oneOf.length > 0 && schema.oneOf.every((item) => "const" in item)) {
1874
+ if (Array.isArray(schema.oneOf) && schema.oneOf.length > 0 && schema.oneOf.every(
1875
+ (item) => "const" in item && typeof item.const === "string"
1876
+ )) {
1867
1877
  return schema.oneOf.map((item) => String(item.const));
1868
1878
  }
1869
1879
  return null;
1870
1880
  }
1881
+ function validateEnumDefault(value, enumValues) {
1882
+ if (typeof value !== "string" || !enumValues.includes(value)) {
1883
+ throw new Error(
1884
+ `Default value ${JSON.stringify(value)} is not a valid enum value. Expected one of: ${enumValues.join(", ")}`
1885
+ );
1886
+ }
1887
+ }
1888
+ var DATETIME_UTC_MS_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}(Z|\+00:00)$/;
1889
+ function validateDatetimeDefault(value) {
1890
+ if (typeof value !== "string" || !DATETIME_UTC_MS_RE.test(value)) {
1891
+ throw new Error(
1892
+ `Default value ${JSON.stringify(value)} is not a valid ISO 8601 UTC datetime with millisecond precision. Expected format: YYYY-MM-DDTHH:mm:ss.sssZ or YYYY-MM-DDTHH:mm:ss.sss+00:00`
1893
+ );
1894
+ }
1895
+ }
1871
1896
  function toValueBoundary(value) {
1872
1897
  if (!Number.isInteger(value)) {
1873
1898
  throw new Error(
1874
1899
  `ValueBoundary only supports integers, got ${String(value)}. Custom object numeric fields are integer-only.`
1875
1900
  );
1876
1901
  }
1877
- return { value: { $case: "integerBoundary", value } };
1902
+ return { integerBoundary: value };
1878
1903
  }
1879
1904
  function toDefaultValue(value, dataType) {
1880
1905
  if (dataType === DataType.STRING_TYPE && typeof value === "string") {
1881
- return { value: { $case: "stringDefault", value } };
1906
+ return { stringDefault: value };
1907
+ }
1908
+ if (dataType === DataType.ENUM_TYPE && typeof value === "string") {
1909
+ return { stringDefault: value };
1910
+ }
1911
+ if (dataType === DataType.DATETIME_TYPE && typeof value === "string") {
1912
+ return { stringDefault: value };
1882
1913
  }
1883
1914
  if (dataType === DataType.INTEGER_TYPE && typeof value === "number") {
1884
- return { value: { $case: "integerDefault", value } };
1915
+ if (!Number.isInteger(value)) {
1916
+ throw new Error(
1917
+ `Integer default values must be whole numbers, got ${JSON.stringify(value)}.`
1918
+ );
1919
+ }
1920
+ return { integerDefault: value };
1885
1921
  }
1886
1922
  if (dataType === DataType.BOOLEAN_TYPE && typeof value === "boolean") {
1887
- return { value: { $case: "booleanDefault", value } };
1923
+ return { booleanDefault: value };
1888
1924
  }
1889
- return { value: void 0 };
1925
+ return {};
1890
1926
  }
1891
1927
 
1892
1928
  // src/custom-objects/build-definitions.ts
@@ -1916,7 +1952,7 @@ async function analyzeAndInjectManifest(options) {
1916
1952
  (diagnostic) => diagnostic.severity === "error"
1917
1953
  );
1918
1954
  if (errorDiagnostics.length > 0) {
1919
- const details = errorDiagnostics.map((diagnostic) => diagnostic.message).join("; ");
1955
+ const details = errorDiagnostics.map((diagnostic) => diagnostic.message).join("\n");
1920
1956
  throw new Error(details);
1921
1957
  }
1922
1958
  const coPackageJsonPath = path2.join(projectRoot, "custom-objects", "package.json");
@@ -2053,16 +2089,18 @@ function readPackageDependencies(packageJsonPath) {
2053
2089
  }
2054
2090
 
2055
2091
  // src/bin/create-upload-image.ts
2092
+ var logger = _createLogger({ name: "create-upload-image" });
2056
2093
  async function main() {
2094
+ const ctx = _createCliContext3();
2057
2095
  const targetPath = process.argv[2];
2058
2096
  if (!targetPath) {
2059
- console.error("Usage: create-upload-image <target-path>");
2097
+ ctx.ux.error("Usage: create-upload-image <target-path>");
2060
2098
  process.exit(1);
2061
2099
  }
2062
2100
  let state = null;
2063
2101
  const manifestPath = "stripe-app.yaml";
2064
2102
  if (fs3.existsSync(manifestPath)) {
2065
- state = await analyzeAndInjectManifest({ manifestPath });
2103
+ state = await analyzeAndInjectManifest({ manifestPath, context: ctx });
2066
2104
  }
2067
2105
  fs3.mkdirSync(targetPath, { recursive: true });
2068
2106
  const tarball = path3.join(os2.tmpdir(), `upload-image-${String(Date.now())}.tgz`);
@@ -2095,7 +2133,7 @@ async function main() {
2095
2133
  }
2096
2134
  }
2097
2135
  if (state) {
2098
- await writeCustomObjectArtifacts({ targetPath }, state);
2136
+ await writeCustomObjectArtifacts({ targetPath, context: ctx }, state);
2099
2137
  }
2100
2138
  const imageMetadata = JSON.stringify(
2101
2139
  { image: { version: "1.0", built: (/* @__PURE__ */ new Date()).toISOString() } },
@@ -2105,6 +2143,6 @@ async function main() {
2105
2143
  fs3.writeFileSync(path3.join(targetPath, ".image.json"), imageMetadata + "\n");
2106
2144
  }
2107
2145
  main().catch((err) => {
2108
- console.error(err);
2146
+ logger.error({ err }, "Unexpected error");
2109
2147
  process.exit(1);
2110
2148
  });
@@ -128,7 +128,7 @@ describe('MyDiscountCalculation', () => {
128
128
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
129
129
 
130
130
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
131
- interface MyDiscountCalculationConfig extends Record<string, unknown> {}
131
+ interface MyDiscountCalculationConfig {}
132
132
 
133
133
  export default class MyDiscountCalculation implements Billing.Bill
134
134
  .DiscountCalculation<MyDiscountCalculationConfig> {
@@ -170,7 +170,7 @@ describe('MyBalanceApp', () => {
170
170
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
171
171
 
172
172
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
173
- interface MyBalanceAppConfig extends Record<string, unknown> {}
173
+ interface MyBalanceAppConfig {}
174
174
 
175
175
  export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
176
176
  computeAppliedCustomerBalance(
@@ -211,7 +211,7 @@ describe('MyInvoiceCollectionSetting', () => {
211
211
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
212
212
 
213
213
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
214
- interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
214
+ interface MyInvoiceCollectionSettingConfig {}
215
215
 
216
216
  export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
217
217
  collectionOverride(
@@ -250,7 +250,7 @@ describe('MyProrations', () => {
250
250
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
251
251
 
252
252
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
253
- interface MyProrationsConfig extends Record<string, unknown> {}
253
+ interface MyProrationsConfig {}
254
254
 
255
255
  export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
256
256
  prorateItems(
@@ -291,7 +291,7 @@ describe('MyRecurringBillingItemHandling', () => {
291
291
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
292
292
 
293
293
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
294
- interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
294
+ interface MyRecurringBillingItemHandlingConfig {}
295
295
 
296
296
  export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
297
297
  beforeItemCreation(
@@ -541,7 +541,7 @@ describe('MyCustomAction', () => {
541
541
  content: `import type { Core, Context } from '@stripe/extensibility-sdk';
542
542
 
543
543
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
544
- interface MyCustomActionConfig extends Record<string, unknown> {}
544
+ interface MyCustomActionConfig {}
545
545
 
546
546
  export default class MyCustomAction implements Core.Workflows
547
547
  .CustomAction<MyCustomActionConfig> {
@@ -604,7 +604,7 @@ describe('MyCustomAction', () => {
604
604
  content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
605
605
 
606
606
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
607
- interface MyCustomActionConfig extends Record<string, unknown> {}
607
+ interface MyCustomActionConfig {}
608
608
 
609
609
  export default class MyCustomAction implements Extend.Workflows
610
610
  .CustomAction<MyCustomActionConfig> {
@@ -1661,6 +1661,7 @@ function _createBaseOutput(params, context) {
1661
1661
  // src/templates/extensions/core.workflows.custom_action.ts
1662
1662
  var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
1663
1663
  var customActionTemplate = {
1664
+ deprecated: true,
1664
1665
  methods: {
1665
1666
  execute: { implementation_types: ["script", "remote-function"] },
1666
1667
  get_form_state: { implementation_types: ["script", "remote-function"] }
@@ -105,7 +105,7 @@ describe('MyDiscountCalculation', () => {
105
105
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
106
106
 
107
107
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
108
- interface MyDiscountCalculationConfig extends Record<string, unknown> {}
108
+ interface MyDiscountCalculationConfig {}
109
109
 
110
110
  export default class MyDiscountCalculation implements Billing.Bill
111
111
  .DiscountCalculation<MyDiscountCalculationConfig> {
@@ -147,7 +147,7 @@ describe('MyBalanceApp', () => {
147
147
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
148
148
 
149
149
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
150
- interface MyBalanceAppConfig extends Record<string, unknown> {}
150
+ interface MyBalanceAppConfig {}
151
151
 
152
152
  export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
153
153
  computeAppliedCustomerBalance(
@@ -188,7 +188,7 @@ describe('MyInvoiceCollectionSetting', () => {
188
188
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
189
189
 
190
190
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
191
- interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
191
+ interface MyInvoiceCollectionSettingConfig {}
192
192
 
193
193
  export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
194
194
  collectionOverride(
@@ -227,7 +227,7 @@ describe('MyProrations', () => {
227
227
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
228
228
 
229
229
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
230
- interface MyProrationsConfig extends Record<string, unknown> {}
230
+ interface MyProrationsConfig {}
231
231
 
232
232
  export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
233
233
  prorateItems(
@@ -268,7 +268,7 @@ describe('MyRecurringBillingItemHandling', () => {
268
268
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
269
269
 
270
270
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
271
- interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
271
+ interface MyRecurringBillingItemHandlingConfig {}
272
272
 
273
273
  export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
274
274
  beforeItemCreation(
@@ -518,7 +518,7 @@ describe('MyCustomAction', () => {
518
518
  content: `import type { Core, Context } from '@stripe/extensibility-sdk';
519
519
 
520
520
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
521
- interface MyCustomActionConfig extends Record<string, unknown> {}
521
+ interface MyCustomActionConfig {}
522
522
 
523
523
  export default class MyCustomAction implements Core.Workflows
524
524
  .CustomAction<MyCustomActionConfig> {
@@ -581,7 +581,7 @@ describe('MyCustomAction', () => {
581
581
  content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
582
582
 
583
583
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
584
- interface MyCustomActionConfig extends Record<string, unknown> {}
584
+ interface MyCustomActionConfig {}
585
585
 
586
586
  export default class MyCustomAction implements Extend.Workflows
587
587
  .CustomAction<MyCustomActionConfig> {
@@ -1638,6 +1638,7 @@ function _createBaseOutput(params, context) {
1638
1638
  // src/templates/extensions/core.workflows.custom_action.ts
1639
1639
  var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
1640
1640
  var customActionTemplate = {
1641
+ deprecated: true,
1641
1642
  methods: {
1642
1643
  execute: { implementation_types: ["script", "remote-function"] },
1643
1644
  get_form_state: { implementation_types: ["script", "remote-function"] }
@@ -1187,7 +1187,7 @@ describe('MyDiscountCalculation', () => {
1187
1187
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1188
1188
 
1189
1189
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1190
- interface MyDiscountCalculationConfig extends Record<string, unknown> {}
1190
+ interface MyDiscountCalculationConfig {}
1191
1191
 
1192
1192
  export default class MyDiscountCalculation implements Billing.Bill
1193
1193
  .DiscountCalculation<MyDiscountCalculationConfig> {
@@ -1229,7 +1229,7 @@ describe('MyBalanceApp', () => {
1229
1229
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1230
1230
 
1231
1231
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1232
- interface MyBalanceAppConfig extends Record<string, unknown> {}
1232
+ interface MyBalanceAppConfig {}
1233
1233
 
1234
1234
  export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
1235
1235
  computeAppliedCustomerBalance(
@@ -1270,7 +1270,7 @@ describe('MyInvoiceCollectionSetting', () => {
1270
1270
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1271
1271
 
1272
1272
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1273
- interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
1273
+ interface MyInvoiceCollectionSettingConfig {}
1274
1274
 
1275
1275
  export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
1276
1276
  collectionOverride(
@@ -1309,7 +1309,7 @@ describe('MyProrations', () => {
1309
1309
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1310
1310
 
1311
1311
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1312
- interface MyProrationsConfig extends Record<string, unknown> {}
1312
+ interface MyProrationsConfig {}
1313
1313
 
1314
1314
  export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
1315
1315
  prorateItems(
@@ -1350,7 +1350,7 @@ describe('MyRecurringBillingItemHandling', () => {
1350
1350
  content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1351
1351
 
1352
1352
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1353
- interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
1353
+ interface MyRecurringBillingItemHandlingConfig {}
1354
1354
 
1355
1355
  export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
1356
1356
  beforeItemCreation(
@@ -1600,7 +1600,7 @@ describe('MyCustomAction', () => {
1600
1600
  content: `import type { Core, Context } from '@stripe/extensibility-sdk';
1601
1601
 
1602
1602
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1603
- interface MyCustomActionConfig extends Record<string, unknown> {}
1603
+ interface MyCustomActionConfig {}
1604
1604
 
1605
1605
  export default class MyCustomAction implements Core.Workflows
1606
1606
  .CustomAction<MyCustomActionConfig> {
@@ -1663,7 +1663,7 @@ describe('MyCustomAction', () => {
1663
1663
  content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
1664
1664
 
1665
1665
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1666
- interface MyCustomActionConfig extends Record<string, unknown> {}
1666
+ interface MyCustomActionConfig {}
1667
1667
 
1668
1668
  export default class MyCustomAction implements Extend.Workflows
1669
1669
  .CustomAction<MyCustomActionConfig> {
@@ -2799,6 +2799,7 @@ function _createBaseOutput(params, context) {
2799
2799
  // src/templates/extensions/core.workflows.custom_action.ts
2800
2800
  var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
2801
2801
  var customActionTemplate = {
2802
+ deprecated: true,
2802
2803
  methods: {
2803
2804
  execute: { implementation_types: ["script", "remote-function"] },
2804
2805
  get_form_state: { implementation_types: ["script", "remote-function"] }
@@ -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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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 extends Record<string, unknown> {}
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"] }
@@ -1 +1 @@
1
- {"version":3,"file":"build-definitions.d.ts","sourceRoot":"","sources":["../../src/custom-objects/build-definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,iBAAiB,MAAM,qDAAqD,CAAC;AACzF,OAAO,EAAE,KAAK,uBAAuB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGjF,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAEvF,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACnC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,iBAAiB,CAAC,8BAA8B,CAAC;IAC/D,aAAa,EAAE,uBAAuB,EAAE,CAAC;IACzC,QAAQ,EAAE,WAAW,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACnD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAsGxC;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,qBAAqB,EAC9B,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAmEf;AAED;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAef"}
1
+ {"version":3,"file":"build-definitions.d.ts","sourceRoot":"","sources":["../../src/custom-objects/build-definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,iBAAiB,MAAM,qDAAqD,CAAC;AACzF,OAAO,EAAE,KAAK,uBAAuB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGjF,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAEvF,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACnC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,iBAAiB,CAAC,8BAA8B,CAAC;IAC/D,aAAa,EAAE,uBAAuB,EAAE,CAAC;IACzC,QAAQ,EAAE,WAAW,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACnD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAqGxC;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,qBAAqB,EAC9B,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAmEf;AAED;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAef"}