@stripe/extensibility-tool-utils 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,6 +28,7 @@ export interface _StripeAppManifest {
28
28
  readonly app_backend?: unknown;
29
29
  readonly ui_extension?: unknown;
30
30
  readonly custom_object_definitions?: {
31
+ readonly version?: string;
31
32
  readonly definitions?: readonly {
32
33
  readonly id: string;
33
34
  readonly specification: {
@@ -45,8 +46,9 @@ export declare class _StripeAppManifestDoc extends _Document<_StripeAppManifest>
45
46
  removePermission(permission: _StripePermission, opts?: _MutationOptions<_StripeAppManifest>): this;
46
47
  /**
47
48
  * Add a custom object definition. Uses arrayUpsert to avoid duplicates
48
- * (keyed on `id`). Creates the `custom_object_definitions.definitions`
49
- * array if it doesn't exist.
49
+ * (keyed on `id`). A missing `custom_object_definitions` block is created
50
+ * with `version: '0.0.1'`; an existing block keeps its `version` or lack of
51
+ * one. Creates the `definitions` array if it doesn't exist.
50
52
  */
51
53
  addCustomObject(id: string, content: string, type?: string, opts?: _MutationOptions<_StripeAppManifest>): this;
52
54
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"stripe-app-manifest.d.ts","sourceRoot":"","sources":["../../../src/file-editor/facades/stripe-app-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAyB,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;GAOG;AACH,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GAAG,GAAG,MAAM,GAAG,OAAO,IAAI,MAAM,EAAE,CAAC;AAEhE,gBAAgB;AAChB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAA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CAAC,aAAa,EAAE;gBACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;aAC1B,CAAC;SACH,EAAE,CAAC;KACL,CAAC;CACH;AAED,gBAAgB;AAChB,qBAAa,qBAAsB,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IAC/D,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,GAAG,IAAI;IAIxE,UAAU,CACf,OAAO,EAAE,cAAc,EACvB,IAAI,CAAC,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,GAC1C,IAAI;IAIA,aAAa,CAClB,UAAU,EAAE,iBAAiB,EAC7B,IAAI,CAAC,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,GAC1C,IAAI;IASA,gBAAgB,CACrB,UAAU,EAAE,iBAAiB,EAC7B,IAAI,CAAC,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,GAC1C,IAAI;IAMP;;;;;OAKG;IACI,eAAe,CACpB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,IAAI,SAAe,EACnB,IAAI,CAAC,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,GAC1C,IAAI;IAeP;;OAEG;IACI,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;CAK5C;AAED,gBAAgB;AAChB,wBAAsB,sBAAsB,CAC1C,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACnC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CACvB,GACL,OAAO,CAAC,qBAAqB,CAAC,CAiBhC"}
package/dist/index.cjs CHANGED
@@ -2777,11 +2777,12 @@ var _StripeAppManifestDoc = class extends _Document {
2777
2777
  }
2778
2778
  /**
2779
2779
  * Add a custom object definition. Uses arrayUpsert to avoid duplicates
2780
- * (keyed on `id`). Creates the `custom_object_definitions.definitions`
2781
- * array if it doesn't exist.
2780
+ * (keyed on `id`). A missing `custom_object_definitions` block is created
2781
+ * with `version: '0.0.1'`; an existing block keeps its `version` or lack of
2782
+ * one. Creates the `definitions` array if it doesn't exist.
2782
2783
  */
2783
2784
  addCustomObject(id, content, type = "typescript", opts) {
2784
- this.addIfMissing("/custom_object_definitions", {}, opts);
2785
+ this.addIfMissing("/custom_object_definitions", { version: "0.0.1" }, opts);
2785
2786
  this.addIfMissing("/custom_object_definitions/definitions", [], opts);
2786
2787
  return this.arrayUpsert(
2787
2788
  "/custom_object_definitions/definitions",
package/dist/index.js CHANGED
@@ -2659,11 +2659,12 @@ var _StripeAppManifestDoc = class extends _Document {
2659
2659
  }
2660
2660
  /**
2661
2661
  * Add a custom object definition. Uses arrayUpsert to avoid duplicates
2662
- * (keyed on `id`). Creates the `custom_object_definitions.definitions`
2663
- * array if it doesn't exist.
2662
+ * (keyed on `id`). A missing `custom_object_definitions` block is created
2663
+ * with `version: '0.0.1'`; an existing block keeps its `version` or lack of
2664
+ * one. Creates the `definitions` array if it doesn't exist.
2664
2665
  */
2665
2666
  addCustomObject(id, content, type = "typescript", opts) {
2666
- this.addIfMissing("/custom_object_definitions", {}, opts);
2667
+ this.addIfMissing("/custom_object_definitions", { version: "0.0.1" }, opts);
2667
2668
  this.addIfMissing("/custom_object_definitions/definitions", [], opts);
2668
2669
  return this.arrayUpsert(
2669
2670
  "/custom_object_definitions/definitions",