@slotchain/sdk 1.1.1 → 1.1.2
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/README.md +24 -0
- package/dist/index.cjs.js +76 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +114 -17
- package/dist/index.d.ts +114 -17
- package/dist/index.esm.js +76 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/clients/booking-client.ts +87 -10
- package/src/index.ts +2 -0
- package/src/types/api.ts +49 -10
package/src/types/api.ts
CHANGED
|
@@ -101,11 +101,49 @@ export interface Category {
|
|
|
101
101
|
|
|
102
102
|
export interface Booking {
|
|
103
103
|
id: string;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
slot_id: string;
|
|
105
|
+
customer_id?: string;
|
|
106
|
+
customer_info: {
|
|
107
|
+
name: string;
|
|
108
|
+
email: string;
|
|
109
|
+
phone?: string;
|
|
110
|
+
address?: string;
|
|
111
|
+
city?: string;
|
|
112
|
+
state?: string;
|
|
113
|
+
zipCode?: string;
|
|
114
|
+
isGuestCheckout?: boolean;
|
|
115
|
+
};
|
|
116
|
+
booking_data: {
|
|
117
|
+
services?: string[];
|
|
118
|
+
selected_services?: string[];
|
|
119
|
+
service_items?: string[];
|
|
120
|
+
total?: number;
|
|
121
|
+
delivery_type?: string;
|
|
122
|
+
[key: string]: unknown;
|
|
123
|
+
};
|
|
124
|
+
status?: string;
|
|
125
|
+
created_at: string;
|
|
126
|
+
updated_at: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Booking with nested slot information
|
|
131
|
+
*/
|
|
132
|
+
export interface BookingWithSlot extends Booking {
|
|
133
|
+
slots?: Slot;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Options for listing bookings
|
|
138
|
+
*/
|
|
139
|
+
export interface ListBookingsOptions {
|
|
140
|
+
tenant_id?: string;
|
|
141
|
+
slot_id?: string;
|
|
142
|
+
customer_id?: string;
|
|
107
143
|
status?: string;
|
|
108
|
-
|
|
144
|
+
includeSlot?: boolean;
|
|
145
|
+
page?: number;
|
|
146
|
+
limit?: number;
|
|
109
147
|
}
|
|
110
148
|
|
|
111
149
|
export interface Service {
|
|
@@ -120,12 +158,13 @@ export interface Service {
|
|
|
120
158
|
|
|
121
159
|
export interface Slot {
|
|
122
160
|
id: string;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
161
|
+
tenant_id: string;
|
|
162
|
+
name: string;
|
|
163
|
+
description?: string;
|
|
164
|
+
status?: string;
|
|
165
|
+
is_active?: boolean;
|
|
166
|
+
created_at: string;
|
|
167
|
+
updated_at: string;
|
|
129
168
|
}
|
|
130
169
|
|
|
131
170
|
export interface Customer {
|