@crvouga/mockingbird-service-stripe 3.3.0 → 3.3.1

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/CHANGELOG.md CHANGED
@@ -1,15 +1,18 @@
1
1
  # Changelog — @crvouga/mockingbird-service-stripe
2
2
 
3
+ ## 3.3.1 (2026-10-15)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - validate cursors before invoice filters ([a5851e6](https://github.com/crvouga/mockingbird/commit/a5851e62d8b44147bdd59fcf9b8c33798085470f))
8
+ - resolve snapshot, promotion and webhook issues ([75fb79f](https://github.com/crvouga/mockingbird/commit/75fb79f9a999bf0af29c4ec07fde4f1d7a1f0c22))
9
+
3
10
  ## 3.3.0 (2026-10-12)
4
11
 
5
12
  ### Features
6
13
 
7
14
  - unify the emulator control plane ([2068547](https://github.com/crvouga/mockingbird/commit/2068547bedde4e2e2331c1657c1a78120e84428b))
8
15
 
9
- ### Dependencies
10
-
11
- - `@crvouga/mockingbird-service-sqlite`
12
-
13
16
  ## 3.2.0 (2026-10-08)
14
17
 
15
18
  ### Features
package/README.md CHANGED
@@ -359,6 +359,12 @@ subscriptions are never recorded. The membership lookup keys our env expects
359
359
  (`membership_<tier>_<interval>`, e.g. `membership_plus_annually`) are attached to the matching
360
360
  recorded prices (listed in `synthesizedLookupKeys`). Pass your own with `createRuntime({corpus})`.
361
361
 
362
+ ### Promotion-code lookup
363
+
364
+ `GET /v1/promotion_codes?code=...` matches the complete code case-insensitively, as documented
365
+ by [Stripe](https://docs.stripe.com/api/promotion_codes/list), and preserves its stored spelling.
366
+ The filter composes with `active`, `coupon`, customer, created-time and pagination filters.
367
+
362
368
  ## API
363
369
 
364
370
  `StripeAPI` is the engine; `createRuntime` wraps it in the service contract. From
@@ -7,7 +7,7 @@ import {
7
7
  resolveAdminPrefix,
8
8
  restoreClock,
9
9
  validateAccounts
10
- } from "./chunk-ESFURE4Z.js";
10
+ } from "./chunk-NLXVX6IV.js";
11
11
 
12
12
  // src/server.ts
13
13
  import { readFileSync } from "node:fs";
@@ -987,4 +987,4 @@ export {
987
987
  createServer2 as createServer,
988
988
  serveTarget
989
989
  };
990
- //# sourceMappingURL=chunk-N7LLU7DT.js.map
990
+ //# sourceMappingURL=chunk-5TMQKXTS.js.map
@@ -3862,7 +3862,7 @@ var stateAdminRoutes = (routes) => {
3862
3862
  };
3863
3863
 
3864
3864
  // ../core/dist/version.js
3865
- var PACKAGE_VERSION = true ? "3.3.0" : UNRELEASED_VERSION;
3865
+ var PACKAGE_VERSION = true ? "3.3.1" : UNRELEASED_VERSION;
3866
3866
 
3867
3867
  // ../core/dist/signing.js
3868
3868
  var encoder = new TextEncoder();
@@ -14946,12 +14946,15 @@ var customerHandlers = (services) => {
14946
14946
  const scope = requestScope(services, context);
14947
14947
  const params = queryParams(context);
14948
14948
  const id = context.params.customer ?? "";
14949
- if (params.invoice === "") throw parameterInvalidEmpty("invoice");
14950
14949
  const page = await paginate(scope.account.balanceTransactions, params, {
14951
14950
  url: `/v1/customers/${id}/balance_transactions`,
14952
14951
  // Stripe names an unknown cursor on this list by its internal model.
14953
14952
  kind: "abstracttransaction",
14954
14953
  rejectEmptyCursors: true,
14954
+ // Stripe validates the invoice filter after pagination cursors (live seed 1057600108).
14955
+ check: () => {
14956
+ if (params.invoice === "") throw parameterInvalidEmpty("invoice");
14957
+ },
14955
14958
  where: (record) => record.customer === id && matchesCreated(record.created, params.created),
14956
14959
  render: renderCustomerBalanceTransaction
14957
14960
  });
@@ -15720,7 +15723,7 @@ var promotionCodeHandlers = (services) => {
15720
15723
  const page = await paginate(scope.account.promotionCodes, params, {
15721
15724
  url: "/v1/promotion_codes",
15722
15725
  kind: "promotion code",
15723
- where: (record) => matchesCreated(record.created, params.created) && (code === null || record.code === code) && (customer === null || record.customer === customer) && (coupon === null || record.coupon === coupon) && (active === void 0 || record.active === active),
15726
+ where: (record) => matchesCreated(record.created, params.created) && (code === null || record.code.toLowerCase() === code.toLowerCase()) && (customer === null || record.customer === customer) && (coupon === null || record.coupon === coupon) && (active === void 0 || record.active === active),
15724
15727
  render: (record) => renderPromotionExpanded(scope, record, params.expand)
15725
15728
  });
15726
15729
  return jsonRes(200, page);
@@ -21152,4 +21155,4 @@ export {
21152
21155
  createRuntime2 as createRuntime,
21153
21156
  StripeAPI
21154
21157
  };
21155
- //# sourceMappingURL=chunk-ESFURE4Z.js.map
21158
+ //# sourceMappingURL=chunk-NLXVX6IV.js.map