formanitor 0.2.2 → 0.2.3
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/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -44,6 +44,8 @@ interface CampBookingConfig {
|
|
|
44
44
|
* If omitted, all values except `campDateFieldId` and `slotFieldId` are included.
|
|
45
45
|
*/
|
|
46
46
|
bookingFormDataFields?: string[];
|
|
47
|
+
/** Optional loyalty entitlement sent as `entitlement_id` in the booking payload. */
|
|
48
|
+
entitlementId?: number;
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
49
51
|
* Persistence provider that submits form values to the camp booking endpoint:
|
package/dist/index.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ interface CampBookingConfig {
|
|
|
44
44
|
* If omitted, all values except `campDateFieldId` and `slotFieldId` are included.
|
|
45
45
|
*/
|
|
46
46
|
bookingFormDataFields?: string[];
|
|
47
|
+
/** Optional loyalty entitlement sent as `entitlement_id` in the booking payload. */
|
|
48
|
+
entitlementId?: number;
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
49
51
|
* Persistence provider that submits form values to the camp booking endpoint:
|
package/dist/index.mjs
CHANGED
|
@@ -46,6 +46,7 @@ var CampBookingPersistenceProvider = class {
|
|
|
46
46
|
baseUrl,
|
|
47
47
|
authToken,
|
|
48
48
|
patientId,
|
|
49
|
+
entitlementId,
|
|
49
50
|
campDateFieldId = "camp_date",
|
|
50
51
|
slotFieldId = "camp_time_slot",
|
|
51
52
|
bookingFormDataFields
|
|
@@ -72,7 +73,8 @@ var CampBookingPersistenceProvider = class {
|
|
|
72
73
|
primary_slot_id: primarySlotId,
|
|
73
74
|
patient_id: patientId,
|
|
74
75
|
booking_form_data: bookingFormData,
|
|
75
|
-
idempotency_key: idempotencyKey
|
|
76
|
+
idempotency_key: idempotencyKey,
|
|
77
|
+
...entitlementId != null ? { entitlement_id: entitlementId } : {}
|
|
76
78
|
};
|
|
77
79
|
const headers = { "Content-Type": "application/json" };
|
|
78
80
|
if (authToken) headers["Authorization"] = `Bearer ${authToken}`;
|