@final-commerce/command-frame 0.7.0-staging.3 → 0.8.0-online.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.
Files changed (76) hide show
  1. package/dist/CommonTypes.d.ts +1 -11
  2. package/dist/actions/start-checkout/action.d.ts +6 -0
  3. package/dist/actions/start-checkout/action.js +8 -0
  4. package/dist/actions/start-checkout/mock.d.ts +16 -0
  5. package/dist/actions/start-checkout/mock.js +80 -0
  6. package/dist/actions/start-checkout/types.d.ts +81 -0
  7. package/dist/actions/start-checkout/types.js +10 -0
  8. package/dist/demo/database.d.ts +1 -8
  9. package/dist/demo/database.js +0 -93
  10. package/dist/index.d.ts +4 -16
  11. package/dist/index.js +3 -15
  12. package/dist/projects/render/mocks.js +2 -14
  13. package/dist/projects/render/types.d.ts +7 -8
  14. package/dist/pubsub/topics/checkout/checkout-started/types.d.ts +26 -0
  15. package/dist/pubsub/topics/checkout/index.d.ts +7 -0
  16. package/dist/pubsub/topics/checkout/index.js +28 -0
  17. package/dist/pubsub/topics/checkout/payment-completed/types.d.ts +19 -0
  18. package/dist/pubsub/topics/checkout/payment-failed/types.d.ts +20 -0
  19. package/dist/pubsub/topics/checkout/types.d.ts +12 -0
  20. package/dist/pubsub/topics/checkout/types.js +8 -0
  21. package/dist/pubsub/topics/index.d.ts +17 -17
  22. package/dist/pubsub/topics/index.js +17 -17
  23. package/dist/pubsub/topics/types.d.ts +8 -2
  24. package/package.json +2 -2
  25. package/dist/actions/add-booking-to-cart/action.d.ts +0 -6
  26. package/dist/actions/add-booking-to-cart/action.js +0 -8
  27. package/dist/actions/add-booking-to-cart/mock.d.ts +0 -2
  28. package/dist/actions/add-booking-to-cart/mock.js +0 -8
  29. package/dist/actions/add-booking-to-cart/types.d.ts +0 -23
  30. package/dist/actions/cancel-booking/action.d.ts +0 -6
  31. package/dist/actions/cancel-booking/action.js +0 -8
  32. package/dist/actions/cancel-booking/mock.d.ts +0 -2
  33. package/dist/actions/cancel-booking/mock.js +0 -10
  34. package/dist/actions/cancel-booking/types.d.ts +0 -10
  35. package/dist/actions/get-booking-availability/action.d.ts +0 -6
  36. package/dist/actions/get-booking-availability/action.js +0 -8
  37. package/dist/actions/get-booking-availability/mock.d.ts +0 -2
  38. package/dist/actions/get-booking-availability/mock.js +0 -6
  39. package/dist/actions/get-booking-availability/types.d.ts +0 -18
  40. package/dist/actions/get-booking-resources/action.d.ts +0 -6
  41. package/dist/actions/get-booking-resources/action.js +0 -8
  42. package/dist/actions/get-booking-resources/mock.d.ts +0 -2
  43. package/dist/actions/get-booking-resources/mock.js +0 -7
  44. package/dist/actions/get-booking-resources/types.d.ts +0 -12
  45. package/dist/actions/get-booking-resources/types.js +0 -1
  46. package/dist/actions/get-bookings/action.d.ts +0 -6
  47. package/dist/actions/get-bookings/action.js +0 -8
  48. package/dist/actions/get-bookings/mock.d.ts +0 -2
  49. package/dist/actions/get-bookings/mock.js +0 -20
  50. package/dist/actions/get-bookings/types.d.ts +0 -18
  51. package/dist/actions/get-bookings/types.js +0 -1
  52. package/dist/actions/hold-booking/action.d.ts +0 -6
  53. package/dist/actions/hold-booking/action.js +0 -8
  54. package/dist/actions/hold-booking/mock.d.ts +0 -2
  55. package/dist/actions/hold-booking/mock.js +0 -33
  56. package/dist/actions/hold-booking/types.d.ts +0 -24
  57. package/dist/actions/hold-booking/types.js +0 -1
  58. package/dist/actions/remove-booking-from-cart/action.d.ts +0 -6
  59. package/dist/actions/remove-booking-from-cart/action.js +0 -8
  60. package/dist/actions/remove-booking-from-cart/mock.d.ts +0 -2
  61. package/dist/actions/remove-booking-from-cart/mock.js +0 -16
  62. package/dist/actions/remove-booking-from-cart/types.d.ts +0 -12
  63. package/dist/actions/remove-booking-from-cart/types.js +0 -1
  64. package/dist/pubsub/topics/bookings/booking-created/types.d.ts +0 -6
  65. package/dist/pubsub/topics/bookings/booking-created/types.js +0 -1
  66. package/dist/pubsub/topics/bookings/booking-setup-changed/types.d.ts +0 -15
  67. package/dist/pubsub/topics/bookings/booking-setup-changed/types.js +0 -1
  68. package/dist/pubsub/topics/bookings/booking-updated/types.d.ts +0 -6
  69. package/dist/pubsub/topics/bookings/booking-updated/types.js +0 -1
  70. package/dist/pubsub/topics/bookings/index.d.ts +0 -3
  71. package/dist/pubsub/topics/bookings/index.js +0 -27
  72. package/dist/pubsub/topics/bookings/types.d.ts +0 -8
  73. package/dist/pubsub/topics/bookings/types.js +0 -3
  74. /package/dist/{actions/add-booking-to-cart → pubsub/topics/checkout/checkout-started}/types.js +0 -0
  75. /package/dist/{actions/cancel-booking → pubsub/topics/checkout/payment-completed}/types.js +0 -0
  76. /package/dist/{actions/get-booking-availability → pubsub/topics/checkout/payment-failed}/types.js +0 -0
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import type { CFBooking } from '../../../../CommonTypes';
2
- import type { TopicEvent } from '../../../types';
3
- export interface BookingCreatedPayload {
4
- booking: CFBooking;
5
- }
6
- export type BookingCreatedEvent = TopicEvent<BookingCreatedPayload>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- import type { TopicEvent } from '../../../types';
2
- /**
3
- * What a booking can be MADE of changed — a rule set, a resource, who serves a product, or where
4
- * a resource works. Occupancy is untouched.
5
- *
6
- * Deliberately carries no row: the change can span several collections at once (a rule set edited
7
- * AND a product↔resource link removed), and a subscriber cannot act on a partial picture anyway.
8
- * The only correct reaction is to re-ask `getBookingResources` and `getBookingAvailability`,
9
- * because both previous answers were computed from the old setup.
10
- */
11
- export interface BookingSetupChangedPayload {
12
- /** Which collection moved, when the host knows: `booking-rules`, `booking-resources`, … */
13
- collection?: string;
14
- }
15
- export type BookingSetupChangedEvent = TopicEvent<BookingSetupChangedPayload>;
@@ -1,6 +0,0 @@
1
- import type { CFBooking } from '../../../../CommonTypes';
2
- import type { TopicEvent } from '../../../types';
3
- export interface BookingUpdatedPayload {
4
- booking: CFBooking;
5
- }
6
- export type BookingUpdatedEvent = TopicEvent<BookingUpdatedPayload>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import type { TopicDefinition } from '../../types';
2
- export declare const bookingsTopic: TopicDefinition;
3
- export * from './types';
@@ -1,27 +0,0 @@
1
- export const bookingsTopic = {
2
- id: 'bookings',
3
- name: 'Bookings',
4
- description: 'Topic for bookings synced from the database. A booking IS the occupancy, so this is the ' +
5
- 'signal that somebody else took (or freed) a window: re-ask getBookingAvailability when it ' +
6
- 'fires instead of polling the server on a timer.',
7
- eventTypes: [
8
- {
9
- id: 'booking-created',
10
- name: 'Booking Created',
11
- description: 'Published when a booking made elsewhere — another till, the back office — is synced in',
12
- },
13
- {
14
- id: 'booking-updated',
15
- name: 'Booking Updated',
16
- description: 'Published when a synced booking changes: confirmed after payment, cancelled, or expired',
17
- },
18
- {
19
- id: 'booking-setup-changed',
20
- name: 'Booking Setup Changed',
21
- description: 'Published when what a booking can be MADE of changes: a rule set, a resource, who serves ' +
22
- 'a product, or where a resource works. Occupancy is untouched — re-ask getBookingResources ' +
23
- 'and getBookingAvailability, because both answers were computed from the old setup.',
24
- },
25
- ],
26
- };
27
- export * from './types';
@@ -1,8 +0,0 @@
1
- export * from './booking-created/types';
2
- export * from './booking-updated/types';
3
- export * from './booking-setup-changed/types';
4
- import type { BookingCreatedPayload } from './booking-created/types';
5
- import type { BookingUpdatedPayload } from './booking-updated/types';
6
- import type { BookingSetupChangedPayload } from './booking-setup-changed/types';
7
- export type BookingsEventPayload = BookingCreatedPayload | BookingUpdatedPayload | BookingSetupChangedPayload;
8
- export type BookingsEventType = 'booking-created' | 'booking-updated' | 'booking-setup-changed';
@@ -1,3 +0,0 @@
1
- export * from './booking-created/types';
2
- export * from './booking-updated/types';
3
- export * from './booking-setup-changed/types';