riverbankcms 0.15.0 → 0.17.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.
@@ -1778,10 +1778,21 @@ function isSettleableOrderInstalmentPlanStatus(status) {
1778
1778
  function isSettleableFlexibleBalanceContractStatus(status) {
1779
1779
  return isLiveFlexibleBalanceContractStatus(status) && !CONTRACT_COLLECTION_IN_FLIGHT[status];
1780
1780
  }
1781
- function decideContractClosureForFailedOrder(status) {
1781
+ /** Shared reason for closing either form of booking payment terms. */
1782
+ const PAYMENT_TERMS_CLOSURE_REASONS = ["cancelled", "refunded"];
1783
+ /** Refund closure records its outcome even when collection has already ended. */
1784
+ function decideContractClosure(status, reason) {
1785
+ if (reason === "refunded") {
1786
+ return status === "refunded" ? { kind: "keep" } : {
1787
+ kind: "close",
1788
+ from: status,
1789
+ to: "refunded"
1790
+ };
1791
+ }
1782
1792
  return isLiveFlexibleBalanceContractStatus(status) ? {
1783
1793
  kind: "close",
1784
- from: status
1794
+ from: status,
1795
+ to: "closed_order_failed"
1785
1796
  } : { kind: "keep" };
1786
1797
  }
1787
1798
 
@@ -6254,7 +6265,6 @@ const SECRET_KINDS = [
6254
6265
  "webhook-secret",
6255
6266
  "oauth-access-token",
6256
6267
  "oauth-refresh-token",
6257
- "preview-session-refresh-token",
6258
6268
  "oauth-authorization-code",
6259
6269
  "oauth-pkce-verifier",
6260
6270
  "registrar-epp-code"
@@ -7368,4 +7378,54 @@ function eventCatalogueChoices(catalogue) {
7368
7378
  }
7369
7379
 
7370
7380
  //#endregion
7371
- export { validateBookingPaymentOptionKinds as $, footerNavigationLayouts as A, unsafeAsOccurrenceId as At, formatBookingDate as B, unsafeAsStorageBucketName as Bt, parseMailingListContentVersionId as C, unsafeAsDemoCapability as Ct, sameMailingListPlacementTargeting as D, unsafeAsEventSeriesId as Dt, planMailingListChoicePresentation as E, unsafeAsEventOfferingId as Et, isPresent as F, unsafeAsSafeDownloadFilename as Ft, getBookingLocalDateKey as G, ok as Gt, formatBookingTime as H, unsafeAsUploadSessionId as Ht, normalizeLocationAddressText as I, unsafeAsSiteFontId as It, parseUtcIsoDateTimeString as J, getLocalScheduleDate as K, toLocationCoordinates as L, unsafeAsSiteId as Lt, parseMailingListPlacementTargeting as M, unsafeAsPositiveByteCount as Mt, isCanonicalRichTextDoc as N, unsafeAsPositiveSeconds as Nt, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as O, unsafeAsFileChecksumSha256 as Ot, assertAllowedPublicUrl as P, unsafeAsProductId as Pt, parseBookingTimeZone as Q, selectCategoryView as R, unsafeAsSiteScopedStoragePath as Rt, parseMailingListBlockId as S, unsafeAsDeclaredMimeType as St, parseMailingListRuntimeContext as T, unsafeAsEntitlementId as Tt, formatLocalScheduleDate as U, unsafeAsUserId as Ut, formatBookingDateParts as V, unsafeAsStoragePath as Vt, formatLocalScheduleTime as W, err as Wt, toScheduledBookingDateRange as X, toBookingTimeZone as Y, toScheduledBookingDateTime as Z, createSecret as _, parseSiteId as _t, parseVerticalId as a, publicEventPricingDisplay as at, stableJsonStringify as b, unsafeAsBookingRequirementId as bt, DEFAULT_EVENT_TYPE_PRESETS as c, resolvePricingOptionsPriceDisplay as ct, SURFACE_EVENT_PRESET_VALUES as d, formatCurrencyAmount as dt, parseEventPageSurfaceSubject as et, WHOLE_SERIES_EVENT_PRESET_VALUES as f, assertNever as ft, resolveWholeSeriesBookingPhase as g, parsePageId as gt, orderedLiveRunSessions as h, parseMediaAssetId as ht, canonicalizeConfiguredBookingVerticalConfig as i, publicEventPricingCurrency as it, parseFooterCompositionV1 as j, unsafeAsOriginalFilename as jt, parseMailingListProviderScope as k, unsafeAsMediaAssetId as kt, EVENT_PRESET_VALUES as l, fromArray as lt, CANCELLED_SESSION_STATUS as m, parseEventSeriesId as mt, NAVIGATION_LOCATIONS as n, formatEventPricing as nt, parseVerticalPresetId as o, publicEventPricingType as ot, publicReadFreshnessSeconds as p, parseApiKeyId as pt, getLocalScheduleTime as q, areConfiguredBookingVerticalConfigsEqual as r, isPublicEventPricingOptionDisplayable as rt, resolveSiteVerticalBookingConfig as s, resolveExactOrFreePriceDisplay as st, resolveEventCatalogue as t, formatBookingPriceDisplay as tt, ORDINARY_EVENT_PRESET_VALUES as u, mapNonEmptyArray as ut, exposeSecret as v, parseUserId as vt, parseMailingListSignedSourceToken as w, unsafeAsDetectedMimeType as wt, buildMailingListSignupBlockSourceRef as x, unsafeAsBookingSessionId as xt, parseManagementKey as y, unsafeAsAppointmentResourceId as yt, buildBookingUtcDateWindow as z, unsafeAsStaffMemberId as zt };
7381
+ //#region ../core/src/patch/index.ts
7382
+ function settableFrom(wireValue) {
7383
+ return wireValue === undefined ? { kind: "keep" } : {
7384
+ kind: "set",
7385
+ value: wireValue
7386
+ };
7387
+ }
7388
+ function clearableFrom(wireValue) {
7389
+ return wireValue === undefined ? { kind: "keep" } : wireValue === null ? { kind: "clear" } : {
7390
+ kind: "set",
7391
+ value: wireValue
7392
+ };
7393
+ }
7394
+ function applySettable(stored, change) {
7395
+ switch (change.kind) {
7396
+ case "keep": return stored;
7397
+ case "set": return change.value;
7398
+ default: return assertNever(change);
7399
+ }
7400
+ }
7401
+ function applyClearable(stored, change) {
7402
+ switch (change.kind) {
7403
+ case "keep": return stored;
7404
+ case "set": return change.value;
7405
+ case "clear": return null;
7406
+ default: return assertNever(change);
7407
+ }
7408
+ }
7409
+ /** A null deletes a key; protected keys are refused even when their value agrees. */
7410
+ function mergeBag(stored, patch, options) {
7411
+ const keys = options.protectedKeys.filter((key) => Object.prototype.hasOwnProperty.call(patch, key));
7412
+ if (keys.length > 0) return {
7413
+ ok: false,
7414
+ error: {
7415
+ kind: "protected-keys",
7416
+ keys
7417
+ }
7418
+ };
7419
+ const retained = Object.fromEntries(Object.entries(stored).filter(([key]) => !Object.prototype.hasOwnProperty.call(patch, key) || patch[key] !== null));
7420
+ const supplied = Object.fromEntries(Object.entries(patch).filter((entry) => entry[1] !== undefined && entry[1] !== null));
7421
+ return {
7422
+ ok: true,
7423
+ value: {
7424
+ ...retained,
7425
+ ...supplied
7426
+ }
7427
+ };
7428
+ }
7429
+
7430
+ //#endregion
7431
+ export { parseBookingTimeZone as $, unsafeAsEventOfferingId as $t, footerNavigationLayouts as A, parseCurrencyCode as At, buildBookingUtcDateWindow as B, parsePageId as Bt, parseMailingListContentVersionId as C, isNonNegativeWholeCents as Ct, sameMailingListPlacementTargeting as D, unsafeAsNonNegativeCents as Dt, planMailingListChoicePresentation as E, toNonNegativeCents as Et, assertAllowedPublicUrl as F, parseDatedOfferingCapacityHoldAuditRef as Ft, formatLocalScheduleTime as G, unsafeAsBookingRequirementId as Gt, formatBookingDateParts as H, parseSiteId as Ht, isPresent as I, parseDatedOfferingCapacityHoldId as It, getLocalScheduleTime as J, unsafeAsDeclaredMimeType as Jt, getBookingLocalDateKey as K, unsafeAsBookingSessionId as Kt, normalizeLocationAddressText as L, parseEventSeriesId as Lt, parseMailingListPlacementTargeting as M, formatDurationUnitLabel as Mt, isCanonicalRichTextDoc as N, parseApiKeyId as Nt, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as O, unsafeAsPositiveCents as Ot, parsePublicContactDetails as P, parseCustomerId as Pt, toScheduledBookingDateTime as Q, unsafeAsEventInstanceId as Qt, toLocationCoordinates as R, parseMediaAssetId as Rt, parseMailingListBlockId as S, mapNonEmptyArray as St, parseMailingListRuntimeContext as T, toCents as Tt, formatBookingTime as U, parseUserId as Ut, formatBookingDate as V, parseRetiredCourseId as Vt, formatLocalScheduleDate as W, unsafeAsAppointmentResourceId as Wt, toBookingTimeZone as X, unsafeAsDetectedMimeType as Xt, parseUtcIsoDateTimeString as Y, unsafeAsDemoCapability as Yt, toScheduledBookingDateRange as Z, unsafeAsEntitlementId as Zt, createSecret as _, unsafeAsUploadSessionId as _n, publicEventPricingDisplay as _t, parseVerticalId as a, unsafeAsPassId as an, clampConfiguredAmount as at, stableJsonStringify as b, ok as bn, resolvePricingOptionsPriceDisplay as bt, DEFAULT_EVENT_TYPE_PRESETS as c, unsafeAsPricingOptionId as cn, omitZeroAmountFutureRows as ct, SURFACE_EVENT_PRESET_VALUES as d, unsafeAsSiteFontId as dn, resolveFlexibleBalanceInitialPaymentCents as dt, unsafeAsEventSeriesId as en, validateBookingPaymentOptionKinds as et, WHOLE_SERIES_EVENT_PRESET_VALUES as f, unsafeAsSiteId as fn, parseEventPageSurfaceSubject as ft, resolveWholeSeriesBookingPhase as g, unsafeAsStoragePath as gn, publicEventPricingCurrency as gt, orderedLiveRunSessions as h, unsafeAsStorageBucketName as hn, isPublicEventPricingOptionDisplayable as ht, canonicalizeConfiguredBookingVerticalConfig as i, unsafeAsOriginalFilename as in, addIntervalPreservingMonthAnchor as it, parseFooterCompositionV1 as j, assertNever as jt, parseMailingListProviderScope as k, formatCurrencyAmount as kt, EVENT_PRESET_VALUES as l, unsafeAsProductId as ln, splitAmountWithRemainderInFirst as lt, CANCELLED_SESSION_STATUS as m, unsafeAsStaffMemberId as mn, formatEventPricing as mt, NAVIGATION_LOCATIONS as n, unsafeAsMediaAssetId as nn, isSettleableFlexibleBalanceContractStatus as nt, parseVerticalPresetId as o, unsafeAsPositiveByteCount as on, getBookingInstalmentDepositRefundability as ot, publicReadFreshnessSeconds as p, unsafeAsSiteScopedStoragePath as pn, formatBookingPriceDisplay as pt, getLocalScheduleDate as q, unsafeAsCheckoutLineId as qt, areConfiguredBookingVerticalConfigsEqual as r, unsafeAsOccurrenceId as rn, isSettleableOrderInstalmentPlanStatus as rt, resolveSiteVerticalBookingConfig as s, unsafeAsPositiveSeconds as sn, getBookingInstalmentProtectedDepositAmountCents as st, resolveEventCatalogue as t, unsafeAsFileChecksumSha256 as tn, isLiveOrderInstalmentPlanStatus as tt, ORDINARY_EVENT_PRESET_VALUES as u, unsafeAsSafeDownloadFilename as un, resolveFlexibleBalanceDueAt as ut, exposeSecret as v, unsafeAsUserId as vn, publicEventPricingType as vt, parseMailingListSignedSourceToken as w, parseNonNegativeCents as wt, buildMailingListSignupBlockSourceRef as x, fromArray as xt, parseManagementKey as y, err as yn, resolveExactOrFreePriceDisplay as yt, selectCategoryView as z, parseMembershipId as zt };
package/dist/testing.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import "./sdk-event-upsert-TGjuLLJp.mjs";
3
- import "./src-DQ0xnGOE.mjs";
4
- import { n as syncLocalMediaForPush, r as syncLocalMediaForPull, y as writeMediaManifest } from "./local-sync-But5fsta.mjs";
2
+ import "./sdk-event-upsert-BfdOApMM.mjs";
3
+ import "./src-DwdPY0Os.mjs";
4
+ import { n as syncLocalMediaForPush, r as syncLocalMediaForPull, y as writeMediaManifest } from "./local-sync-Cnqnhvry.mjs";
5
5
 
6
6
  export { syncLocalMediaForPull, syncLocalMediaForPush, writeMediaManifest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "riverbankcms",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "description": "Riverbank CMS command-line tools for SDK site developers",
5
5
  "bin": {
6
6
  "riverbankcms": "dist/cli/index.mjs"
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { t as loadConfigFile } from "./load-config-4qWCVvBe.mjs";
3
-
4
- export { loadConfigFile };