@stripe/extensibility-dev-tools 0.23.5
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/LICENSE.md +19 -0
- package/dist/bin/build-custom-object-definitions.cjs +2111 -0
- package/dist/bin/build-custom-object-definitions.d.ts +11 -0
- package/dist/bin/build-custom-object-definitions.d.ts.map +1 -0
- package/dist/bin/build-custom-object-definitions.js +2088 -0
- package/dist/bin/create-upload-image.cjs +2136 -0
- package/dist/bin/create-upload-image.d.ts +17 -0
- package/dist/bin/create-upload-image.d.ts.map +1 -0
- package/dist/bin/create-upload-image.js +2113 -0
- package/dist/bin/dev-tools-rpc.cjs +3874 -0
- package/dist/bin/dev-tools-rpc.d.ts +3 -0
- package/dist/bin/dev-tools-rpc.d.ts.map +1 -0
- package/dist/bin/dev-tools-rpc.js +3864 -0
- package/dist/bin/gen-schemas.cjs +20739 -0
- package/dist/bin/gen-schemas.d.ts +8 -0
- package/dist/bin/gen-schemas.d.ts.map +1 -0
- package/dist/bin/gen-schemas.js +20715 -0
- package/dist/bin/gen-workspace.cjs +3847 -0
- package/dist/bin/gen-workspace.d.ts +8 -0
- package/dist/bin/gen-workspace.d.ts.map +1 -0
- package/dist/bin/gen-workspace.js +3841 -0
- package/dist/bin/manifest.cjs +686 -0
- package/dist/bin/manifest.d.ts +10 -0
- package/dist/bin/manifest.d.ts.map +1 -0
- package/dist/bin/manifest.js +663 -0
- package/dist/bin/rpc/dispatch.d.ts +10 -0
- package/dist/bin/rpc/dispatch.d.ts.map +1 -0
- package/dist/bin/rpc/handlers.d.ts +4 -0
- package/dist/bin/rpc/handlers.d.ts.map +1 -0
- package/dist/bin/rpc/types.d.ts +29 -0
- package/dist/bin/rpc/types.d.ts.map +1 -0
- package/dist/bin/template-info.cjs +1511 -0
- package/dist/bin/template-info.d.ts +9 -0
- package/dist/bin/template-info.d.ts.map +1 -0
- package/dist/bin/template-info.js +1488 -0
- package/dist/custom-objects/build-definitions.d.ts +98 -0
- package/dist/custom-objects/build-definitions.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/custom_objects/pub/api/app_api/object_definitions_app_service.pb.d.ts +191 -0
- package/dist/custom-objects/generated/proto/custom_objects/pub/api/app_api/object_definitions_app_service.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/custom_objects/pub/api/common/schema.pb.d.ts +131 -0
- package/dist/custom-objects/generated/proto/custom_objects/pub/api/common/schema.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/google/protobuf/descriptor.pb.d.ts +1482 -0
- package/dist/custom-objects/generated/proto/google/protobuf/descriptor.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/google/protobuf/timestamp.pb.d.ts +167 -0
- package/dist/custom-objects/generated/proto/google/protobuf/timestamp.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/proto/annotations.pb.d.ts +64 -0
- package/dist/custom-objects/generated/proto/proto/annotations.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/proto/extensions.pb.d.ts +657 -0
- package/dist/custom-objects/generated/proto/proto/extensions.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/metadata/pub/api/api_metadata.pb.d.ts +105 -0
- package/dist/custom-objects/generated/proto/vendor/metadata/pub/api/api_metadata.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/net/idempotency/idempotency_model.pb.d.ts +79 -0
- package/dist/custom-objects/generated/proto/vendor/net/idempotency/idempotency_model.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/api_group_enum.pb.d.ts +129 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/api_group_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/api_visibility.pb.d.ts +76 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/api_visibility.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/customize_dispatch_middleware_enum.pb.d.ts +78 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/customize_dispatch_middleware_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/docs_namespace_group_enum.pb.d.ts +146 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/docs_namespace_group_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/documented_enum.pb.d.ts +76 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/documented_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/event_scope_enum.pb.d.ts +92 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/event_scope_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/extension_interface.pb.d.ts +124 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/extension_interface.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/feature_enum.pb.d.ts +1070 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/feature_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/field_validation_rules.pb.d.ts +279 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/field_validation_rules.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/flavor_enum.pb.d.ts +78 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/flavor_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/http_error_status.pb.d.ts +102 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/http_error_status.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/method_kind_enum.pb.d.ts +86 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/method_kind_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/method_priority.pb.d.ts +80 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/method_priority.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/permission_check_enum.pb.d.ts +74 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/permission_check_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/redaction_enum.pb.d.ts +76 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/redaction_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/region_routers.pb.d.ts +103 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/region_routers.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/rollout_configs.pb.d.ts +153 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/rollout_configs.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/v2ext.pb.d.ts +1111 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/v2ext.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/vext/annotations.pb.d.ts +602 -0
- package/dist/custom-objects/generated/proto/vendor/vext/annotations.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/vext/extensions.pb.d.ts +144 -0
- package/dist/custom-objects/generated/proto/vendor/vext/extensions.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/vext/privacy_unified_annotations.pb.d.ts +851 -0
- package/dist/custom-objects/generated/proto/vendor/vext/privacy_unified_annotations.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/vext/xml_annotations.pb.d.ts +125 -0
- package/dist/custom-objects/generated/proto/vendor/vext/xml_annotations.pb.d.ts.map +1 -0
- package/dist/custom-objects/to-proto-json.d.ts +17 -0
- package/dist/custom-objects/to-proto-json.d.ts.map +1 -0
- package/dist/dependencies/index.cjs +601 -0
- package/dist/dependencies/index.d.ts +320 -0
- package/dist/dependencies/index.d.ts.map +1 -0
- package/dist/dependencies/index.js +560 -0
- package/dist/extensibility-dev-tools-alpha.d.ts +199 -0
- package/dist/extensibility-dev-tools-beta.d.ts +199 -0
- package/dist/extensibility-dev-tools-dependencies-alpha.d.ts +51 -0
- package/dist/extensibility-dev-tools-dependencies-beta.d.ts +51 -0
- package/dist/extensibility-dev-tools-dependencies-internal.d.ts +372 -0
- package/dist/extensibility-dev-tools-dependencies-public.d.ts +51 -0
- package/dist/extensibility-dev-tools-internal.d.ts +1722 -0
- package/dist/extensibility-dev-tools-jsonschema-tools-alpha.d.ts +57 -0
- package/dist/extensibility-dev-tools-jsonschema-tools-beta.d.ts +57 -0
- package/dist/extensibility-dev-tools-jsonschema-tools-internal.d.ts +123 -0
- package/dist/extensibility-dev-tools-jsonschema-tools-public.d.ts +57 -0
- package/dist/extensibility-dev-tools-manifest-alpha.d.ts +31 -0
- package/dist/extensibility-dev-tools-manifest-beta.d.ts +31 -0
- package/dist/extensibility-dev-tools-manifest-internal.d.ts +461 -0
- package/dist/extensibility-dev-tools-manifest-public.d.ts +31 -0
- package/dist/extensibility-dev-tools-public.d.ts +199 -0
- package/dist/extensibility-dev-tools-schemas-alpha.d.ts +9 -0
- package/dist/extensibility-dev-tools-schemas-beta.d.ts +9 -0
- package/dist/extensibility-dev-tools-schemas-internal.d.ts +41 -0
- package/dist/extensibility-dev-tools-schemas-public.d.ts +9 -0
- package/dist/extensibility-dev-tools-templates-alpha.d.ts +67 -0
- package/dist/extensibility-dev-tools-templates-beta.d.ts +67 -0
- package/dist/extensibility-dev-tools-templates-internal.d.ts +554 -0
- package/dist/extensibility-dev-tools-templates-public.d.ts +67 -0
- package/dist/extensibility-dev-tools-workspace-alpha.d.ts +51 -0
- package/dist/extensibility-dev-tools-workspace-beta.d.ts +51 -0
- package/dist/extensibility-dev-tools-workspace-internal.d.ts +410 -0
- package/dist/extensibility-dev-tools-workspace-public.d.ts +51 -0
- package/dist/index.cjs +3810 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3758 -0
- package/dist/jsonschema-tools.cjs +20451 -0
- package/dist/jsonschema-tools.d.ts +98 -0
- package/dist/jsonschema-tools.d.ts.map +1 -0
- package/dist/jsonschema-tools.js +20404 -0
- package/dist/manifest/index.cjs +610 -0
- package/dist/manifest/index.d.ts +8 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest/index.js +571 -0
- package/dist/manifest/manifest-v1.d.ts +102 -0
- package/dist/manifest/manifest-v1.d.ts.map +1 -0
- package/dist/manifest/manifest-v2.d.ts +253 -0
- package/dist/manifest/manifest-v2.d.ts.map +1 -0
- package/dist/manifest/stripe-app-manifest.d.ts +114 -0
- package/dist/manifest/stripe-app-manifest.d.ts.map +1 -0
- package/dist/schemas/index.cjs +20692 -0
- package/dist/schemas/index.d.ts +37 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +20656 -0
- package/dist/templates/diff-viewer/diff-generator.d.ts +22 -0
- package/dist/templates/diff-viewer/diff-generator.d.ts.map +1 -0
- package/dist/templates/diff-viewer/diff-prompt.d.ts +13 -0
- package/dist/templates/diff-viewer/diff-prompt.d.ts.map +1 -0
- package/dist/templates/diff-viewer/index.d.ts +7 -0
- package/dist/templates/diff-viewer/index.d.ts.map +1 -0
- package/dist/templates/diff-viewer/terminal-renderer.d.ts +29 -0
- package/dist/templates/diff-viewer/terminal-renderer.d.ts.map +1 -0
- package/dist/templates/diff-viewer/types.d.ts +58 -0
- package/dist/templates/diff-viewer/types.d.ts.map +1 -0
- package/dist/templates/extensions/base.d.ts +23 -0
- package/dist/templates/extensions/base.d.ts.map +1 -0
- package/dist/templates/extensions/billing.bill.discount_calculation.d.ts +6 -0
- package/dist/templates/extensions/billing.bill.discount_calculation.d.ts.map +1 -0
- package/dist/templates/extensions/billing.customer_balance_application.d.ts +6 -0
- package/dist/templates/extensions/billing.customer_balance_application.d.ts.map +1 -0
- package/dist/templates/extensions/billing.invoice_collection_setting.d.ts +6 -0
- package/dist/templates/extensions/billing.invoice_collection_setting.d.ts.map +1 -0
- package/dist/templates/extensions/billing.prorations.d.ts +6 -0
- package/dist/templates/extensions/billing.prorations.d.ts.map +1 -0
- package/dist/templates/extensions/billing.recurring_billing_item_handling.d.ts +6 -0
- package/dist/templates/extensions/billing.recurring_billing_item_handling.d.ts.map +1 -0
- package/dist/templates/extensions/core.workflows.custom_action.d.ts +6 -0
- package/dist/templates/extensions/core.workflows.custom_action.d.ts.map +1 -0
- package/dist/templates/extensions/extend.objects.custom_objects.d.ts +6 -0
- package/dist/templates/extensions/extend.objects.custom_objects.d.ts.map +1 -0
- package/dist/templates/extensions/extend.workflows.custom_action.d.ts +6 -0
- package/dist/templates/extensions/extend.workflows.custom_action.d.ts.map +1 -0
- package/dist/templates/extensions/index.d.ts +13 -0
- package/dist/templates/extensions/index.d.ts.map +1 -0
- package/dist/templates/extensions/registry.d.ts +10 -0
- package/dist/templates/extensions/registry.d.ts.map +1 -0
- package/dist/templates/extensions/types.d.ts +104 -0
- package/dist/templates/extensions/types.d.ts.map +1 -0
- package/dist/templates/file-writer.d.ts +140 -0
- package/dist/templates/file-writer.d.ts.map +1 -0
- package/dist/templates/fs/_impl.d.ts +29 -0
- package/dist/templates/fs/_impl.d.ts.map +1 -0
- package/dist/templates/fs/filesystem.d.ts +8 -0
- package/dist/templates/fs/filesystem.d.ts.map +1 -0
- package/dist/templates/fs/in-memory.d.ts +9 -0
- package/dist/templates/fs/in-memory.d.ts.map +1 -0
- package/dist/templates/fs/index.d.ts +25 -0
- package/dist/templates/fs/index.d.ts.map +1 -0
- package/dist/templates/fs-utils.d.ts +17 -0
- package/dist/templates/fs-utils.d.ts.map +1 -0
- package/dist/templates/index.cjs +2248 -0
- package/dist/templates/index.d.ts +32 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +2203 -0
- package/dist/templates/root/index.d.ts +60 -0
- package/dist/templates/root/index.d.ts.map +1 -0
- package/dist/templates/simple-templates.d.ts +8 -0
- package/dist/templates/simple-templates.d.ts.map +1 -0
- package/dist/templates/template-manager.d.ts +8 -0
- package/dist/templates/template-manager.d.ts.map +1 -0
- package/dist/templates/types.d.ts +9 -0
- package/dist/templates/types.d.ts.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/workspace/index.cjs +3756 -0
- package/dist/workspace/index.d.ts +336 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/dist/workspace/index.js +3731 -0
- package/package.json +137 -0
- package/templates/extensions/billing.bill.discount_calculation/index.test.ts +15 -0
- package/templates/extensions/billing.bill.discount_calculation/index.ts +20 -0
- package/templates/extensions/billing.customer_balance_application/index.test.ts +15 -0
- package/templates/extensions/billing.customer_balance_application/index.ts +18 -0
- package/templates/extensions/billing.invoice_collection_setting/index.test.ts +15 -0
- package/templates/extensions/billing.invoice_collection_setting/index.ts +16 -0
- package/templates/extensions/billing.prorations/index.test.ts +15 -0
- package/templates/extensions/billing.prorations/index.ts +18 -0
- package/templates/extensions/billing.recurring_billing_item_handling/index.test.ts +15 -0
- package/templates/extensions/billing.recurring_billing_item_handling/index.ts +42 -0
- package/templates/extensions/common/.prettierignore +3 -0
- package/templates/extensions/common/eslint.config.mts.mustache +95 -0
- package/templates/extensions/common/package.json.mustache +26 -0
- package/templates/extensions/common/tsconfig.build.json.mustache +15 -0
- package/templates/extensions/common/tsconfig.json.mustache +16 -0
- package/templates/extensions/core.workflows.custom_action/custom_input.schema.json +6 -0
- package/templates/extensions/core.workflows.custom_action/index.test.ts +15 -0
- package/templates/extensions/core.workflows.custom_action/index.ts +31 -0
- package/templates/extensions/extend.workflows.custom_action/custom_input.schema.json +6 -0
- package/templates/extensions/extend.workflows.custom_action/index.test.ts +15 -0
- package/templates/extensions/extend.workflows.custom_action/index.ts +31 -0
- package/templates/root/.husky/pre-commit +1 -0
- package/templates/root/.prettierignore +5 -0
- package/templates/root/.prettierrc +7 -0
- package/templates/root/_gitignore +28 -0
- package/templates/root/custom-objects/package.json +20 -0
- package/templates/root/custom-objects/tsconfig.json +9 -0
- package/templates/root/eslint.config.mts +95 -0
- package/templates/root/package.json.mustache +32 -0
- package/templates/root/pnpm-workspace.yaml +7 -0
- package/templates/root/stripe-app.yaml.mustache +6 -0
- package/templates/root/tools/test.mts +38 -0
- package/templates/root/tsconfig.base.json +23 -0
- package/templates/root/tsconfig.json +15 -0
- package/templates/root/ui/package.json +17 -0
- package/templates/root/vitest.config.mts +47 -0
package/package.json
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stripe/extensibility-dev-tools",
|
|
3
|
+
"version": "0.23.5",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/stripe/extensibility-sdk.git"
|
|
8
|
+
},
|
|
9
|
+
"author": "Stripe",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"bin": {
|
|
13
|
+
"build-custom-object-definitions": "./dist/bin/build-custom-object-definitions.cjs",
|
|
14
|
+
"create-upload-image": "./dist/bin/create-upload-image.cjs",
|
|
15
|
+
"dev-tools-rpc": "./dist/bin/dev-tools-rpc.js",
|
|
16
|
+
"gen-schemas": "./dist/bin/gen-schemas.js",
|
|
17
|
+
"gen-workspace": "./dist/bin/gen-workspace.js",
|
|
18
|
+
"manifest": "./dist/bin/manifest.js",
|
|
19
|
+
"template-info": "./dist/bin/template-info.js"
|
|
20
|
+
},
|
|
21
|
+
"types": "./dist/extensibility-dev-tools-public.d.ts",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"templates"
|
|
25
|
+
],
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/extensibility-dev-tools-public.d.ts",
|
|
29
|
+
"import": "./dist/index.js",
|
|
30
|
+
"require": "./dist/index.cjs"
|
|
31
|
+
},
|
|
32
|
+
"./templates": {
|
|
33
|
+
"types": "./dist/templates/index.d.ts",
|
|
34
|
+
"import": "./dist/templates/index.js",
|
|
35
|
+
"require": "./dist/templates/index.cjs"
|
|
36
|
+
},
|
|
37
|
+
"./dependencies": {
|
|
38
|
+
"types": "./dist/dependencies/index.d.ts",
|
|
39
|
+
"import": "./dist/dependencies/index.js",
|
|
40
|
+
"require": "./dist/dependencies/index.cjs"
|
|
41
|
+
},
|
|
42
|
+
"./manifest": {
|
|
43
|
+
"types": "./dist/manifest/index.d.ts",
|
|
44
|
+
"import": "./dist/manifest/index.js",
|
|
45
|
+
"require": "./dist/manifest/index.cjs"
|
|
46
|
+
},
|
|
47
|
+
"./workspace": {
|
|
48
|
+
"types": "./dist/workspace/index.d.ts",
|
|
49
|
+
"import": "./dist/workspace/index.js",
|
|
50
|
+
"require": "./dist/workspace/index.cjs"
|
|
51
|
+
},
|
|
52
|
+
"./jsonschema-tools": {
|
|
53
|
+
"types": "./dist/jsonschema-tools.d.ts",
|
|
54
|
+
"import": "./dist/jsonschema-tools.js",
|
|
55
|
+
"require": "./dist/jsonschema-tools.cjs"
|
|
56
|
+
},
|
|
57
|
+
"./schemas": {
|
|
58
|
+
"types": "./dist/schemas/index.d.ts",
|
|
59
|
+
"import": "./dist/schemas/index.js",
|
|
60
|
+
"require": "./dist/schemas/index.cjs"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@formspec/build": "0.1.0-alpha.59",
|
|
65
|
+
"@formspec/core": "0.1.0-alpha.59",
|
|
66
|
+
"@npmcli/package-json": "^7.0.4",
|
|
67
|
+
"diff": "^8.0.3",
|
|
68
|
+
"js-toml": "^1.0.2",
|
|
69
|
+
"mustache": "^4.2.0",
|
|
70
|
+
"semver": "^7.7.4",
|
|
71
|
+
"string-width": "^7.2.0",
|
|
72
|
+
"yaml": "^2.8.3",
|
|
73
|
+
"yargs": "^17.7.2",
|
|
74
|
+
"zod": "^4.3.6",
|
|
75
|
+
"@stripe/extensibility-custom-objects-tools": "0.40.0",
|
|
76
|
+
"@stripe/extensibility-tool-utils": "0.6.4"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@protobuf-ts/protoc": "^2.8.2",
|
|
80
|
+
"@types/mustache": "^4.2.0",
|
|
81
|
+
"@types/npmcli__package-json": "^4.0.4",
|
|
82
|
+
"@types/semver": "^7.7.1",
|
|
83
|
+
"@types/yargs": "^17.0.35",
|
|
84
|
+
"ts-proto": "^2.11.2",
|
|
85
|
+
"tsd": "^0.33.0",
|
|
86
|
+
"@stripe/extensibility-jsonschema-tools": "0.6.5"
|
|
87
|
+
},
|
|
88
|
+
"peerDependencies": {
|
|
89
|
+
"typescript": "^5.8.0"
|
|
90
|
+
},
|
|
91
|
+
"publishConfig": {
|
|
92
|
+
"access": "public"
|
|
93
|
+
},
|
|
94
|
+
"typesVersions": {
|
|
95
|
+
"*": {
|
|
96
|
+
"templates": [
|
|
97
|
+
"./dist/templates/index.d.ts"
|
|
98
|
+
],
|
|
99
|
+
"dependencies": [
|
|
100
|
+
"./dist/dependencies/index.d.ts"
|
|
101
|
+
],
|
|
102
|
+
"manifest": [
|
|
103
|
+
"./dist/manifest/index.d.ts"
|
|
104
|
+
],
|
|
105
|
+
"workspace": [
|
|
106
|
+
"./dist/workspace/index.d.ts"
|
|
107
|
+
],
|
|
108
|
+
"jsonschema-tools": [
|
|
109
|
+
"./dist/jsonschema-tools.d.ts"
|
|
110
|
+
],
|
|
111
|
+
"schemas": [
|
|
112
|
+
"./dist/schemas/index.d.ts"
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"scripts": {
|
|
117
|
+
"build": "pnpm compile && pnpm generate:api-rollups && pnpm generate:api-report",
|
|
118
|
+
"check:api-report": "pnpm check:api-surface-report",
|
|
119
|
+
"check:api-surface-report": "tsx ../../scripts/src/api-report-generation/entrypoints/run-package-api-surface-report.ts",
|
|
120
|
+
"clean": "rimraf dist temp",
|
|
121
|
+
"compile": "tsc -p tsconfig.build.json --emitDeclarationOnly && tsup",
|
|
122
|
+
"format": "prettier --write .",
|
|
123
|
+
"generate:api-report": "pnpm generate:api-surface-report",
|
|
124
|
+
"generate:api-rollup-root": "api-extractor run --local --config api-extractor-rollup.json",
|
|
125
|
+
"generate:api-rollup-subpaths": "tsx ../../scripts/src/api-report-generation/entrypoints/run-package-api-subpath-rollups.ts --local",
|
|
126
|
+
"generate:api-rollups": "pnpm generate:api-rollup-root && pnpm generate:api-rollup-subpaths",
|
|
127
|
+
"generate:api-surface-report": "tsx ../../scripts/src/api-report-generation/entrypoints/run-package-api-surface-report.ts --local",
|
|
128
|
+
"lint": "pnpm lint:eslint && pnpm lint:typecheck && pnpm lint:format",
|
|
129
|
+
"lint:eslint": "eslint .",
|
|
130
|
+
"lint:format": "prettier --check .",
|
|
131
|
+
"lint:typecheck": "tsc --noEmit --incremental --tsBuildInfoFile ./dist/tsconfig.check.tsbuildinfo",
|
|
132
|
+
"normalize:declarations": "declaration-file-normalizer dist/index.d.ts",
|
|
133
|
+
"test": "vitest run && pnpm test:types",
|
|
134
|
+
"test:types": "tsc -p tsconfig.build.json --emitDeclarationOnly && tsd --typings dist/index.d.ts --files 'src/**/*.test-d.ts'",
|
|
135
|
+
"test:watch": "vitest"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { beforeEach, describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import MyDiscountCalculation from './index.js';
|
|
4
|
+
|
|
5
|
+
describe('MyDiscountCalculation', () => {
|
|
6
|
+
let instance: MyDiscountCalculation;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
instance = new MyDiscountCalculation();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should be constructable', () => {
|
|
13
|
+
expect(instance).toBeInstanceOf(MyDiscountCalculation);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Billing } from '@stripe/extensibility-sdk/extensions';
|
|
2
|
+
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
5
|
+
interface MyDiscountCalculationConfig extends Record<string, unknown> {}
|
|
6
|
+
|
|
7
|
+
export default class MyDiscountCalculation implements Billing.Bill
|
|
8
|
+
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
9
|
+
computeDiscounts(
|
|
10
|
+
request: Billing.Bill.DiscountCalculation.DiscountableItem,
|
|
11
|
+
_config: MyDiscountCalculationConfig,
|
|
12
|
+
_context: Context
|
|
13
|
+
) {
|
|
14
|
+
// TODO: implement your discount logic here
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
discount: { amount: request.grossAmount },
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { beforeEach, describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import MyCustomerBalanceApplication from './index.js';
|
|
4
|
+
|
|
5
|
+
describe('MyCustomerBalanceApplication', () => {
|
|
6
|
+
let instance: MyCustomerBalanceApplication;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
instance = new MyCustomerBalanceApplication();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should be constructable', () => {
|
|
13
|
+
expect(instance).toBeInstanceOf(MyCustomerBalanceApplication);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
4
|
+
interface MyCustomerBalanceApplicationConfig extends Record<string, unknown> {}
|
|
5
|
+
|
|
6
|
+
export default class MyCustomerBalanceApplication implements Billing.CustomerBalanceApplication<MyCustomerBalanceApplicationConfig> {
|
|
7
|
+
computeAppliedCustomerBalance(
|
|
8
|
+
request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
|
|
9
|
+
_config: MyCustomerBalanceApplicationConfig,
|
|
10
|
+
_context: Context
|
|
11
|
+
) {
|
|
12
|
+
// TODO: implement your customer balance logic here
|
|
13
|
+
|
|
14
|
+
return {
|
|
15
|
+
appliedCustomerBalance: request.customerBalance,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { beforeEach, describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import MyInvoiceCollectionSetting from './index.js';
|
|
4
|
+
|
|
5
|
+
describe('MyInvoiceCollectionSetting', () => {
|
|
6
|
+
let instance: MyInvoiceCollectionSetting;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
instance = new MyInvoiceCollectionSetting();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should be constructable', () => {
|
|
13
|
+
expect(instance).toBeInstanceOf(MyInvoiceCollectionSetting);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
4
|
+
interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
|
|
5
|
+
|
|
6
|
+
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
7
|
+
collectionOverride(
|
|
8
|
+
_request: Billing.InvoiceCollectionSetting.InvoiceCollectionRequest,
|
|
9
|
+
_config: MyInvoiceCollectionSettingConfig,
|
|
10
|
+
_context: Context
|
|
11
|
+
) {
|
|
12
|
+
// TODO: implement your collection setting logic here
|
|
13
|
+
|
|
14
|
+
return {};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { beforeEach, describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import MyProrations from './index.js';
|
|
4
|
+
|
|
5
|
+
describe('MyProrations', () => {
|
|
6
|
+
let instance: MyProrations;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
instance = new MyProrations();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should be constructable', () => {
|
|
13
|
+
expect(instance).toBeInstanceOf(MyProrations);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
4
|
+
interface MyProrationsConfig extends Record<string, unknown> {}
|
|
5
|
+
|
|
6
|
+
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
7
|
+
prorateItems(
|
|
8
|
+
_request: Billing.Prorations.ProrateItemsInput,
|
|
9
|
+
_config: MyProrationsConfig,
|
|
10
|
+
_context: Context
|
|
11
|
+
) {
|
|
12
|
+
// TODO: implement your proration logic here
|
|
13
|
+
|
|
14
|
+
return {
|
|
15
|
+
items: [],
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { beforeEach, describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import MyRecurringBillingItemHandling from './index.js';
|
|
4
|
+
|
|
5
|
+
describe('MyRecurringBillingItemHandling', () => {
|
|
6
|
+
let instance: MyRecurringBillingItemHandling;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
instance = new MyRecurringBillingItemHandling();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should be constructable', () => {
|
|
13
|
+
expect(instance).toBeInstanceOf(MyRecurringBillingItemHandling);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
4
|
+
interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
|
|
5
|
+
|
|
6
|
+
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
7
|
+
beforeItemCreation(
|
|
8
|
+
_request: Billing.RecurringBillingItemHandling.BeforeItemCreationInput,
|
|
9
|
+
_config: MyRecurringBillingItemHandlingConfig,
|
|
10
|
+
_context: Context
|
|
11
|
+
) {
|
|
12
|
+
// TODO: implement your before-item-creation logic here
|
|
13
|
+
|
|
14
|
+
return {
|
|
15
|
+
items: [],
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
filterItems(
|
|
20
|
+
_request: Billing.RecurringBillingItemHandling.FilterItemsInput,
|
|
21
|
+
_config: MyRecurringBillingItemHandlingConfig,
|
|
22
|
+
_context: Context
|
|
23
|
+
) {
|
|
24
|
+
// TODO: implement your filter-items logic here
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
items: [],
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
groupItems(
|
|
32
|
+
_request: Billing.RecurringBillingItemHandling.GroupItemsInput,
|
|
33
|
+
_config: MyRecurringBillingItemHandlingConfig,
|
|
34
|
+
_context: Context
|
|
35
|
+
) {
|
|
36
|
+
// TODO: implement your group-items logic here
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
groups: [],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import { defineConfig } from 'eslint/config';
|
|
3
|
+
import tseslint from 'typescript-eslint';
|
|
4
|
+
import eslintConfigPrettier from 'eslint-config-prettier/flat';
|
|
5
|
+
|
|
6
|
+
import globals from 'globals';
|
|
7
|
+
|
|
8
|
+
import stripeAppsConfig from '@stripe/extensibility-eslint-plugin';
|
|
9
|
+
import extensionTypeConfig from '@stripe/extensibility-eslint-plugin/{{extensionInterfaceId}}';
|
|
10
|
+
|
|
11
|
+
export default defineConfig([
|
|
12
|
+
eslint.configs.recommended,
|
|
13
|
+
...tseslint.configs.recommended,
|
|
14
|
+
...stripeAppsConfig,
|
|
15
|
+
...extensionTypeConfig,
|
|
16
|
+
|
|
17
|
+
// Global ignores
|
|
18
|
+
{
|
|
19
|
+
ignores: ['dist', 'generated', 'node_modules'],
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
// TypeScript source files (with type-checking)
|
|
23
|
+
{
|
|
24
|
+
name: 'sources',
|
|
25
|
+
files: ['src/**/*.ts'],
|
|
26
|
+
ignores: ['**/*.test.ts', '**/__tests__/**'],
|
|
27
|
+
languageOptions: {
|
|
28
|
+
globals: {
|
|
29
|
+
...globals.node,
|
|
30
|
+
},
|
|
31
|
+
parserOptions: {
|
|
32
|
+
projectService: true,
|
|
33
|
+
tsconfigRootDir: import.meta.dirname,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
// Test files (type-checking, relaxed rules)
|
|
39
|
+
{
|
|
40
|
+
name: 'tests',
|
|
41
|
+
files: ['src/**/*.test.ts', 'src/**/__tests__/**/*.ts'],
|
|
42
|
+
languageOptions: {
|
|
43
|
+
globals: {
|
|
44
|
+
...globals.node,
|
|
45
|
+
},
|
|
46
|
+
parserOptions: {
|
|
47
|
+
projectService: true,
|
|
48
|
+
tsconfigRootDir: import.meta.dirname,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
rules: {
|
|
52
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
53
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
54
|
+
'no-console': 'off',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
// Config files
|
|
59
|
+
{
|
|
60
|
+
name: 'ts-configs',
|
|
61
|
+
files: ['*.config.m?ts', 'eslint.config.mts'],
|
|
62
|
+
languageOptions: {
|
|
63
|
+
globals: {
|
|
64
|
+
...globals.node,
|
|
65
|
+
},
|
|
66
|
+
parserOptions: {
|
|
67
|
+
projectService: false,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
rules: {
|
|
71
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
// JavaScript/MJS files (scripts, configs)
|
|
76
|
+
{
|
|
77
|
+
name: 'js-configs',
|
|
78
|
+
files: ['**/*.js', '**/*.mjs'],
|
|
79
|
+
languageOptions: {
|
|
80
|
+
globals: {
|
|
81
|
+
...globals.node,
|
|
82
|
+
},
|
|
83
|
+
parserOptions: {
|
|
84
|
+
projectService: false,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
rules: {
|
|
88
|
+
'@typescript-eslint/no-require-imports': 'off',
|
|
89
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
90
|
+
'no-unused-vars': 'off',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
eslintConfigPrettier,
|
|
95
|
+
]);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{id}}",
|
|
3
|
+
"version": "{{version}}",
|
|
4
|
+
"description": "{{name}}",
|
|
5
|
+
"private": true,
|
|
6
|
+
"license": "~~proprietary~~",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc -p tsconfig.build.json && pnpm build:schemas",
|
|
10
|
+
"build:schemas": "gen-schemas --root ../.. --extension-id \"$npm_package_name\" --out-dir generated --schema-name config",
|
|
11
|
+
"lint": "pnpm lint:types && pnpm lint:eslint && pnpm lint:format",
|
|
12
|
+
"lint:types": "tsc -p tsconfig.build.json --noEmit && tsc -p tsconfig.json --noEmit",
|
|
13
|
+
"lint:eslint": "eslint .",
|
|
14
|
+
"lint:format": "prettier --check .",
|
|
15
|
+
"fix:lint": "eslint --fix .",
|
|
16
|
+
"fix:format": "prettier --write .",
|
|
17
|
+
"test": "vitest --root ../.. run --project \"$npm_package_name\"",
|
|
18
|
+
"test:watch": "pnpm test --watch",
|
|
19
|
+
"dev": "concurrently -n build,lint,test -c blue,yellow,green 'tsc -p tsconfig.json -w --noEmit' 'chokidar \"src/**/*.{ts,json}\" -c \"eslint .\"' 'pnpm test --watch --no-clear-screen'",
|
|
20
|
+
"stripe:regen": "gen-workspace --root ../.. --package-dir . --template-id {{extensionInterfaceId}}"
|
|
21
|
+
},
|
|
22
|
+
"lint-staged": {
|
|
23
|
+
"*.{ts,mts,mjs,js}": ["eslint --fix", "prettier --write"],
|
|
24
|
+
"*.{json,md,yaml}": "prettier --write"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"lib": null,
|
|
5
|
+
"noLib": true,
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src"
|
|
8
|
+
},
|
|
9
|
+
"include": [
|
|
10
|
+
"src/**/*.ts",
|
|
11
|
+
"node_modules/@stripe/extensibility-sdk/tslibs/5.9.3/lib.es2022.{{executionProfile}}.d.ts",
|
|
12
|
+
"node_modules/@stripe/extensibility-sdk/tslibs/lib.{{executionProfile}}.globals.d.ts"
|
|
13
|
+
],
|
|
14
|
+
"exclude": ["src/**/*.test.ts", "src/**/__tests__"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": ".",
|
|
5
|
+
"plugins": [
|
|
6
|
+
{
|
|
7
|
+
"name": "@stripe/extensibility-language-server/plugin"
|
|
8
|
+
}
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"include": [
|
|
12
|
+
"src/**/*.ts",
|
|
13
|
+
"node_modules/@stripe/extensibility-sdk/tslibs/lib.{{executionProfile}}.globals.d.ts"
|
|
14
|
+
],
|
|
15
|
+
"exclude": ["dist"]
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { beforeEach, describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import MyCustomAction from './index.js';
|
|
4
|
+
|
|
5
|
+
describe('MyCustomAction', () => {
|
|
6
|
+
let instance: MyCustomAction;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
instance = new MyCustomAction();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should be constructable', () => {
|
|
13
|
+
expect(instance).toBeInstanceOf(MyCustomAction);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Core } from '@stripe/extensibility-sdk/extensions';
|
|
2
|
+
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
5
|
+
interface MyCustomActionConfig extends Record<string, unknown> {}
|
|
6
|
+
|
|
7
|
+
export default class MyCustomAction implements Core.Workflows
|
|
8
|
+
.CustomAction<MyCustomActionConfig> {
|
|
9
|
+
execute(
|
|
10
|
+
_request: Core.Workflows.CustomAction.ExecuteCustomActionRequest,
|
|
11
|
+
_config: MyCustomActionConfig,
|
|
12
|
+
_context: Context
|
|
13
|
+
) {
|
|
14
|
+
// TODO: implement your action logic here
|
|
15
|
+
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
getFormState(
|
|
20
|
+
_request: Core.Workflows.CustomAction.GetFormStateRequest,
|
|
21
|
+
_config: MyCustomActionConfig,
|
|
22
|
+
_context: Context
|
|
23
|
+
) {
|
|
24
|
+
// TODO: implement your logic here
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
values: {},
|
|
28
|
+
config: {},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { beforeEach, describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import MyCustomAction from './index.js';
|
|
4
|
+
|
|
5
|
+
describe('MyCustomAction', () => {
|
|
6
|
+
let instance: MyCustomAction;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
instance = new MyCustomAction();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should be constructable', () => {
|
|
13
|
+
expect(instance).toBeInstanceOf(MyCustomAction);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Extend } from '@stripe/extensibility-sdk/extensions';
|
|
2
|
+
import type { Context } from '@stripe/extensibility-sdk/extensions';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
5
|
+
interface MyCustomActionConfig extends Record<string, unknown> {}
|
|
6
|
+
|
|
7
|
+
export default class MyCustomAction implements Extend.Workflows
|
|
8
|
+
.CustomAction<MyCustomActionConfig> {
|
|
9
|
+
execute(
|
|
10
|
+
_request: Extend.Workflows.CustomAction.ExecuteCustomActionRequest,
|
|
11
|
+
_config: MyCustomActionConfig,
|
|
12
|
+
_context: Context
|
|
13
|
+
) {
|
|
14
|
+
// TODO: implement your action logic here
|
|
15
|
+
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
getFormState(
|
|
20
|
+
_request: Extend.Workflows.CustomAction.GetFormStateRequest,
|
|
21
|
+
_config: MyCustomActionConfig,
|
|
22
|
+
_context: Context
|
|
23
|
+
) {
|
|
24
|
+
// TODO: implement your logic here
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
values: {},
|
|
28
|
+
config: {},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pnpm lint-staged
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
*~
|
|
4
|
+
|
|
5
|
+
# dependencies
|
|
6
|
+
node_modules
|
|
7
|
+
dist
|
|
8
|
+
|
|
9
|
+
# testing
|
|
10
|
+
/coverage
|
|
11
|
+
|
|
12
|
+
# production
|
|
13
|
+
/.build
|
|
14
|
+
|
|
15
|
+
# misc
|
|
16
|
+
.DS_Store
|
|
17
|
+
.env.local
|
|
18
|
+
.env.development.local
|
|
19
|
+
.env.test.local
|
|
20
|
+
.env.production.local
|
|
21
|
+
|
|
22
|
+
npm-debug.log*
|
|
23
|
+
yarn-debug.log*
|
|
24
|
+
yarn-error.log*
|
|
25
|
+
install-deps.log
|
|
26
|
+
|
|
27
|
+
# generated schemas
|
|
28
|
+
generated
|