@stacksjs/defaults 0.75.139 → 0.75.141

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.
@@ -807,7 +807,7 @@ Guidance: [`stacks-sms`](../stacks-sms/SKILL.md). Source: [storage/framework/cor
807
807
 
808
808
  Declared runtime exports: `SMS`, `TwilioDriver`, `VonageDriver`, `createTwilioDriver`, `createVonageDriver`.
809
809
 
810
- Local source modules: [src/compliance.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/compliance.ts), [src/drivers/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/drivers/index.ts), [src/drivers/twilio.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/drivers/twilio.ts), [src/drivers/vonage.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/drivers/vonage.ts), [src/opt-out.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/opt-out.ts), [src/sms.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/sms.ts).
810
+ Local source modules: [src/compliance.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/compliance.ts), [src/drivers/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/drivers/index.ts), [src/drivers/twilio.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/drivers/twilio.ts), [src/drivers/vonage.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/drivers/vonage.ts), [src/inbound.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/inbound.ts), [src/opt-out.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/opt-out.ts), [src/sms.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/sms.ts).
811
811
 
812
812
  Evidence directory: [5 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
813
813
 
@@ -117,7 +117,7 @@ const changed = await Payment.changeSubscription(user, 'enterprise-monthly')
117
117
 
118
118
  `isValid()` returns `true` if the subscription status is `'active'` or `'trialing'`. `isIncomplete()` checks for `'incomplete'` status.
119
119
 
120
- `cancelSubscription(id, immediately)` is gone: its `false` also cancelled at once, only with a proration. For Stripe's `prorate` / `invoice_now`, call `manageSubscription.cancel(id, params)`.
120
+ `cancelSubscription(id, immediately)` is gone: its `false` also cancelled at once, only with a proration. For Stripe's `prorate` / `invoice_now`, call `manageSubscription.cancel(id, params)`. To undo a cancel at period end before the period ends, call `manageSubscription.resume(id)`: Stripe renews again and the stored `ends_at` is cleared. Both use a fresh idempotency key per attempt, so cancel → resume → cancel within Stripe's 24-hour key window still reaches Stripe each time.
121
121
 
122
122
  ### Customers
123
123
 
@@ -403,6 +403,21 @@ normalizes its payload. `classifySmsIntent/smsComplianceReply` are pure helpers;
403
403
  they do not themselves persist consent. Use the persistent handleInboundSms
404
404
  workflow when consent state must affect future sends.
405
405
 
406
+ For a Twilio incoming-message webhook, `handleTwilioInbound(request, options)`
407
+ does the whole job and returns the TwiML `Response`: it reads the form body,
408
+ verifies `X-Twilio-Signature` with `TWILIO_AUTH_TOKEN` against `APP_URL` plus
409
+ the request path (`publicUrl` overrides it; behind a proxy the request's own
410
+ URL is not what Twilio signed), records STOP/START in `sms_opt_outs`, then
411
+ calls `onConsentChange({ phone, kind })` so the app can switch its own
412
+ preferences, and `onMessage(message)` for every verified text. Without a token
413
+ it answers 503, and a bad signature 403, changing nothing. It does not reply to
414
+ keywords unless `reply: true`, because Twilio's own opt-out handling already
415
+ answers STOP/START/HELP and a second reply arrives twice. Twilio Advanced
416
+ Opt-Out's `OptOutType` field wins over the keyword list (`inboundSmsKind`), so
417
+ custom keywords configured there count. `inboundSmsReply(kind)` is the reply
418
+ copy `handleInboundSms` uses. Route it with `skipCsrf()` and point the number's
419
+ incoming-message webhook (HTTP POST) at it.
420
+
406
421
  `estimateSmsSegments(body)` reports GSM-7/UCS-2 estimates; provider billing is
407
422
  authoritative. `isWithinSmsQuietHours(date, { startHour, endHour, timezone? })`
408
423
  is a policy helper, not an automatic send gate. Config keys such as spend caps
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.139",
5
+ "version": "0.75.141",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.139",
5
+ "version": "0.75.141",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "@iconify-json/f7": "^1.2.2",
57
57
  "@iconify-json/hugeicons": "^1.2.35",
58
- "@stacksjs/mobile": "0.75.139",
58
+ "@stacksjs/mobile": "0.75.141",
59
59
  "@stacksjs/sanitizer": "^0.2.422",
60
60
  "@xterm/addon-fit": "^0.11.0",
61
61
  "@xterm/xterm": "^6.0.0",