@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.
Files changed (253) hide show
  1. package/LICENSE.md +19 -0
  2. package/dist/bin/build-custom-object-definitions.cjs +2111 -0
  3. package/dist/bin/build-custom-object-definitions.d.ts +11 -0
  4. package/dist/bin/build-custom-object-definitions.d.ts.map +1 -0
  5. package/dist/bin/build-custom-object-definitions.js +2088 -0
  6. package/dist/bin/create-upload-image.cjs +2136 -0
  7. package/dist/bin/create-upload-image.d.ts +17 -0
  8. package/dist/bin/create-upload-image.d.ts.map +1 -0
  9. package/dist/bin/create-upload-image.js +2113 -0
  10. package/dist/bin/dev-tools-rpc.cjs +3874 -0
  11. package/dist/bin/dev-tools-rpc.d.ts +3 -0
  12. package/dist/bin/dev-tools-rpc.d.ts.map +1 -0
  13. package/dist/bin/dev-tools-rpc.js +3864 -0
  14. package/dist/bin/gen-schemas.cjs +20739 -0
  15. package/dist/bin/gen-schemas.d.ts +8 -0
  16. package/dist/bin/gen-schemas.d.ts.map +1 -0
  17. package/dist/bin/gen-schemas.js +20715 -0
  18. package/dist/bin/gen-workspace.cjs +3847 -0
  19. package/dist/bin/gen-workspace.d.ts +8 -0
  20. package/dist/bin/gen-workspace.d.ts.map +1 -0
  21. package/dist/bin/gen-workspace.js +3841 -0
  22. package/dist/bin/manifest.cjs +686 -0
  23. package/dist/bin/manifest.d.ts +10 -0
  24. package/dist/bin/manifest.d.ts.map +1 -0
  25. package/dist/bin/manifest.js +663 -0
  26. package/dist/bin/rpc/dispatch.d.ts +10 -0
  27. package/dist/bin/rpc/dispatch.d.ts.map +1 -0
  28. package/dist/bin/rpc/handlers.d.ts +4 -0
  29. package/dist/bin/rpc/handlers.d.ts.map +1 -0
  30. package/dist/bin/rpc/types.d.ts +29 -0
  31. package/dist/bin/rpc/types.d.ts.map +1 -0
  32. package/dist/bin/template-info.cjs +1511 -0
  33. package/dist/bin/template-info.d.ts +9 -0
  34. package/dist/bin/template-info.d.ts.map +1 -0
  35. package/dist/bin/template-info.js +1488 -0
  36. package/dist/custom-objects/build-definitions.d.ts +98 -0
  37. package/dist/custom-objects/build-definitions.d.ts.map +1 -0
  38. package/dist/custom-objects/generated/proto/custom_objects/pub/api/app_api/object_definitions_app_service.pb.d.ts +191 -0
  39. package/dist/custom-objects/generated/proto/custom_objects/pub/api/app_api/object_definitions_app_service.pb.d.ts.map +1 -0
  40. package/dist/custom-objects/generated/proto/custom_objects/pub/api/common/schema.pb.d.ts +131 -0
  41. package/dist/custom-objects/generated/proto/custom_objects/pub/api/common/schema.pb.d.ts.map +1 -0
  42. package/dist/custom-objects/generated/proto/google/protobuf/descriptor.pb.d.ts +1482 -0
  43. package/dist/custom-objects/generated/proto/google/protobuf/descriptor.pb.d.ts.map +1 -0
  44. package/dist/custom-objects/generated/proto/google/protobuf/timestamp.pb.d.ts +167 -0
  45. package/dist/custom-objects/generated/proto/google/protobuf/timestamp.pb.d.ts.map +1 -0
  46. package/dist/custom-objects/generated/proto/proto/annotations.pb.d.ts +64 -0
  47. package/dist/custom-objects/generated/proto/proto/annotations.pb.d.ts.map +1 -0
  48. package/dist/custom-objects/generated/proto/proto/extensions.pb.d.ts +657 -0
  49. package/dist/custom-objects/generated/proto/proto/extensions.pb.d.ts.map +1 -0
  50. package/dist/custom-objects/generated/proto/vendor/metadata/pub/api/api_metadata.pb.d.ts +105 -0
  51. package/dist/custom-objects/generated/proto/vendor/metadata/pub/api/api_metadata.pb.d.ts.map +1 -0
  52. package/dist/custom-objects/generated/proto/vendor/net/idempotency/idempotency_model.pb.d.ts +79 -0
  53. package/dist/custom-objects/generated/proto/vendor/net/idempotency/idempotency_model.pb.d.ts.map +1 -0
  54. package/dist/custom-objects/generated/proto/vendor/publicapi/api_group_enum.pb.d.ts +129 -0
  55. package/dist/custom-objects/generated/proto/vendor/publicapi/api_group_enum.pb.d.ts.map +1 -0
  56. package/dist/custom-objects/generated/proto/vendor/publicapi/api_visibility.pb.d.ts +76 -0
  57. package/dist/custom-objects/generated/proto/vendor/publicapi/api_visibility.pb.d.ts.map +1 -0
  58. package/dist/custom-objects/generated/proto/vendor/publicapi/customize_dispatch_middleware_enum.pb.d.ts +78 -0
  59. package/dist/custom-objects/generated/proto/vendor/publicapi/customize_dispatch_middleware_enum.pb.d.ts.map +1 -0
  60. package/dist/custom-objects/generated/proto/vendor/publicapi/docs_namespace_group_enum.pb.d.ts +146 -0
  61. package/dist/custom-objects/generated/proto/vendor/publicapi/docs_namespace_group_enum.pb.d.ts.map +1 -0
  62. package/dist/custom-objects/generated/proto/vendor/publicapi/documented_enum.pb.d.ts +76 -0
  63. package/dist/custom-objects/generated/proto/vendor/publicapi/documented_enum.pb.d.ts.map +1 -0
  64. package/dist/custom-objects/generated/proto/vendor/publicapi/event_scope_enum.pb.d.ts +92 -0
  65. package/dist/custom-objects/generated/proto/vendor/publicapi/event_scope_enum.pb.d.ts.map +1 -0
  66. package/dist/custom-objects/generated/proto/vendor/publicapi/extension_interface.pb.d.ts +124 -0
  67. package/dist/custom-objects/generated/proto/vendor/publicapi/extension_interface.pb.d.ts.map +1 -0
  68. package/dist/custom-objects/generated/proto/vendor/publicapi/feature_enum.pb.d.ts +1070 -0
  69. package/dist/custom-objects/generated/proto/vendor/publicapi/feature_enum.pb.d.ts.map +1 -0
  70. package/dist/custom-objects/generated/proto/vendor/publicapi/field_validation_rules.pb.d.ts +279 -0
  71. package/dist/custom-objects/generated/proto/vendor/publicapi/field_validation_rules.pb.d.ts.map +1 -0
  72. package/dist/custom-objects/generated/proto/vendor/publicapi/flavor_enum.pb.d.ts +78 -0
  73. package/dist/custom-objects/generated/proto/vendor/publicapi/flavor_enum.pb.d.ts.map +1 -0
  74. package/dist/custom-objects/generated/proto/vendor/publicapi/http_error_status.pb.d.ts +102 -0
  75. package/dist/custom-objects/generated/proto/vendor/publicapi/http_error_status.pb.d.ts.map +1 -0
  76. package/dist/custom-objects/generated/proto/vendor/publicapi/method_kind_enum.pb.d.ts +86 -0
  77. package/dist/custom-objects/generated/proto/vendor/publicapi/method_kind_enum.pb.d.ts.map +1 -0
  78. package/dist/custom-objects/generated/proto/vendor/publicapi/method_priority.pb.d.ts +80 -0
  79. package/dist/custom-objects/generated/proto/vendor/publicapi/method_priority.pb.d.ts.map +1 -0
  80. package/dist/custom-objects/generated/proto/vendor/publicapi/permission_check_enum.pb.d.ts +74 -0
  81. package/dist/custom-objects/generated/proto/vendor/publicapi/permission_check_enum.pb.d.ts.map +1 -0
  82. package/dist/custom-objects/generated/proto/vendor/publicapi/redaction_enum.pb.d.ts +76 -0
  83. package/dist/custom-objects/generated/proto/vendor/publicapi/redaction_enum.pb.d.ts.map +1 -0
  84. package/dist/custom-objects/generated/proto/vendor/publicapi/region_routers.pb.d.ts +103 -0
  85. package/dist/custom-objects/generated/proto/vendor/publicapi/region_routers.pb.d.ts.map +1 -0
  86. package/dist/custom-objects/generated/proto/vendor/publicapi/rollout_configs.pb.d.ts +153 -0
  87. package/dist/custom-objects/generated/proto/vendor/publicapi/rollout_configs.pb.d.ts.map +1 -0
  88. package/dist/custom-objects/generated/proto/vendor/publicapi/v2ext.pb.d.ts +1111 -0
  89. package/dist/custom-objects/generated/proto/vendor/publicapi/v2ext.pb.d.ts.map +1 -0
  90. package/dist/custom-objects/generated/proto/vendor/vext/annotations.pb.d.ts +602 -0
  91. package/dist/custom-objects/generated/proto/vendor/vext/annotations.pb.d.ts.map +1 -0
  92. package/dist/custom-objects/generated/proto/vendor/vext/extensions.pb.d.ts +144 -0
  93. package/dist/custom-objects/generated/proto/vendor/vext/extensions.pb.d.ts.map +1 -0
  94. package/dist/custom-objects/generated/proto/vendor/vext/privacy_unified_annotations.pb.d.ts +851 -0
  95. package/dist/custom-objects/generated/proto/vendor/vext/privacy_unified_annotations.pb.d.ts.map +1 -0
  96. package/dist/custom-objects/generated/proto/vendor/vext/xml_annotations.pb.d.ts +125 -0
  97. package/dist/custom-objects/generated/proto/vendor/vext/xml_annotations.pb.d.ts.map +1 -0
  98. package/dist/custom-objects/to-proto-json.d.ts +17 -0
  99. package/dist/custom-objects/to-proto-json.d.ts.map +1 -0
  100. package/dist/dependencies/index.cjs +601 -0
  101. package/dist/dependencies/index.d.ts +320 -0
  102. package/dist/dependencies/index.d.ts.map +1 -0
  103. package/dist/dependencies/index.js +560 -0
  104. package/dist/extensibility-dev-tools-alpha.d.ts +199 -0
  105. package/dist/extensibility-dev-tools-beta.d.ts +199 -0
  106. package/dist/extensibility-dev-tools-dependencies-alpha.d.ts +51 -0
  107. package/dist/extensibility-dev-tools-dependencies-beta.d.ts +51 -0
  108. package/dist/extensibility-dev-tools-dependencies-internal.d.ts +372 -0
  109. package/dist/extensibility-dev-tools-dependencies-public.d.ts +51 -0
  110. package/dist/extensibility-dev-tools-internal.d.ts +1722 -0
  111. package/dist/extensibility-dev-tools-jsonschema-tools-alpha.d.ts +57 -0
  112. package/dist/extensibility-dev-tools-jsonschema-tools-beta.d.ts +57 -0
  113. package/dist/extensibility-dev-tools-jsonschema-tools-internal.d.ts +123 -0
  114. package/dist/extensibility-dev-tools-jsonschema-tools-public.d.ts +57 -0
  115. package/dist/extensibility-dev-tools-manifest-alpha.d.ts +31 -0
  116. package/dist/extensibility-dev-tools-manifest-beta.d.ts +31 -0
  117. package/dist/extensibility-dev-tools-manifest-internal.d.ts +461 -0
  118. package/dist/extensibility-dev-tools-manifest-public.d.ts +31 -0
  119. package/dist/extensibility-dev-tools-public.d.ts +199 -0
  120. package/dist/extensibility-dev-tools-schemas-alpha.d.ts +9 -0
  121. package/dist/extensibility-dev-tools-schemas-beta.d.ts +9 -0
  122. package/dist/extensibility-dev-tools-schemas-internal.d.ts +41 -0
  123. package/dist/extensibility-dev-tools-schemas-public.d.ts +9 -0
  124. package/dist/extensibility-dev-tools-templates-alpha.d.ts +67 -0
  125. package/dist/extensibility-dev-tools-templates-beta.d.ts +67 -0
  126. package/dist/extensibility-dev-tools-templates-internal.d.ts +554 -0
  127. package/dist/extensibility-dev-tools-templates-public.d.ts +67 -0
  128. package/dist/extensibility-dev-tools-workspace-alpha.d.ts +51 -0
  129. package/dist/extensibility-dev-tools-workspace-beta.d.ts +51 -0
  130. package/dist/extensibility-dev-tools-workspace-internal.d.ts +410 -0
  131. package/dist/extensibility-dev-tools-workspace-public.d.ts +51 -0
  132. package/dist/index.cjs +3810 -0
  133. package/dist/index.d.ts +18 -0
  134. package/dist/index.d.ts.map +1 -0
  135. package/dist/index.js +3758 -0
  136. package/dist/jsonschema-tools.cjs +20451 -0
  137. package/dist/jsonschema-tools.d.ts +98 -0
  138. package/dist/jsonschema-tools.d.ts.map +1 -0
  139. package/dist/jsonschema-tools.js +20404 -0
  140. package/dist/manifest/index.cjs +610 -0
  141. package/dist/manifest/index.d.ts +8 -0
  142. package/dist/manifest/index.d.ts.map +1 -0
  143. package/dist/manifest/index.js +571 -0
  144. package/dist/manifest/manifest-v1.d.ts +102 -0
  145. package/dist/manifest/manifest-v1.d.ts.map +1 -0
  146. package/dist/manifest/manifest-v2.d.ts +253 -0
  147. package/dist/manifest/manifest-v2.d.ts.map +1 -0
  148. package/dist/manifest/stripe-app-manifest.d.ts +114 -0
  149. package/dist/manifest/stripe-app-manifest.d.ts.map +1 -0
  150. package/dist/schemas/index.cjs +20692 -0
  151. package/dist/schemas/index.d.ts +37 -0
  152. package/dist/schemas/index.d.ts.map +1 -0
  153. package/dist/schemas/index.js +20656 -0
  154. package/dist/templates/diff-viewer/diff-generator.d.ts +22 -0
  155. package/dist/templates/diff-viewer/diff-generator.d.ts.map +1 -0
  156. package/dist/templates/diff-viewer/diff-prompt.d.ts +13 -0
  157. package/dist/templates/diff-viewer/diff-prompt.d.ts.map +1 -0
  158. package/dist/templates/diff-viewer/index.d.ts +7 -0
  159. package/dist/templates/diff-viewer/index.d.ts.map +1 -0
  160. package/dist/templates/diff-viewer/terminal-renderer.d.ts +29 -0
  161. package/dist/templates/diff-viewer/terminal-renderer.d.ts.map +1 -0
  162. package/dist/templates/diff-viewer/types.d.ts +58 -0
  163. package/dist/templates/diff-viewer/types.d.ts.map +1 -0
  164. package/dist/templates/extensions/base.d.ts +23 -0
  165. package/dist/templates/extensions/base.d.ts.map +1 -0
  166. package/dist/templates/extensions/billing.bill.discount_calculation.d.ts +6 -0
  167. package/dist/templates/extensions/billing.bill.discount_calculation.d.ts.map +1 -0
  168. package/dist/templates/extensions/billing.customer_balance_application.d.ts +6 -0
  169. package/dist/templates/extensions/billing.customer_balance_application.d.ts.map +1 -0
  170. package/dist/templates/extensions/billing.invoice_collection_setting.d.ts +6 -0
  171. package/dist/templates/extensions/billing.invoice_collection_setting.d.ts.map +1 -0
  172. package/dist/templates/extensions/billing.prorations.d.ts +6 -0
  173. package/dist/templates/extensions/billing.prorations.d.ts.map +1 -0
  174. package/dist/templates/extensions/billing.recurring_billing_item_handling.d.ts +6 -0
  175. package/dist/templates/extensions/billing.recurring_billing_item_handling.d.ts.map +1 -0
  176. package/dist/templates/extensions/core.workflows.custom_action.d.ts +6 -0
  177. package/dist/templates/extensions/core.workflows.custom_action.d.ts.map +1 -0
  178. package/dist/templates/extensions/extend.objects.custom_objects.d.ts +6 -0
  179. package/dist/templates/extensions/extend.objects.custom_objects.d.ts.map +1 -0
  180. package/dist/templates/extensions/extend.workflows.custom_action.d.ts +6 -0
  181. package/dist/templates/extensions/extend.workflows.custom_action.d.ts.map +1 -0
  182. package/dist/templates/extensions/index.d.ts +13 -0
  183. package/dist/templates/extensions/index.d.ts.map +1 -0
  184. package/dist/templates/extensions/registry.d.ts +10 -0
  185. package/dist/templates/extensions/registry.d.ts.map +1 -0
  186. package/dist/templates/extensions/types.d.ts +104 -0
  187. package/dist/templates/extensions/types.d.ts.map +1 -0
  188. package/dist/templates/file-writer.d.ts +140 -0
  189. package/dist/templates/file-writer.d.ts.map +1 -0
  190. package/dist/templates/fs/_impl.d.ts +29 -0
  191. package/dist/templates/fs/_impl.d.ts.map +1 -0
  192. package/dist/templates/fs/filesystem.d.ts +8 -0
  193. package/dist/templates/fs/filesystem.d.ts.map +1 -0
  194. package/dist/templates/fs/in-memory.d.ts +9 -0
  195. package/dist/templates/fs/in-memory.d.ts.map +1 -0
  196. package/dist/templates/fs/index.d.ts +25 -0
  197. package/dist/templates/fs/index.d.ts.map +1 -0
  198. package/dist/templates/fs-utils.d.ts +17 -0
  199. package/dist/templates/fs-utils.d.ts.map +1 -0
  200. package/dist/templates/index.cjs +2248 -0
  201. package/dist/templates/index.d.ts +32 -0
  202. package/dist/templates/index.d.ts.map +1 -0
  203. package/dist/templates/index.js +2203 -0
  204. package/dist/templates/root/index.d.ts +60 -0
  205. package/dist/templates/root/index.d.ts.map +1 -0
  206. package/dist/templates/simple-templates.d.ts +8 -0
  207. package/dist/templates/simple-templates.d.ts.map +1 -0
  208. package/dist/templates/template-manager.d.ts +8 -0
  209. package/dist/templates/template-manager.d.ts.map +1 -0
  210. package/dist/templates/types.d.ts +9 -0
  211. package/dist/templates/types.d.ts.map +1 -0
  212. package/dist/tsconfig.build.tsbuildinfo +1 -0
  213. package/dist/workspace/index.cjs +3756 -0
  214. package/dist/workspace/index.d.ts +336 -0
  215. package/dist/workspace/index.d.ts.map +1 -0
  216. package/dist/workspace/index.js +3731 -0
  217. package/package.json +137 -0
  218. package/templates/extensions/billing.bill.discount_calculation/index.test.ts +15 -0
  219. package/templates/extensions/billing.bill.discount_calculation/index.ts +20 -0
  220. package/templates/extensions/billing.customer_balance_application/index.test.ts +15 -0
  221. package/templates/extensions/billing.customer_balance_application/index.ts +18 -0
  222. package/templates/extensions/billing.invoice_collection_setting/index.test.ts +15 -0
  223. package/templates/extensions/billing.invoice_collection_setting/index.ts +16 -0
  224. package/templates/extensions/billing.prorations/index.test.ts +15 -0
  225. package/templates/extensions/billing.prorations/index.ts +18 -0
  226. package/templates/extensions/billing.recurring_billing_item_handling/index.test.ts +15 -0
  227. package/templates/extensions/billing.recurring_billing_item_handling/index.ts +42 -0
  228. package/templates/extensions/common/.prettierignore +3 -0
  229. package/templates/extensions/common/eslint.config.mts.mustache +95 -0
  230. package/templates/extensions/common/package.json.mustache +26 -0
  231. package/templates/extensions/common/tsconfig.build.json.mustache +15 -0
  232. package/templates/extensions/common/tsconfig.json.mustache +16 -0
  233. package/templates/extensions/core.workflows.custom_action/custom_input.schema.json +6 -0
  234. package/templates/extensions/core.workflows.custom_action/index.test.ts +15 -0
  235. package/templates/extensions/core.workflows.custom_action/index.ts +31 -0
  236. package/templates/extensions/extend.workflows.custom_action/custom_input.schema.json +6 -0
  237. package/templates/extensions/extend.workflows.custom_action/index.test.ts +15 -0
  238. package/templates/extensions/extend.workflows.custom_action/index.ts +31 -0
  239. package/templates/root/.husky/pre-commit +1 -0
  240. package/templates/root/.prettierignore +5 -0
  241. package/templates/root/.prettierrc +7 -0
  242. package/templates/root/_gitignore +28 -0
  243. package/templates/root/custom-objects/package.json +20 -0
  244. package/templates/root/custom-objects/tsconfig.json +9 -0
  245. package/templates/root/eslint.config.mts +95 -0
  246. package/templates/root/package.json.mustache +32 -0
  247. package/templates/root/pnpm-workspace.yaml +7 -0
  248. package/templates/root/stripe-app.yaml.mustache +6 -0
  249. package/templates/root/tools/test.mts +38 -0
  250. package/templates/root/tsconfig.base.json +23 -0
  251. package/templates/root/tsconfig.json +15 -0
  252. package/templates/root/ui/package.json +17 -0
  253. package/templates/root/vitest.config.mts +47 -0
