@ordinatio/scheduling 0.8.0 → 0.9.0

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,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.0 (prepared 2026-11-21)
4
+
5
+ - **A booking paid in full with a gift certificate needs no payment id.** `bookAppointment` used to refuse a paid appointment type with no `paymentId` (`SCHED_400`). It now also accepts one whose `paymentProvider` is `GIFT_PAYMENT_PROVIDER` (`'gift_certificate'`, exported): the caller has checked the certificate, and must spend it with `redeemGiftCertificate` on the new appointment. Any other provider name still needs a `paymentId`. Nothing else changes, and a host that never sets that provider sees no difference.
6
+
3
7
  ## 0.8.0 (prepared 2026-11-19)
4
8
 
5
9
  - **New: gift certificates.** Two new tables, `GiftCertificate` and `GiftCertificateTransaction` (migration `20261119000000_gift_certificates`, or `20261119000000_scheduling_gift_certificates` in the host database package; apply it before using certificates). A certificate is prepaid value in whole cents with a 12-character code (an alphabet without look-alikes, drawn with a cryptographic generator, stored upper case without hyphens, shown in groups of four with `formatGiftCode`). `issueGiftCertificate(db, organizationId, { amountCents, currency?, expiresAt?, recipientName?, recipientEmail?, purchaserName?, purchaserEmail?, message?, paymentId?, notes? }, createdByUserId?)` makes one worth 100 to 1,000,000 cents; the caller cannot choose the code or the balance. `listGiftCertificates`, `getGiftCertificate` (with its history) and `voidGiftCertificate` are scoped to the business. `checkGiftCertificate(db, organizationId, code)` tells a code holder only the balance, currency, expiry and state (`ACTIVE`, `VOID`, `EXPIRED`, `USED_UP`), and answers null for a malformed, unknown or another business's code, so codes cannot be probed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ordinatio/scheduling",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "license": "MIT",
5
5
  "description": "Scheduling engine for appointment-based businesses. API-first, no iframes.",
6
6
  "main": "./dist/index.js",