@composable-os/pack-bookings 0.1.0-beta.11 → 0.1.0-beta.13

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.
@@ -0,0 +1,146 @@
1
+ /** Which declared words say why the host passed a waiter over (ADR 0520's reasons). */
2
+ export declare function passedOverChoice(reason: string | null): "noUsesLeft" | "notLive" | "notCovered" | "other";
3
+ /**
4
+ * Which booked message a change into `booked` is, or none. The record is read when the run starts,
5
+ * which may be after later changes: a waiter created and then moved in, or a drop-in held and then
6
+ * paid for, is booked by the time its creation's run reads it. Those are told by their own move's
7
+ * run (`promoted`, `paid`), never by the creation's, so each booking gets one booked message. None
8
+ * for a correction (ticked as come, then unticked).
9
+ */
10
+ export declare function bookedKind(change: {
11
+ action: string;
12
+ diff: Record<string, {
13
+ before: unknown;
14
+ after: unknown;
15
+ }>;
16
+ } | undefined, values: Record<string, unknown>): "booked" | "moved" | "paid" | "promoted" | null;
17
+ export declare const bookingConfirmed: import("@composable-os/sdk").AutomationSpec<{
18
+ readonly type: "record";
19
+ readonly object: "bookings.booking";
20
+ readonly on: readonly ["created", "updated"];
21
+ }>;
22
+ export declare const waitlistPassedOver: import("@composable-os/sdk").AutomationSpec<{
23
+ readonly type: "fieldChanged";
24
+ readonly object: "bookings.booking";
25
+ readonly field: "passedOverReason";
26
+ }>;
27
+ export declare const placeFree: import("@composable-os/sdk").AutomationSpec<{
28
+ readonly type: "fieldChanged";
29
+ readonly object: "bookings.booking";
30
+ readonly field: "state";
31
+ readonly from: "booked";
32
+ readonly to: {
33
+ readonly in: readonly ["cancelled", "late_cancelled", "excused"];
34
+ };
35
+ }>;
36
+ export declare const classChanged: import("@composable-os/sdk").AutomationSpec<{
37
+ readonly type: "record";
38
+ readonly object: "bookings.class";
39
+ readonly on: readonly ["updated"];
40
+ readonly includeBulk: true;
41
+ }>;
42
+ export declare const classCancelled: import("@composable-os/sdk").AutomationSpec<{
43
+ readonly type: "fieldChanged";
44
+ readonly object: "bookings.class";
45
+ readonly field: "state";
46
+ readonly from: "scheduled";
47
+ readonly to: "cancelled";
48
+ readonly includeBulk: true;
49
+ }>;
50
+ export declare const classReminder: import("@composable-os/sdk").AutomationSpec<{
51
+ readonly type: "dateRelative";
52
+ readonly object: "bookings.class";
53
+ readonly field: "startsAt";
54
+ readonly minutesBefore: {
55
+ readonly field: "classType.reminderMinutes";
56
+ readonly setting: "reminderMinutes";
57
+ };
58
+ }>;
59
+ export declare const dropInOrder: import("@composable-os/sdk").AutomationSpec<{
60
+ readonly type: "fieldChanged";
61
+ readonly object: "order";
62
+ readonly field: "state";
63
+ readonly to: {
64
+ readonly in: readonly ["paid", "refunded"];
65
+ };
66
+ }>;
67
+ export declare const noAttendanceTaken: import("@composable-os/sdk").AutomationSpec<{
68
+ readonly type: "dateRelative";
69
+ readonly object: "bookings.class";
70
+ readonly field: "endsAt";
71
+ readonly minutesAfter: 60;
72
+ }>;
73
+ export declare const feedbackAfterClass: import("@composable-os/sdk").AutomationSpec<{
74
+ readonly type: "dateRelative";
75
+ readonly object: "bookings.booking";
76
+ readonly field: "markedAt";
77
+ readonly minutesAfter: {
78
+ readonly setting: "feedbackMinutes";
79
+ };
80
+ }>;
81
+ export declare const bookingsAutomations: {
82
+ bookingConfirmed: import("@composable-os/sdk").AutomationSpec<{
83
+ readonly type: "record";
84
+ readonly object: "bookings.booking";
85
+ readonly on: readonly ["created", "updated"];
86
+ }>;
87
+ waitlistPassedOver: import("@composable-os/sdk").AutomationSpec<{
88
+ readonly type: "fieldChanged";
89
+ readonly object: "bookings.booking";
90
+ readonly field: "passedOverReason";
91
+ }>;
92
+ placeFree: import("@composable-os/sdk").AutomationSpec<{
93
+ readonly type: "fieldChanged";
94
+ readonly object: "bookings.booking";
95
+ readonly field: "state";
96
+ readonly from: "booked";
97
+ readonly to: {
98
+ readonly in: readonly ["cancelled", "late_cancelled", "excused"];
99
+ };
100
+ }>;
101
+ classChanged: import("@composable-os/sdk").AutomationSpec<{
102
+ readonly type: "record";
103
+ readonly object: "bookings.class";
104
+ readonly on: readonly ["updated"];
105
+ readonly includeBulk: true;
106
+ }>;
107
+ classCancelled: import("@composable-os/sdk").AutomationSpec<{
108
+ readonly type: "fieldChanged";
109
+ readonly object: "bookings.class";
110
+ readonly field: "state";
111
+ readonly from: "scheduled";
112
+ readonly to: "cancelled";
113
+ readonly includeBulk: true;
114
+ }>;
115
+ classReminder: import("@composable-os/sdk").AutomationSpec<{
116
+ readonly type: "dateRelative";
117
+ readonly object: "bookings.class";
118
+ readonly field: "startsAt";
119
+ readonly minutesBefore: {
120
+ readonly field: "classType.reminderMinutes";
121
+ readonly setting: "reminderMinutes";
122
+ };
123
+ }>;
124
+ dropInOrder: import("@composable-os/sdk").AutomationSpec<{
125
+ readonly type: "fieldChanged";
126
+ readonly object: "order";
127
+ readonly field: "state";
128
+ readonly to: {
129
+ readonly in: readonly ["paid", "refunded"];
130
+ };
131
+ }>;
132
+ noAttendanceTaken: import("@composable-os/sdk").AutomationSpec<{
133
+ readonly type: "dateRelative";
134
+ readonly object: "bookings.class";
135
+ readonly field: "endsAt";
136
+ readonly minutesAfter: 60;
137
+ }>;
138
+ feedbackAfterClass: import("@composable-os/sdk").AutomationSpec<{
139
+ readonly type: "dateRelative";
140
+ readonly object: "bookings.booking";
141
+ readonly field: "markedAt";
142
+ readonly minutesAfter: {
143
+ readonly setting: "feedbackMinutes";
144
+ };
145
+ }>;
146
+ };