@@ -0,0 +1,461 @@
1
+ /**
2
+ * Custom object definition (internal representation with separate fields)
3
+ * @internal
4
+ */
5
+ export declare interface _CustomObjectDefinition {
6
+ /** Object identifier (e.g., "device", "loyalty_card") */
7
+ id: string;
8
+ /** Specification type (e.g., "typescript") */
9
+ type: string;
10
+ /** Path to the definition file */
11
+ path: string;
12
+ /** Export name derived from id via PascalCase (e.g., "Device", "LoyaltyCard") */
13
+ name: string;
14
+ }
15
+
16
+ /**
17
+ * Wrapper for custom_object_definitions in the manifest.
18
+ * @internal
19
+ */
20
+ export declare interface _CustomObjectDefinitionsBlock {
21
+ /** List of custom object definition entries. */
22
+ definitions?: _CustomObjectDefinitionYaml[];
23
+ }
24
+
25
+ /**
26
+ * Custom object definition as stored in YAML (nested under definitions).
27
+ *
28
+ * `id` is the source of truth for identity. The export name used at build time
29
+ * is derived via `_toPascalCase(id)`, so `id` must be valid snake_case that
30
+ * round-trips cleanly (e.g., `device`, `loyalty_card`, `http_request`).
31
+ * Consecutive-uppercase class names like `MyHTTPClient` are NOT round-trip safe
32
+ * (`my_http_client` → `MyHttpClient`). A future `export_name` field may address
33
+ * this; for now, avoid ids that would produce ambiguous PascalCase names.
34
+ *
35
+ * @example
36
+ * ```yaml
37
+ * custom_object_definitions:
38
+ * definitions:
39
+ * - id: device
40
+ * specification:
41
+ * type: typescript
42
+ * content: src/device.object.ts
43
+ * ```
44
+ *
45
+ * @internal
46
+ */
47
+ export declare interface _CustomObjectDefinitionYaml {
48
+ /** Object identifier (e.g., `device`, `loyalty_card`). */
49
+ id: string;
50
+ /** Specification describing the type and source file for the definition. */
51
+ specification: {
52
+ content: string;
53
+ type: string;
54
+ };
55
+ }
56
+
57
+ /**
58
+ * A parsed custom object entry referencing a file path and export class name.
59
+ * @internal
60
+ */
61
+ export declare interface _CustomObjectEntry {
62
+ /** Relative path to the type definition file (e.g., `src/device.d.ts`). */
63
+ filePath: string;
64
+ /** Name of the exported class in the definition file. */
65
+ className: string;
66
+ }
67
+
68
+ /**
69
+ * Authentication configuration for an endpoint.
70
+ * @internal
71
+ */
72
+ export declare interface _EndpointAuth {
73
+ /** The type of authentication. */
74
+ type: 'bearer_token' | 'header';
75
+ /** The name of the secret containing the authentication credential. */
76
+ secret_name: string;
77
+ /** The name of the header to use for authentication (required when type is 'header'). */
78
+ header_name?: string;
79
+ }
80
+
81
+ /**
82
+ * Configuration for a single endpoint environment (live, test, managed_sandbox).
83
+ * @internal
84
+ */
85
+ export declare interface _EndpointDefinition {
86
+ /** The HTTPS URL of the endpoint. */
87
+ url?: string;
88
+ /** The purpose of the endpoint. */
89
+ purpose?: string;
90
+ /** Authentication configuration. */
91
+ auth?: _EndpointAuth;
92
+ }
93
+
94
+ /**
95
+ * Extension configuration for stripe-app.yaml
96
+ * @internal
97
+ */
98
+ export declare interface _ExtensionConfig {
99
+ /** Extension identifier (e.g., `username.my-ext`). */
100
+ id: string;
101
+ /** Human-readable extension name. */
102
+ name: string;
103
+ /** Extension interface ID (e.g., `com.stripe.billing.bill`). */
104
+ interface_id: string;
105
+ /** Extension version string. */
106
+ version: string;
107
+ /** Developer-defined description for the extension (max 300 chars). */
108
+ description?: string;
109
+ /** Stripe API version to use for this extension (e.g., `2024-06-05`). */
110
+ stripe_version?: string;
111
+ /** Entry point script path, used by legacy script format. */
112
+ script_entry_point?: string;
113
+ /** Inline script definition (type + content path). */
114
+ script?: {
115
+ content: string;
116
+ type: string;
117
+ };
118
+ /** Required permissions for the extension. */
119
+ permissions: string[];
120
+ /** Method implementations keyed by method name. */
121
+ methods: Record<string, unknown>;
122
+ /** Optional configuration schemas for the extension. */
123
+ configuration?: _ExtensionConfiguration;
124
+ /** Remote function endpoints for the extension. */
125
+ endpoints?: {
126
+ id: string;
127
+ live?: _EndpointDefinition;
128
+ managed_sandbox?: _EndpointDefinition;
129
+ test?: _EndpointDefinition;
130
+ type: 'custom_http' | 'remote_function';
131
+ }[];
132
+ }
133
+
134
+ /**
135
+ * Extension configuration schemas (JSON Schema for validation, UI Schema for rendering).
136
+ * @internal
137
+ */
138
+ export declare interface _ExtensionConfiguration {
139
+ /** JSON Schema file for validating extension configuration. */
140
+ input_schema: _SchemaReference;
141
+ /** UI Schema file for rendering the configuration form. */
142
+ ui_schema: _SchemaReference;
143
+ }
144
+
145
+ /**
146
+ * Manages stripe-app.json (V1) manifest file operations
147
+ *
148
+ * Capabilities:
149
+ * - Custom objects (add, remove, has, get)
150
+ * - App metadata (id, name)
151
+ *
152
+ * @example
153
+ * ```ts
154
+ * const manifest = await ManifestV1.load('./stripe-app.json')
155
+ * manifest.addCustomObject({ filePath: 'src/device.d.ts', className: 'Device' })
156
+ * await manifest.save()
157
+ * ```
158
+ * @internal
159
+ */
160
+ export declare class _ManifestV1 {
161
+ private readonly filePath;
162
+ private data;
163
+ private constructor();
164
+ /**
165
+ * Load stripe-app.json from disk
166
+ * @param filePath - Path to stripe-app.json
167
+ * @throws Error if file is invalid or cannot be read
168
+ */
169
+ static load(filePath: string): _ManifestV1;
170
+ /**
171
+ * Get the app ID from the manifest
172
+ */
173
+ getAppId(): string;
174
+ /**
175
+ * Get the app name from the manifest
176
+ */
177
+ getAppName(): string;
178
+ /**
179
+ * Get all custom objects as structured entries
180
+ */
181
+ getCustomObjects(): _CustomObjectEntry[];
182
+ /**
183
+ * Check if a custom object entry exists in the manifest
184
+ */
185
+ hasCustomObject(entry: _CustomObjectEntry): boolean;
186
+ /**
187
+ * Add a custom object entry to the manifest
188
+ * Does nothing if entry already exists
189
+ * @returns true if entry was added, false if it already existed
190
+ */
191
+ addCustomObject(entry: _CustomObjectEntry): boolean;
192
+ /**
193
+ * Remove a custom object entry from the manifest
194
+ * @returns true if entry was removed, false if it didn't exist
195
+ */
196
+ removeCustomObject(entry: _CustomObjectEntry): boolean;
197
+ /**
198
+ * Get the raw manifest data (for reading other fields)
199
+ */
200
+ getRawData(): Readonly<_ManifestV1Data>;
201
+ /**
202
+ * Save changes back to disk
203
+ */
204
+ save(): void;
205
+ }
206
+
207
+ /**
208
+ * V1 manifest structure (stripe-app.json)
209
+ * @internal
210
+ */
211
+ export declare interface _ManifestV1Data {
212
+ /** The app identifier. */
213
+ id: string;
214
+ /** The app version string. */
215
+ version: string;
216
+ /** The app display name. */
217
+ name: string;
218
+ /** List of custom object entries in `path#ClassName` format. */
219
+ exported_custom_objects?: string[];
220
+ /** Additional manifest fields. */
221
+ [key: string]: unknown;
222
+ }
223
+
224
+ /**
225
+ * Manages stripe-app.yaml (V2) manifest file operations
226
+ *
227
+ * Capabilities:
228
+ * - Extensions (add, update, get)
229
+ * - App metadata (id, name)
230
+ *
231
+ * @example
232
+ * ```ts
233
+ * const manifest = await _ManifestV2.load('./stripe-app.yaml')
234
+ * manifest.addOrUpdateExtension({
235
+ * id: 'username.my-ext',
236
+ * name: 'my-ext',
237
+ * interfaceId: 'com.stripe.test',
238
+ * version: '0.0.1',
239
+ * scriptEntryPoint: 'scripts/my-ext/index.ts',
240
+ * permissions: [],
241
+ * methods: { my_run: { implementation_type: 'script' } }
242
+ * })
243
+ * await manifest.save()
244
+ * ```
245
+ * @internal
246
+ */
247
+ export declare class _ManifestV2 {
248
+ private readonly filePath;
249
+ private data;
250
+ private constructor();
251
+ /**
252
+ * Load stripe-app.yaml from disk
253
+ * @param filePath - Path to stripe-app.yaml
254
+ * @throws Error if file is invalid or cannot be read
255
+ */
256
+ static load(filePath: string): Promise<_ManifestV2>;
257
+ /**
258
+ * Get the app ID from the manifest
259
+ */
260
+ getAppId(): string | undefined;
261
+ /**
262
+ * Get the app name from the manifest
263
+ */
264
+ getAppName(): string | undefined;
265
+ /**
266
+ * Get all custom object definitions, parsed into internal format.
267
+ * Entries are guaranteed structurally valid by load-time validation.
268
+ */
269
+ getCustomObjects(): _CustomObjectDefinition[];
270
+ /**
271
+ * Check if a custom object exists by id
272
+ */
273
+ hasCustomObject(id: string): boolean;
274
+ /**
275
+ * Add a custom object definition.
276
+ *
277
+ * Identity is keyed on `id` alone. The export name is derived via
278
+ * `_toPascalCase(id)` at read time, so `id` should be valid snake_case
279
+ * (e.g., "device", "loyalty_card", "http_request").
280
+ *
281
+ * @param id - Object identifier (e.g., "device", "loyalty_card")
282
+ * @param content - Path to the definition file (e.g., "src/device.object.ts")
283
+ * @param type - Specification type, defaults to "typescript"
284
+ * @returns true if added, false if already exists
285
+ */
286
+ addCustomObject(id: string, content: string, type?: string): boolean;
287
+ /**
288
+ * Remove a custom object definition by id
289
+ * @param id - Object identifier to remove
290
+ * @returns true if removed, false if not found
291
+ */
292
+ removeCustomObject(id: string): boolean;
293
+ /**
294
+ * Add a new extension or update an existing one by ID
295
+ * If an extension with the provided ID exists, it will be replaced entirely
296
+ * @param extension - Extension configuration with all required fields including id
297
+ * @returns The extension ID
298
+ */
299
+ addOrUpdateExtension(extension: _ExtensionConfig): string;
300
+ /**
301
+ * Get a read-only view of all extensions
302
+ */
303
+ getExtensions(): readonly Readonly<_ExtensionConfig>[];
304
+ /**
305
+ * Get the raw manifest data (for reading other fields)
306
+ */
307
+ getRawData(): Readonly<_ManifestV2Data>;
308
+ /**
309
+ * Save changes back to disk
310
+ * @throws Error if file cannot be written
311
+ */
312
+ save(): Promise<void>;
313
+ }
314
+
315
+ /**
316
+ * V2 manifest structure (stripe-app.yaml)
317
+ * @internal
318
+ */
319
+ export declare interface _ManifestV2Data {
320
+ /** The app identifier. */
321
+ id: string;
322
+ /** The app display name. */
323
+ name: string;
324
+ /** The app version string. */
325
+ version: string;
326
+ /** Registered extension configurations. */
327
+ extensions?: _ExtensionConfig[];
328
+ /** Custom object definitions block. */
329
+ custom_object_definitions?: _CustomObjectDefinitionsBlock;
330
+ /** Additional manifest fields. */
331
+ [key: string]: unknown;
332
+ }
333
+
334
+ /**
335
+ * Manifest version types
336
+ * @internal
337
+ */
338
+ export declare type _ManifestVersion = 'v1' | 'v2';
339
+
340
+ /**
341
+ * A reference to a schema file in the project (type + relative path).
342
+ *
343
+ * Note: stripe-cli-apps-plugin is the authoritative representation of the
344
+ * Stripe App manifest. Types here are a best-effort mirror.
345
+ * @internal
346
+ */
347
+ export declare interface _SchemaReference {
348
+ /** The schema format. */
349
+ type: 'json_schema' | 'jsonforms';
350
+ /** Relative path to the schema file. Named `content` to match the manifest field. */
351
+ content: string;
352
+ }
353
+
354
+ /**
355
+ * Unified interface for Stripe App manifest operations.
356
+ *
357
+ * This class provides an abstraction over both V1 (stripe-app.json) and V2 (stripe-app.yaml)
358
+ * manifest formats, automatically detecting the version and delegating to the appropriate reader.
359
+ *
360
+ * Capabilities by version:
361
+ * - V1 (JSON): Custom objects, app metadata
362
+ * - V2 (YAML): Extensions, custom objects, app metadata
363
+ *
364
+ * @example
365
+ * ```ts
366
+ * const manifest = await _StripeAppManifest.load('./stripe-app.yaml')
367
+ * manifest.addOrUpdateExtension({ ... })
368
+ * await manifest.save()
369
+ * ```
370
+ * @internal
371
+ */
372
+ export declare class _StripeAppManifest {
373
+ private readonly manifestPath;
374
+ private readonly version;
375
+ private readonly v1;
376
+ private readonly v2;
377
+ private constructor();
378
+ /**
379
+ * Load a manifest file, automatically detecting the version.
380
+ * @param manifestPath - Path to stripe-app.json or stripe-app.yaml
381
+ * @returns Loaded manifest instance
382
+ */
383
+ static load(manifestPath: string): Promise<_StripeAppManifest>;
384
+ /**
385
+ * Detect manifest version from file path.
386
+ * TODO: Add content-based detection if needed.
387
+ */
388
+ private static detectVersion;
389
+ /**
390
+ * Get the detected manifest version
391
+ */
392
+ getVersion(): _ManifestVersion;
393
+ /**
394
+ * Get the manifest file path
395
+ */
396
+ getManifestPath(): string;
397
+ /**
398
+ * Get the app ID from the manifest
399
+ */
400
+ getAppId(): string | undefined;
401
+ /**
402
+ * Get the app name from the manifest
403
+ */
404
+ getAppName(): string | undefined;
405
+ /**
406
+ * Get all custom objects from the manifest
407
+ */
408
+ getCustomObjects(): _CustomObjectEntry[];
409
+ /**
410
+ * Check if a custom object entry exists in the manifest.
411
+ *
412
+ * **V2 note:** Identity is keyed on `_toSnakeCase(className)` alone — `filePath`
413
+ * is not considered. Two entries with the same class name but different file
414
+ * paths are treated as the same object. The `_toSnakeCase` → `_toPascalCase`
415
+ * round-trip is lossless for typical class names but lossy for consecutive
416
+ * uppercase (e.g., `HTTPClient` → `http_client` → `HttpClient`). The manifest
417
+ * `id` field is the source of truth; see `_CustomObjectDefinitionYaml` docs.
418
+ */
419
+ hasCustomObject(entry: _CustomObjectEntry): boolean;
420
+ /**
421
+ * Add a custom object entry to the manifest.
422
+ *
423
+ * **V2 note:** The manifest `id` is derived as `_toSnakeCase(className)` and
424
+ * `filePath` is stored as the specification `content` path. Identity/dedup
425
+ * is based on `id` alone — see `hasCustomObject` for details.
426
+ *
427
+ * @param entry - The custom object entry to add
428
+ * @returns true if entry was added, false if it already existed
429
+ */
430
+ addCustomObject(entry: _CustomObjectEntry): boolean;
431
+ /**
432
+ * Remove a custom object entry from the manifest.
433
+ *
434
+ * **V2 note:** Removal is keyed on `_toSnakeCase(className)` — `filePath` is
435
+ * not considered. See `hasCustomObject` for identity semantics.
436
+ *
437
+ * @param entry - The custom object entry to remove
438
+ * @returns true if entry was removed, false if it didn't exist
439
+ */
440
+ removeCustomObject(entry: _CustomObjectEntry): boolean;
441
+ /**
442
+ * Get all extensions from the manifest
443
+ * @throws Error if manifest version doesn't support extensions
444
+ */
445
+ getExtensions(): readonly Readonly<_ExtensionConfig>[];
446
+ /**
447
+ * Add or update an extension in the manifest.
448
+ * If an extension with the same ID exists, it will be replaced.
449
+ *
450
+ * @param config - Full extension configuration
451
+ * @returns The extension ID
452
+ * @throws Error if manifest version doesn't support extensions
453
+ */
454
+ addOrUpdateExtension(config: _ExtensionConfig): string;
455
+ /**
456
+ * Save changes back to disk
457
+ */
458
+ save(): Promise<void>;
459
+ }
460
+
461
+ export { }
@@ -0,0 +1,31 @@
1
+ /* Excluded from this release type: _CustomObjectDefinition */
2
+
3
+ /* Excluded from this release type: _CustomObjectDefinitionsBlock */
4
+
5
+ /* Excluded from this release type: _CustomObjectDefinitionYaml */
6
+
7
+ /* Excluded from this release type: _CustomObjectEntry */
8
+
9
+ /* Excluded from this release type: _EndpointAuth */
10
+
11
+ /* Excluded from this release type: _EndpointDefinition */
12
+
13
+ /* Excluded from this release type: _ExtensionConfig */
14
+
15
+ /* Excluded from this release type: _ExtensionConfiguration */
16
+
17
+ /* Excluded from this release type: _ManifestV1 */
18
+
19
+ /* Excluded from this release type: _ManifestV1Data */
20
+
21
+ /* Excluded from this release type: _ManifestV2 */
22
+
23
+ /* Excluded from this release type: _ManifestV2Data */
24
+
25
+ /* Excluded from this release type: _ManifestVersion */
26
+
27
+ /* Excluded from this release type: _SchemaReference */
28
+
29
+ /* Excluded from this release type: _StripeAppManifest */
30
+
31
+ export { }
@@ -0,0 +1,199 @@
1
+ /**
2
+ * `@stripe/extensibility-dev-tools`
3
+ *
4
+ * Development tools for Stripe Apps extension projects:
5
+ * - Template system for code generation
6
+ * - Dependency management
7
+ * - Manifest parsing (stripe-app.yaml)
8
+ * - Workspace regeneration
9
+ *
10
+ * @packageDocumentation
11
+ */
12
+
13
+ import { z } from 'zod';
14
+
15
+ /* Excluded from this release type: _advancedDiffPrompt */
16
+
17
+ /* Excluded from this release type: _CheckResult */
18
+
19
+ /* Excluded from this release type: _CliContext */
20
+
21
+ /* Excluded from this release type: _CliUx */
22
+
23
+ /* Excluded from this release type: _CommitOptions */
24
+
25
+ /* Excluded from this release type: _CommitResult */
26
+
27
+ /* Excluded from this release type: _ConflictResult */
28
+
29
+ /* Excluded from this release type: _createCliContext */
30
+
31
+ /* Excluded from this release type: _createExtensionEslintConfigFile */
32
+
33
+ /* Excluded from this release type: _createSimpleSingleFileTemplate */
34
+
35
+ /* Excluded from this release type: _createSimpleTemplate */
36
+
37
+ /* Excluded from this release type: _CustomObjectDefinition */
38
+
39
+ /* Excluded from this release type: _CustomObjectDefinitionsBlock */
40
+
41
+ /* Excluded from this release type: _CustomObjectDefinitionYaml */
42
+
43
+ /* Excluded from this release type: _CustomObjectEntry */
44
+
45
+ /* Excluded from this release type: _defaultServices */
46
+
47
+ /* Excluded from this release type: _Dependency */
48
+
49
+ /* Excluded from this release type: _DependencyAction */
50
+
51
+ /* Excluded from this release type: _DependencyHandler */
52
+
53
+ /* Excluded from this release type: _DependencyManager */
54
+
55
+ /* Excluded from this release type: _DependencyManagerOptions */
56
+
57
+ /* Excluded from this release type: _detectPackageManager */
58
+
59
+ /* Excluded from this release type: _devNpmDep */
60
+
61
+ /* Excluded from this release type: _DevNpmDependency */
62
+
63
+ /* Excluded from this release type: _EndpointAuth */
64
+
65
+ /* Excluded from this release type: _EndpointDefinition */
66
+
67
+ /* Excluded from this release type: _EnsureDependenciesInput */
68
+
69
+ /* Excluded from this release type: _ExtensionConfig */
70
+
71
+ /* Excluded from this release type: _ExtensionConfiguration */
72
+
73
+ /* Excluded from this release type: _ExtensionMethodInfo */
74
+
75
+ /* Excluded from this release type: _ExtensionParams */
76
+
77
+ /* Excluded from this release type: _ExtensionTemplate */
78
+
79
+ /* Excluded from this release type: _ExtensionTemplateInfo */
80
+
81
+ /* Excluded from this release type: _ExtensionTemplateManager */
82
+
83
+ /* Excluded from this release type: _ExtensionTemplateOutput */
84
+
85
+ /* Excluded from this release type: _FileWriteResult */
86
+
87
+ /* Excluded from this release type: _FileWriterOptions */
88
+
89
+ /* Excluded from this release type: _fs */
90
+
91
+ /* Excluded from this release type: _GeneratedFile */
92
+
93
+ /* Excluded from this release type: _ManifestV1 */
94
+
95
+ /* Excluded from this release type: _ManifestV1Data */
96
+
97
+ /* Excluded from this release type: _ManifestV2 */
98
+
99
+ /* Excluded from this release type: _ManifestV2Data */
100
+
101
+ /* Excluded from this release type: _ManifestVersion */
102
+
103
+ /* Excluded from this release type: _npmDep */
104
+
105
+ /* Excluded from this release type: _NpmDependency */
106
+
107
+ /* Excluded from this release type: _NpmDependencyHandler */
108
+
109
+ /* Excluded from this release type: _NpmHandlerOptions */
110
+
111
+ /* Excluded from this release type: _OverwriteDecision */
112
+
113
+ /* Excluded from this release type: _OverwritePromptCallback */
114
+
115
+ /* Excluded from this release type: _PackageManager */
116
+
117
+ /* Excluded from this release type: _PackageMetadata */
118
+
119
+ /* Excluded from this release type: _PendingChange */
120
+
121
+ /* Excluded from this release type: _PostGenerationHook */
122
+
123
+ /* Excluded from this release type: _promptOverwrite */
124
+
125
+ /* Excluded from this release type: _regenAppProjectWorkspace */
126
+
127
+ /* Excluded from this release type: _RegenWorkspaceOptions */
128
+
129
+ /* Excluded from this release type: _regenWorkspaceOptionsSchema */
130
+
131
+ /* Excluded from this release type: _resolvePackageMetadata */
132
+
133
+ /* Excluded from this release type: _rootTemplateManager */
134
+
135
+ /* Excluded from this release type: _RootWorkspaceOutput */
136
+
137
+ /* Excluded from this release type: _RootWorkspaceParams */
138
+
139
+ /* Excluded from this release type: _rootWorkspaceTemplate */
140
+
141
+ /* Excluded from this release type: _SchemaReference */
142
+
143
+ /* Excluded from this release type: _SingleTemplateManager */
144
+
145
+ /* Excluded from this release type: _StripeAppManifest */
146
+
147
+ /* Excluded from this release type: _stripeCliPluginDep */
148
+
149
+ /* Excluded from this release type: _StripeCliPluginDependency */
150
+
151
+ /* Excluded from this release type: _StripeCliPluginHandler */
152
+
153
+ /* Excluded from this release type: _StripeCliPluginHandlerOptions */
154
+
155
+ /* Excluded from this release type: _Template */
156
+
157
+ /* Excluded from this release type: _TemplateContext */
158
+
159
+ /* Excluded from this release type: _TemplateFS */
160
+
161
+ /* Excluded from this release type: _TemplateManager */
162
+
163
+ /* Excluded from this release type: _templateManager */
164
+
165
+ /* Excluded from this release type: _TemplateOutput */
166
+
167
+ /* Excluded from this release type: _WorkspaceDependency */
168
+
169
+ /* Excluded from this release type: _WorkspaceDependencyManager */
170
+
171
+ /* Excluded from this release type: _WorkspaceExtensionConfig */
172
+
173
+ /* Excluded from this release type: _WorkspaceFileWriteResult */
174
+
175
+ /* Excluded from this release type: _WorkspaceFileWriterOptions */
176
+
177
+ /* Excluded from this release type: _WorkspaceGeneratedFile */
178
+
179
+ /* Excluded from this release type: _WorkspaceGenerateResult */
180
+
181
+ /* Excluded from this release type: _WorkspaceManifest */
182
+
183
+ /* Excluded from this release type: _WorkspaceOverwriteDecision */
184
+
185
+ /* Excluded from this release type: _WorkspaceOverwritePromptCallback */
186
+
187
+ /* Excluded from this release type: _WorkspacePendingChange */
188
+
189
+ /* Excluded from this release type: _WorkspacePostGenerationHook */
190
+
191
+ /* Excluded from this release type: _WorkspaceServices */
192
+
193
+ /* Excluded from this release type: _WorkspaceWriteMode */
194
+
195
+ /* Excluded from this release type: _writeGeneratedFiles */
196
+
197
+ /* Excluded from this release type: _WriteMode */
198
+
199
+ export { }
@@ -0,0 +1,9 @@
1
+ /* Excluded from this release type: buildExtensionSchemas */
2
+
3
+ /* Excluded from this release type: BuildExtensionSchemasOptions */
4
+
5
+ /* Excluded from this release type: BuildExtensionSchemasResult */
6
+
7
+ /* Excluded from this release type: SchemaFileInfo */
8
+
9
+ export { }