@stripe/extensibility-dev-tools 0.23.5 → 0.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/dist/bin/build-custom-object-definitions.cjs +42 -36
- package/dist/bin/build-custom-object-definitions.js +42 -36
- package/dist/bin/create-upload-image.cjs +42 -36
- package/dist/bin/create-upload-image.js +42 -36
- package/dist/bin/dev-tools-rpc.cjs +42 -31
- package/dist/bin/dev-tools-rpc.js +42 -31
- package/dist/bin/gen-workspace.cjs +42 -31
- package/dist/bin/gen-workspace.js +42 -31
- package/dist/bin/template-info.cjs +28 -30
- package/dist/bin/template-info.js +28 -30
- package/dist/custom-objects/to-proto-json.d.ts +2 -1
- package/dist/custom-objects/to-proto-json.d.ts.map +1 -1
- package/dist/index.cjs +42 -31
- package/dist/index.js +42 -31
- package/dist/templates/extensions/base.d.ts +1 -1
- package/dist/templates/extensions/base.d.ts.map +1 -1
- package/dist/templates/extensions/core.workflows.custom_action.d.ts.map +1 -1
- package/dist/templates/index.cjs +42 -31
- package/dist/templates/index.js +42 -31
- package/dist/templates/root/index.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/workspace/index.cjs +42 -31
- package/dist/workspace/index.js +42 -31
- package/package.json +4 -4
- package/templates/extensions/billing.bill.discount_calculation/index.ts +2 -3
- package/templates/extensions/billing.customer_balance_application/index.test.ts +5 -5
- package/templates/extensions/billing.customer_balance_application/index.ts +4 -4
- package/templates/extensions/billing.invoice_collection_setting/index.ts +2 -2
- package/templates/extensions/billing.prorations/index.ts +2 -2
- package/templates/extensions/billing.recurring_billing_item_handling/index.ts +2 -2
- package/templates/extensions/core.workflows.custom_action/index.ts +2 -3
- package/templates/extensions/extend.workflows.custom_action/index.ts +2 -3
- package/templates/root/custom-objects/{package.json → package.json.mustache} +4 -4
- package/dist/extensibility-dev-tools-alpha.d.ts +0 -199
- package/dist/extensibility-dev-tools-beta.d.ts +0 -199
- package/dist/extensibility-dev-tools-dependencies-alpha.d.ts +0 -51
- package/dist/extensibility-dev-tools-dependencies-beta.d.ts +0 -51
- package/dist/extensibility-dev-tools-dependencies-internal.d.ts +0 -372
- package/dist/extensibility-dev-tools-dependencies-public.d.ts +0 -51
- package/dist/extensibility-dev-tools-internal.d.ts +0 -1722
- package/dist/extensibility-dev-tools-jsonschema-tools-alpha.d.ts +0 -57
- package/dist/extensibility-dev-tools-jsonschema-tools-beta.d.ts +0 -57
- package/dist/extensibility-dev-tools-jsonschema-tools-internal.d.ts +0 -123
- package/dist/extensibility-dev-tools-jsonschema-tools-public.d.ts +0 -57
- package/dist/extensibility-dev-tools-manifest-alpha.d.ts +0 -31
- package/dist/extensibility-dev-tools-manifest-beta.d.ts +0 -31
- package/dist/extensibility-dev-tools-manifest-internal.d.ts +0 -461
- package/dist/extensibility-dev-tools-manifest-public.d.ts +0 -31
- package/dist/extensibility-dev-tools-public.d.ts +0 -199
- package/dist/extensibility-dev-tools-schemas-alpha.d.ts +0 -9
- package/dist/extensibility-dev-tools-schemas-beta.d.ts +0 -9
- package/dist/extensibility-dev-tools-schemas-internal.d.ts +0 -41
- package/dist/extensibility-dev-tools-schemas-public.d.ts +0 -9
- package/dist/extensibility-dev-tools-templates-alpha.d.ts +0 -67
- package/dist/extensibility-dev-tools-templates-beta.d.ts +0 -67
- package/dist/extensibility-dev-tools-templates-internal.d.ts +0 -554
- package/dist/extensibility-dev-tools-templates-public.d.ts +0 -67
- package/dist/extensibility-dev-tools-workspace-alpha.d.ts +0 -51
- package/dist/extensibility-dev-tools-workspace-beta.d.ts +0 -51
- package/dist/extensibility-dev-tools-workspace-internal.d.ts +0 -410
- package/dist/extensibility-dev-tools-workspace-public.d.ts +0 -51
|
@@ -1,461 +0,0 @@
|
|
|
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 { }
|
|
@@ -1,31 +0,0 @@
|
|
|
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 { }
|
|
@@ -1,199 +0,0 @@
|
|
|
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 { }
|
|
@@ -1,9 +0,0 @@
|
|
|
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 { }
|