@vitalfit/sdk 0.0.55 → 0.0.57
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 +50 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +50 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.d.cts +0 -759
- package/dist/index.d.ts +0 -759
package/dist/index.d.cts
DELETED
|
@@ -1,759 +0,0 @@
|
|
|
1
|
-
type ClientConfig = {
|
|
2
|
-
url: string;
|
|
3
|
-
jwt?: string;
|
|
4
|
-
data?: object;
|
|
5
|
-
params?: object;
|
|
6
|
-
};
|
|
7
|
-
declare class Client {
|
|
8
|
-
private client;
|
|
9
|
-
jwt?: string;
|
|
10
|
-
constructor(isDevMode: boolean, origin?: string);
|
|
11
|
-
call(method: string, config: ClientConfig): Promise<Response>;
|
|
12
|
-
get(config: ClientConfig): Promise<any>;
|
|
13
|
-
post(config: ClientConfig): Promise<Response>;
|
|
14
|
-
put(config: ClientConfig): Promise<Response>;
|
|
15
|
-
patch(config: ClientConfig): Promise<Response>;
|
|
16
|
-
delete(config: ClientConfig): Promise<Response>;
|
|
17
|
-
setJWT(jwt: string): void;
|
|
18
|
-
removeJWT(): void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
type PaginationRequest = {
|
|
22
|
-
limit?: number;
|
|
23
|
-
page?: number;
|
|
24
|
-
sort?: 'asc' | 'desc';
|
|
25
|
-
search?: string;
|
|
26
|
-
};
|
|
27
|
-
type Pagination<T> = {
|
|
28
|
-
data: T;
|
|
29
|
-
count: number;
|
|
30
|
-
next: string | null;
|
|
31
|
-
previous: string | null;
|
|
32
|
-
};
|
|
33
|
-
type PaginatedTotal<T> = Pagination<T> & {
|
|
34
|
-
total: number;
|
|
35
|
-
};
|
|
36
|
-
type UUIDModel = {
|
|
37
|
-
id: string;
|
|
38
|
-
};
|
|
39
|
-
type BaseModel = UUIDModel & {
|
|
40
|
-
created_at: string;
|
|
41
|
-
updated_at: string;
|
|
42
|
-
deleted_at: string | null;
|
|
43
|
-
};
|
|
44
|
-
type DataResponse<T> = {
|
|
45
|
-
data: T;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
declare enum UserGender {
|
|
49
|
-
male = "male",
|
|
50
|
-
female = "female",
|
|
51
|
-
preferNotToSay = "prefer-not-to-say"
|
|
52
|
-
}
|
|
53
|
-
type LoginRequest = {
|
|
54
|
-
email: string;
|
|
55
|
-
password: string;
|
|
56
|
-
context?: string;
|
|
57
|
-
};
|
|
58
|
-
type LoginResponse = {
|
|
59
|
-
token: string;
|
|
60
|
-
};
|
|
61
|
-
type SignUpRequest = {
|
|
62
|
-
first_name: string;
|
|
63
|
-
last_name: string;
|
|
64
|
-
email: string;
|
|
65
|
-
password: string;
|
|
66
|
-
identity_document: string;
|
|
67
|
-
phone?: string | null;
|
|
68
|
-
birth_date: string;
|
|
69
|
-
gender?: UserGender | null;
|
|
70
|
-
profile_picture_url?: string | null;
|
|
71
|
-
role_name?: string | null;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
type ClientProfile = {
|
|
75
|
-
user_id: string;
|
|
76
|
-
qr_code: string;
|
|
77
|
-
scoring: number;
|
|
78
|
-
status: string;
|
|
79
|
-
block_justification: string;
|
|
80
|
-
category: string;
|
|
81
|
-
created_at: string;
|
|
82
|
-
updated_at: string;
|
|
83
|
-
deleted_at: string | null;
|
|
84
|
-
};
|
|
85
|
-
type Role = {
|
|
86
|
-
role_id: string;
|
|
87
|
-
name: string;
|
|
88
|
-
description: string;
|
|
89
|
-
created_at: string;
|
|
90
|
-
updated_at: string;
|
|
91
|
-
};
|
|
92
|
-
type User = {
|
|
93
|
-
user_id: string;
|
|
94
|
-
first_name: string;
|
|
95
|
-
last_name: string;
|
|
96
|
-
email: string;
|
|
97
|
-
phone: string;
|
|
98
|
-
identity_document: string;
|
|
99
|
-
birth_date: string;
|
|
100
|
-
gender: string;
|
|
101
|
-
profile_picture_url: string;
|
|
102
|
-
is_validated: boolean;
|
|
103
|
-
ClientProfile: ClientProfile;
|
|
104
|
-
role_id: string;
|
|
105
|
-
role: Role;
|
|
106
|
-
created_at: string;
|
|
107
|
-
updated_at: string;
|
|
108
|
-
deleted_at: string | null;
|
|
109
|
-
};
|
|
110
|
-
type UserApiResponse = {
|
|
111
|
-
user: User;
|
|
112
|
-
};
|
|
113
|
-
type GetUserResponse = {
|
|
114
|
-
birth_date: string;
|
|
115
|
-
email: string;
|
|
116
|
-
first_name: string;
|
|
117
|
-
gender: string;
|
|
118
|
-
identity_document: string;
|
|
119
|
-
last_name: string;
|
|
120
|
-
phone: string;
|
|
121
|
-
profile_picture_url: string;
|
|
122
|
-
role_id: string;
|
|
123
|
-
role_name: string;
|
|
124
|
-
user_id: string;
|
|
125
|
-
};
|
|
126
|
-
type UpdateUserRequest = {
|
|
127
|
-
birth_date?: string;
|
|
128
|
-
email?: string;
|
|
129
|
-
first_name?: string;
|
|
130
|
-
gender?: string;
|
|
131
|
-
identity_document?: string;
|
|
132
|
-
last_name?: string;
|
|
133
|
-
phone?: string;
|
|
134
|
-
profile_picture_url?: string;
|
|
135
|
-
};
|
|
136
|
-
type UpdateUserStaffRequest = UpdateUserRequest & {
|
|
137
|
-
role_name?: string;
|
|
138
|
-
};
|
|
139
|
-
type UserPaginationOptions = {
|
|
140
|
-
limit?: number;
|
|
141
|
-
page?: number;
|
|
142
|
-
sort?: 'asc' | 'desc';
|
|
143
|
-
search?: string;
|
|
144
|
-
role?: string;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
type PaginatedBranch = {
|
|
148
|
-
branch_id: string;
|
|
149
|
-
name: string;
|
|
150
|
-
tax_id: string;
|
|
151
|
-
state_name: string;
|
|
152
|
-
country_name: string;
|
|
153
|
-
manager_name: string;
|
|
154
|
-
manager_last_name: string;
|
|
155
|
-
status: 'Active' | 'Inactive' | 'Maintenance';
|
|
156
|
-
};
|
|
157
|
-
type OperatingHour = {
|
|
158
|
-
hour_id?: string;
|
|
159
|
-
day_of_week: string;
|
|
160
|
-
branch_id?: string;
|
|
161
|
-
open_time: string;
|
|
162
|
-
close_time: string;
|
|
163
|
-
is_closed: boolean;
|
|
164
|
-
};
|
|
165
|
-
type BranchDetails = {
|
|
166
|
-
branch_id: string;
|
|
167
|
-
name: string;
|
|
168
|
-
tax_id: string;
|
|
169
|
-
address: string;
|
|
170
|
-
latitude: number;
|
|
171
|
-
longitude: number;
|
|
172
|
-
max_capacity: number;
|
|
173
|
-
phone: string;
|
|
174
|
-
status: 'Active' | 'Inactive' | 'Maintenance';
|
|
175
|
-
state: string;
|
|
176
|
-
country: string;
|
|
177
|
-
manager: string;
|
|
178
|
-
manager_first_name: string;
|
|
179
|
-
manager_last_name: string;
|
|
180
|
-
operating_hours: OperatingHour[];
|
|
181
|
-
};
|
|
182
|
-
type BranchStatusCount = {
|
|
183
|
-
Active: number;
|
|
184
|
-
Inactive: number;
|
|
185
|
-
Maintenance: number;
|
|
186
|
-
Total: number;
|
|
187
|
-
};
|
|
188
|
-
type PaginationBranchRequest = PaginationRequest & {
|
|
189
|
-
status?: string;
|
|
190
|
-
location?: string;
|
|
191
|
-
};
|
|
192
|
-
type CreateBranchRequest = {
|
|
193
|
-
address: string;
|
|
194
|
-
country: string;
|
|
195
|
-
latitude: number;
|
|
196
|
-
longitude: number;
|
|
197
|
-
manager_id: string;
|
|
198
|
-
max_capacity: number;
|
|
199
|
-
name: string;
|
|
200
|
-
operating_hours: OperatingHour[];
|
|
201
|
-
phone: string;
|
|
202
|
-
state: string;
|
|
203
|
-
status: string;
|
|
204
|
-
tax_id: string;
|
|
205
|
-
};
|
|
206
|
-
type UpdateOperatingHour = {
|
|
207
|
-
day_of_week: string;
|
|
208
|
-
open_time: string;
|
|
209
|
-
close_time: string;
|
|
210
|
-
is_closed: boolean;
|
|
211
|
-
};
|
|
212
|
-
type UpdateBranchRequest = {
|
|
213
|
-
address: string;
|
|
214
|
-
country: string;
|
|
215
|
-
latitude: number;
|
|
216
|
-
longitude: number;
|
|
217
|
-
manager_id: string;
|
|
218
|
-
max_capacity: number;
|
|
219
|
-
name: string;
|
|
220
|
-
operating_hours: UpdateOperatingHour[];
|
|
221
|
-
payment_methods: string[];
|
|
222
|
-
phone: string;
|
|
223
|
-
state: string;
|
|
224
|
-
status: 'Active' | 'Inactive' | 'Maintenance';
|
|
225
|
-
tax_id: string;
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
type PaymentMethod = {
|
|
229
|
-
method_id: string;
|
|
230
|
-
name: string;
|
|
231
|
-
type: string;
|
|
232
|
-
description: string;
|
|
233
|
-
processing_type: string;
|
|
234
|
-
global_status: boolean;
|
|
235
|
-
created_at: string;
|
|
236
|
-
updated_at: string;
|
|
237
|
-
};
|
|
238
|
-
type PaymentMethodTypes = {};
|
|
239
|
-
type CreatePaymentMethod = {
|
|
240
|
-
description: string;
|
|
241
|
-
name: string;
|
|
242
|
-
processing_type: 'Gateway' | 'Offline';
|
|
243
|
-
type: 'Cash' | 'Card' | 'Transfer' | 'Other';
|
|
244
|
-
configuration: PaymentConfiguration;
|
|
245
|
-
display_name: string;
|
|
246
|
-
method_id: string;
|
|
247
|
-
surcharge_fixed: number;
|
|
248
|
-
surcharge_percentage: number;
|
|
249
|
-
visibility: BranchPaymentVisibility;
|
|
250
|
-
};
|
|
251
|
-
type ZelleConfig = {
|
|
252
|
-
email: string;
|
|
253
|
-
};
|
|
254
|
-
type BankTransferConfig = {
|
|
255
|
-
bank_name: string;
|
|
256
|
-
account_number: string;
|
|
257
|
-
tax_id: string;
|
|
258
|
-
};
|
|
259
|
-
type PagoMovilConfig = {
|
|
260
|
-
phone: string;
|
|
261
|
-
bank_id: string;
|
|
262
|
-
tax_id: string;
|
|
263
|
-
};
|
|
264
|
-
type BranchPaymentVisibility = 'Client' | 'Staff' | 'All';
|
|
265
|
-
type PaymentConfiguration = ZelleConfig | BankTransferConfig | PagoMovilConfig | Record<string, any>;
|
|
266
|
-
type BranchPaymentMethod = {
|
|
267
|
-
branch_id: string;
|
|
268
|
-
configuration: PaymentConfiguration;
|
|
269
|
-
created_at: string;
|
|
270
|
-
display_name: string;
|
|
271
|
-
is_active: boolean;
|
|
272
|
-
method_id: string;
|
|
273
|
-
surcharge_fixed: number;
|
|
274
|
-
surcharge_percentage: number;
|
|
275
|
-
updated_at: string;
|
|
276
|
-
visibility: BranchPaymentVisibility;
|
|
277
|
-
};
|
|
278
|
-
type UpdateBranchPaymentMethod = {
|
|
279
|
-
is_active?: boolean;
|
|
280
|
-
};
|
|
281
|
-
type BranchPaymentMethodInfo = {
|
|
282
|
-
branch_id: string;
|
|
283
|
-
method_id: string;
|
|
284
|
-
is_active: boolean;
|
|
285
|
-
name: string;
|
|
286
|
-
type: string;
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
type Specialty = {
|
|
290
|
-
specialty_id: string;
|
|
291
|
-
specialty_name?: string;
|
|
292
|
-
};
|
|
293
|
-
type InstructorData = {
|
|
294
|
-
biography: string;
|
|
295
|
-
birth_date: string;
|
|
296
|
-
email: string;
|
|
297
|
-
first_name: string;
|
|
298
|
-
gender: string;
|
|
299
|
-
identity_document: string;
|
|
300
|
-
instructor_id: string;
|
|
301
|
-
last_name: string;
|
|
302
|
-
phone: string;
|
|
303
|
-
profile_picture_url: string;
|
|
304
|
-
specialties: Specialty[];
|
|
305
|
-
user_id: string;
|
|
306
|
-
};
|
|
307
|
-
type InstructorDataList = {
|
|
308
|
-
biography: string;
|
|
309
|
-
birth_date: string;
|
|
310
|
-
email: string;
|
|
311
|
-
first_name: string;
|
|
312
|
-
gender: string;
|
|
313
|
-
identity_document: string;
|
|
314
|
-
instructor_id: string;
|
|
315
|
-
last_name: string;
|
|
316
|
-
phone: string;
|
|
317
|
-
profile_picture_url: string;
|
|
318
|
-
user_id: string;
|
|
319
|
-
};
|
|
320
|
-
type Instructor = {
|
|
321
|
-
biography?: string;
|
|
322
|
-
birth_date?: string;
|
|
323
|
-
email?: string;
|
|
324
|
-
first_name?: string;
|
|
325
|
-
gender?: UserGender | null;
|
|
326
|
-
identity_document?: string;
|
|
327
|
-
last_name?: string;
|
|
328
|
-
phone?: string;
|
|
329
|
-
profile_picture_url?: string;
|
|
330
|
-
};
|
|
331
|
-
type PaginatedInstructor = PaginationRequest & {
|
|
332
|
-
identity_doc?: string;
|
|
333
|
-
};
|
|
334
|
-
type BranchInstructorInfo = {
|
|
335
|
-
email: string;
|
|
336
|
-
instructorName: string;
|
|
337
|
-
phone: string;
|
|
338
|
-
instructorID: string;
|
|
339
|
-
};
|
|
340
|
-
type InstructorsSummary = {
|
|
341
|
-
total: number;
|
|
342
|
-
actives: number;
|
|
343
|
-
blocked: number;
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
interface Permission {
|
|
347
|
-
created_at?: string;
|
|
348
|
-
description?: string;
|
|
349
|
-
name?: string;
|
|
350
|
-
permission_id: string;
|
|
351
|
-
updated_at?: string;
|
|
352
|
-
}
|
|
353
|
-
interface RoleResponse {
|
|
354
|
-
created_at: string;
|
|
355
|
-
description: string;
|
|
356
|
-
name: string;
|
|
357
|
-
permissions: Permission[];
|
|
358
|
-
role_id: string;
|
|
359
|
-
updated_at: string;
|
|
360
|
-
}
|
|
361
|
-
type CreateRole = {
|
|
362
|
-
description: string;
|
|
363
|
-
name: string;
|
|
364
|
-
permissions: string[];
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
type Banner = {
|
|
368
|
-
banner_id?: string;
|
|
369
|
-
image_url?: string;
|
|
370
|
-
is_active?: boolean;
|
|
371
|
-
link_url?: string;
|
|
372
|
-
name?: string;
|
|
373
|
-
};
|
|
374
|
-
type CreateBanner = Omit<Banner, 'banner_id'>;
|
|
375
|
-
type UpdateBanner = {
|
|
376
|
-
image_url?: string;
|
|
377
|
-
is_active?: boolean;
|
|
378
|
-
link_url?: string;
|
|
379
|
-
name?: string;
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
type MembershipType = {
|
|
383
|
-
description: string;
|
|
384
|
-
duration_days: number;
|
|
385
|
-
is_active: boolean;
|
|
386
|
-
membership_type_id: string;
|
|
387
|
-
name: string;
|
|
388
|
-
price: number;
|
|
389
|
-
};
|
|
390
|
-
type CreateMembershipType = {
|
|
391
|
-
description: string;
|
|
392
|
-
duration_days: number;
|
|
393
|
-
is_active: boolean;
|
|
394
|
-
name: string;
|
|
395
|
-
price: number;
|
|
396
|
-
};
|
|
397
|
-
type UpdateMembershipType = {
|
|
398
|
-
description?: string;
|
|
399
|
-
duration_days?: number;
|
|
400
|
-
is_active?: boolean;
|
|
401
|
-
name?: string;
|
|
402
|
-
price?: number;
|
|
403
|
-
};
|
|
404
|
-
type MembershipsSummary = {
|
|
405
|
-
total: number;
|
|
406
|
-
actives: number;
|
|
407
|
-
inactives: number;
|
|
408
|
-
};
|
|
409
|
-
|
|
410
|
-
type BranchInfo = {
|
|
411
|
-
address: string;
|
|
412
|
-
branch_id: string;
|
|
413
|
-
latitude: number;
|
|
414
|
-
longitude: number;
|
|
415
|
-
name: string;
|
|
416
|
-
phone: string;
|
|
417
|
-
};
|
|
418
|
-
|
|
419
|
-
interface ServiceCategoryInfo {
|
|
420
|
-
category_id: string;
|
|
421
|
-
name: string;
|
|
422
|
-
}
|
|
423
|
-
interface ServiceImageResponse {
|
|
424
|
-
image_id: string;
|
|
425
|
-
image_url: string;
|
|
426
|
-
alt_text: string;
|
|
427
|
-
display_order: number;
|
|
428
|
-
is_primary: boolean;
|
|
429
|
-
}
|
|
430
|
-
interface BannerResponse {
|
|
431
|
-
banner_id: string;
|
|
432
|
-
name: string;
|
|
433
|
-
image_url: string;
|
|
434
|
-
link_url: string;
|
|
435
|
-
is_active: boolean;
|
|
436
|
-
}
|
|
437
|
-
interface ServiceFullDetail {
|
|
438
|
-
service_id: string;
|
|
439
|
-
category_id: string;
|
|
440
|
-
name: string;
|
|
441
|
-
description: string;
|
|
442
|
-
duration_minutes: number;
|
|
443
|
-
priority_score: number;
|
|
444
|
-
is_featured: boolean;
|
|
445
|
-
created_at: string;
|
|
446
|
-
updated_at: string;
|
|
447
|
-
service_category: ServiceCategoryInfo;
|
|
448
|
-
images: ServiceImageResponse[];
|
|
449
|
-
banners: BannerResponse[];
|
|
450
|
-
}
|
|
451
|
-
type CreateServiceImage = {
|
|
452
|
-
alt_text: string;
|
|
453
|
-
display_order: number;
|
|
454
|
-
image_url: string;
|
|
455
|
-
is_primary: boolean;
|
|
456
|
-
};
|
|
457
|
-
type CreateService = {
|
|
458
|
-
banner_id: string;
|
|
459
|
-
category_id: string;
|
|
460
|
-
description: string;
|
|
461
|
-
duration: number;
|
|
462
|
-
is_featured: boolean;
|
|
463
|
-
name: string;
|
|
464
|
-
priority: number;
|
|
465
|
-
service_images: CreateServiceImage[];
|
|
466
|
-
};
|
|
467
|
-
type UpdateServiceImageManual = {
|
|
468
|
-
alt_text?: string;
|
|
469
|
-
display_order?: number;
|
|
470
|
-
image_url?: string;
|
|
471
|
-
is_primary?: boolean;
|
|
472
|
-
};
|
|
473
|
-
type UpdateServiceManual = {
|
|
474
|
-
banner_id?: string;
|
|
475
|
-
category_id?: string;
|
|
476
|
-
description?: string;
|
|
477
|
-
duration?: number;
|
|
478
|
-
is_featured?: boolean;
|
|
479
|
-
name?: string;
|
|
480
|
-
priority?: number;
|
|
481
|
-
service_images?: UpdateServiceImageManual[];
|
|
482
|
-
};
|
|
483
|
-
type BranchServicePrice = {
|
|
484
|
-
branch_id: string;
|
|
485
|
-
service_id: string;
|
|
486
|
-
service_name: string;
|
|
487
|
-
is_visible: boolean;
|
|
488
|
-
max_capacity: number;
|
|
489
|
-
price_for_member: number;
|
|
490
|
-
price_for_non_member: number;
|
|
491
|
-
};
|
|
492
|
-
type CreateBranchServicePriceItem = {
|
|
493
|
-
service_id: string;
|
|
494
|
-
is_visible: boolean;
|
|
495
|
-
max_capacity: number;
|
|
496
|
-
price_for_member: number;
|
|
497
|
-
price_for_non_member: number;
|
|
498
|
-
};
|
|
499
|
-
type UpdateBranchServicePrice = {
|
|
500
|
-
is_visible?: boolean;
|
|
501
|
-
max_capacity?: number;
|
|
502
|
-
price_for_member?: number;
|
|
503
|
-
price_for_non_member?: number;
|
|
504
|
-
};
|
|
505
|
-
type PaginatedServiceRequest = PaginationRequest & {
|
|
506
|
-
category?: string;
|
|
507
|
-
};
|
|
508
|
-
type ServicesSummary = {
|
|
509
|
-
total: number;
|
|
510
|
-
actives: number;
|
|
511
|
-
featured: number;
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
type EquipmentCategory = 'Cardio' | 'Strength' | 'FreeWeight' | 'Functional' | 'Accessory';
|
|
515
|
-
type Equipment = {
|
|
516
|
-
equipment_id: string;
|
|
517
|
-
name: string;
|
|
518
|
-
brand: string;
|
|
519
|
-
model: string;
|
|
520
|
-
category: EquipmentCategory;
|
|
521
|
-
description: string;
|
|
522
|
-
created_at: string;
|
|
523
|
-
updated_at: string;
|
|
524
|
-
deleted_at: string | null;
|
|
525
|
-
};
|
|
526
|
-
type CreateEquipment = Omit<Equipment, 'equipment_id' | 'created_at' | 'updated_at' | 'deleted_at'>;
|
|
527
|
-
type UpdateEquipment = Partial<CreateEquipment>;
|
|
528
|
-
type EquipmentStatus = 'Available' | 'InMaintenance' | 'OutOfService';
|
|
529
|
-
type CreateBranchEquipment = {
|
|
530
|
-
acquisition_date: string;
|
|
531
|
-
equipment_id: string;
|
|
532
|
-
last_maintenance_date: string;
|
|
533
|
-
notes: string;
|
|
534
|
-
serial_number: string;
|
|
535
|
-
status: EquipmentStatus;
|
|
536
|
-
};
|
|
537
|
-
type UpdateBranchEquipmentDetails = {
|
|
538
|
-
last_maintenance_date?: string;
|
|
539
|
-
notes?: string;
|
|
540
|
-
status?: EquipmentStatus;
|
|
541
|
-
};
|
|
542
|
-
type EquipmentInfo = {
|
|
543
|
-
equipment_id: string;
|
|
544
|
-
name: string;
|
|
545
|
-
category: EquipmentCategory;
|
|
546
|
-
model: string;
|
|
547
|
-
description: string;
|
|
548
|
-
};
|
|
549
|
-
type BranchEquipmentInventory = {
|
|
550
|
-
acquisition_date: string;
|
|
551
|
-
equipment_id: string;
|
|
552
|
-
inventory_id: string;
|
|
553
|
-
last_maintenance_date: string;
|
|
554
|
-
notes: string;
|
|
555
|
-
serial_number: string;
|
|
556
|
-
status: EquipmentStatus;
|
|
557
|
-
};
|
|
558
|
-
type PaginatedEquipmentRequest = PaginationRequest & {
|
|
559
|
-
category?: EquipmentCategory;
|
|
560
|
-
};
|
|
561
|
-
|
|
562
|
-
type BranchClassInfo = {
|
|
563
|
-
branch_id: string;
|
|
564
|
-
class_id: string;
|
|
565
|
-
ends_at: string;
|
|
566
|
-
instructor_id: string;
|
|
567
|
-
is_visible: boolean;
|
|
568
|
-
max_capacity: number;
|
|
569
|
-
notes: string;
|
|
570
|
-
service_id: string;
|
|
571
|
-
starts_at: string;
|
|
572
|
-
};
|
|
573
|
-
type CreateClassPayload = {
|
|
574
|
-
ends_at: string;
|
|
575
|
-
instructor_id: string;
|
|
576
|
-
is_visible: boolean;
|
|
577
|
-
max_capacity: number;
|
|
578
|
-
notes: string;
|
|
579
|
-
service_id: string;
|
|
580
|
-
starts_at: string;
|
|
581
|
-
};
|
|
582
|
-
type UpdateClassPayload = {
|
|
583
|
-
ends_at: string;
|
|
584
|
-
instructor_id: string;
|
|
585
|
-
is_visible: boolean;
|
|
586
|
-
max_capacity: number;
|
|
587
|
-
notes: string;
|
|
588
|
-
service_id: string;
|
|
589
|
-
starts_at: string;
|
|
590
|
-
};
|
|
591
|
-
|
|
592
|
-
declare class AuthService {
|
|
593
|
-
private client;
|
|
594
|
-
constructor(client: Client);
|
|
595
|
-
login({ email, password, context, }: LoginRequest): Promise<LoginResponse>;
|
|
596
|
-
logout(): void;
|
|
597
|
-
saveJWT(jwt: string): void;
|
|
598
|
-
signUp(signUpData: SignUpRequest): Promise<void>;
|
|
599
|
-
signUpStaff(signUpData: SignUpRequest): Promise<void>;
|
|
600
|
-
forgotPassword(email: string): Promise<void>;
|
|
601
|
-
resetPassword(otp: string, password: string, repeatPassword: string): Promise<void>;
|
|
602
|
-
validateResetToken(token: string): Promise<void>;
|
|
603
|
-
verifyEmail(otp: string): Promise<void>;
|
|
604
|
-
verifyStaff(token: string, password: string, repeatPassword: string): Promise<void>;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
declare class UserService {
|
|
608
|
-
client: Client;
|
|
609
|
-
constructor(client: Client);
|
|
610
|
-
getStaffUsers({ search, role }: UserPaginationOptions, jwt: string): Promise<DataResponse<User[]>>;
|
|
611
|
-
WhoAmI(jwt: string): Promise<UserApiResponse>;
|
|
612
|
-
getBranchAdmins(jwt: string): Promise<DataResponse<User[]>>;
|
|
613
|
-
getClientUsers(jwt: string, options?: UserPaginationOptions): Promise<DataResponse<User[]>>;
|
|
614
|
-
GetUserByID(userId: string, jwt: string): Promise<DataResponse<GetUserResponse>>;
|
|
615
|
-
updateUserClient(userId: string, data: UpdateUserRequest, jwt: string): Promise<void>;
|
|
616
|
-
updateUserStaff(userId: string, data: UpdateUserStaffRequest, jwt: string): Promise<void>;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
declare class BranchService {
|
|
620
|
-
private client;
|
|
621
|
-
constructor(client: any);
|
|
622
|
-
updateBranch(branchId: string, branchData: UpdateBranchRequest, jwt: string): Promise<void>;
|
|
623
|
-
getBranchById(branchId: string, jwt: string): Promise<BranchDetails>;
|
|
624
|
-
getBranches({ page, limit, search, status, location }: PaginationBranchRequest, jwt: string): Promise<Pagination<PaginatedBranch[]>>;
|
|
625
|
-
delete(branchId: string, jwt: string): Promise<void>;
|
|
626
|
-
getBranchStatusCount(jwt: string): Promise<DataResponse<BranchStatusCount>>;
|
|
627
|
-
createBranch(branchData: CreateBranchRequest, jwt: string): Promise<void>;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
declare class PaymentMethodService {
|
|
631
|
-
private client;
|
|
632
|
-
constructor(client: Client);
|
|
633
|
-
getPaymentMethods(jwt: string): Promise<DataResponse<PaymentMethod[]>>;
|
|
634
|
-
createPaymentMethod(paymentMethodData: CreatePaymentMethod, jwt: string): Promise<void>;
|
|
635
|
-
getPaymentMethodByID(paymentMethodId: string, jwt: string): Promise<DataResponse<PaymentMethod>>;
|
|
636
|
-
updatePaymentMethod(paymentMethodId: string, data: CreatePaymentMethod, jwt: string): Promise<void>;
|
|
637
|
-
deletePaymentMethod(paymentMethodId: string, jwt: string): Promise<void>;
|
|
638
|
-
addBranchPaymentMethod(branchId: string, paymentMethodID: string[], jwt: string): Promise<void>;
|
|
639
|
-
getBranchPaymentMethods(branchId: string, jwt: string): Promise<DataResponse<BranchPaymentMethodInfo[]>>;
|
|
640
|
-
getBranchPaymentMethodByID(branchId: string, paymentMethodId: string, jwt: string): Promise<DataResponse<BranchPaymentMethodInfo>>;
|
|
641
|
-
removeBranchPaymentMethod(branchId: string, paymentMethodId: string, jwt: string): Promise<void>;
|
|
642
|
-
updateBranchPaymentMethod(branchId: string, paymentMethodId: string, data: UpdateBranchPaymentMethod, jwt: string): Promise<void>;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
declare class InstructorService {
|
|
646
|
-
private client;
|
|
647
|
-
constructor(client: Client);
|
|
648
|
-
getInstructors({ page, limit, search, identity_doc }: PaginatedInstructor, jwt: string): Promise<PaginatedTotal<InstructorDataList[]>>;
|
|
649
|
-
getSummary(jwt: string): Promise<DataResponse<InstructorsSummary>>;
|
|
650
|
-
createInstructor(instructorData: Instructor, jwt: string): Promise<void>;
|
|
651
|
-
getInstructorById(instructorId: string, jwt: string): Promise<DataResponse<InstructorData>>;
|
|
652
|
-
updateInstructor(instructorId: string, instructorData: Instructor, jwt: string): Promise<void>;
|
|
653
|
-
deleteInstructor(instructorId: string, jwt: string): Promise<void>;
|
|
654
|
-
addSpecialty(instructorId: string, specialty: Specialty[], jwt: string): Promise<void>;
|
|
655
|
-
removeSpecialty(instructorId: string, specialtyId: string, jwt: string): Promise<void>;
|
|
656
|
-
addBranchInstructor(branchId: string, instructorIDs: string[], jwt: string): Promise<void>;
|
|
657
|
-
removeBranchInstructor(branchId: string, instructorId: string, jwt: string): Promise<void>;
|
|
658
|
-
getBranchInstructors(branchId: string, { search, identity_doc }: PaginatedInstructor, jwt: string): Promise<DataResponse<BranchInstructorInfo[]>>;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
declare class RBACService {
|
|
662
|
-
private client;
|
|
663
|
-
constructor(client: Client);
|
|
664
|
-
getPermissions(jwt: string): Promise<DataResponse<Permission[]>>;
|
|
665
|
-
getRoles({ page, limit, search, sort }: PaginationRequest, jwt: string): Promise<PaginatedTotal<RoleResponse[]>>;
|
|
666
|
-
createRole(roleData: CreateRole, jwt: string): Promise<void>;
|
|
667
|
-
updateRole(roleId: string, roleData: CreateRole, jwt: string): Promise<void>;
|
|
668
|
-
getRoleByID(roleId: string, jwt: string): Promise<DataResponse<RoleResponse>>;
|
|
669
|
-
deleteRole(roleId: string, jwt: string): Promise<void>;
|
|
670
|
-
addPermission(roleId: string, permissionData: string[], jwt: string): Promise<void>;
|
|
671
|
-
removePermission(roleId: string, permissionData: Permission[], jwt: string): Promise<void>;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
declare class MarketingService {
|
|
675
|
-
private client;
|
|
676
|
-
constructor(client: Client);
|
|
677
|
-
createBanners(BannerData: CreateBanner, jwt: string): Promise<void>;
|
|
678
|
-
getBanner(jwt: string): Promise<DataResponse<Banner[]>>;
|
|
679
|
-
getBannerByID(BannerId: string, jwt: string): Promise<DataResponse<Banner>>;
|
|
680
|
-
updateBanner(BannerId: string, BannerData: UpdateBanner, jwt: string): Promise<void>;
|
|
681
|
-
deleteBanner(BannerId: string, jwt: string): Promise<void>;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
declare class MembershipService {
|
|
685
|
-
private client;
|
|
686
|
-
constructor(client: Client);
|
|
687
|
-
createMembershipType(data: CreateMembershipType, jwt: string): Promise<void>;
|
|
688
|
-
getMembershipTypes(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<MembershipType[]>>;
|
|
689
|
-
getSummary(jwt: string): Promise<DataResponse<MembershipsSummary>>;
|
|
690
|
-
getMembershipTypeByID(membershipTypeId: string, jwt: string): Promise<DataResponse<MembershipType>>;
|
|
691
|
-
updateMembershipType(membershipTypeId: string, data: UpdateMembershipType, jwt: string): Promise<void>;
|
|
692
|
-
deleteMembershipType(membershipTypeId: string, jwt: string): Promise<void>;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
declare class PublicService {
|
|
696
|
-
private client;
|
|
697
|
-
constructor(client: Client);
|
|
698
|
-
getBranchMap(jwt: string): Promise<DataResponse<BranchInfo>>;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
declare class ProductsService {
|
|
702
|
-
private client;
|
|
703
|
-
constructor(client: Client);
|
|
704
|
-
createService(data: CreateService, jwt: string): Promise<void>;
|
|
705
|
-
getServices(jwt: string, { page, limit, sort, search, category, }: PaginatedServiceRequest): Promise<PaginatedTotal<ServiceFullDetail[]>>;
|
|
706
|
-
getSummary(jwt: string): Promise<DataResponse<ServicesSummary>>;
|
|
707
|
-
getServiceByID(serviceId: string, jwt: string): Promise<DataResponse<ServiceFullDetail>>;
|
|
708
|
-
updateService(serviceId: string, data: UpdateServiceManual, jwt: string): Promise<void>;
|
|
709
|
-
deleteService(serviceId: string, jwt: string): Promise<void>;
|
|
710
|
-
getCategories(jwt: string): Promise<DataResponse<ServiceCategoryInfo[]>>;
|
|
711
|
-
addBranchService(BranchServiceData: CreateBranchServicePriceItem[], branchId: string, jwt: string): Promise<void>;
|
|
712
|
-
getBranchServices(branchId: string, jwt: string): Promise<DataResponse<BranchServicePrice[]>>;
|
|
713
|
-
getBranchServiceByID(branchId: string, jwt: string, serviceId: string): Promise<DataResponse<BranchServicePrice>>;
|
|
714
|
-
updateBranchService(branchId: string, serviceId: string, BranchServiceData: UpdateBranchServicePrice, jwt: string): Promise<void>;
|
|
715
|
-
removeBranchService(branchId: string, serviceId: string, jwt: string): Promise<void>;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
declare class EquipmentService {
|
|
719
|
-
private client;
|
|
720
|
-
constructor(client: Client);
|
|
721
|
-
getEquipment(jwt: string, { page, limit, sort, search, category, }: PaginatedEquipmentRequest): Promise<PaginatedTotal<Equipment[]>>;
|
|
722
|
-
getEquipmentByID(equipmentId: string, jwt: string): Promise<DataResponse<EquipmentInfo>>;
|
|
723
|
-
getBranchEquipmentByID(branchId: string, equipmentID: string, jwt: string): Promise<DataResponse<BranchEquipmentInventory>>;
|
|
724
|
-
createEquipment(data: CreateEquipment, jwt: string): Promise<void>;
|
|
725
|
-
updateEquipment(equipmentId: string, data: UpdateEquipment, jwt: string): Promise<void>;
|
|
726
|
-
deleteEquipment(equipmentId: string, jwt: string): Promise<void>;
|
|
727
|
-
getBranchEquipment(branchId: string, jwt: string): Promise<DataResponse<Equipment[]>>;
|
|
728
|
-
addBranchEquipment(branchId: string, equipmentData: CreateBranchEquipment, jwt: string): Promise<void>;
|
|
729
|
-
removeBranchEquipment(branchId: string, equipmentId: string, jwt: string): Promise<void>;
|
|
730
|
-
updateBranchEquipment(branchId: string, equipmentId: string, data: UpdateBranchEquipmentDetails, jwt: string): Promise<void>;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
declare class APIError extends Error {
|
|
734
|
-
status: number;
|
|
735
|
-
messages: string[];
|
|
736
|
-
constructor(messages: string[], status: number);
|
|
737
|
-
}
|
|
738
|
-
declare const isAPIError: (error: unknown) => error is APIError;
|
|
739
|
-
|
|
740
|
-
declare class VitalFit {
|
|
741
|
-
private static instance;
|
|
742
|
-
client: Client;
|
|
743
|
-
auth: AuthService;
|
|
744
|
-
user: UserService;
|
|
745
|
-
branch: BranchService;
|
|
746
|
-
paymentMethod: PaymentMethodService;
|
|
747
|
-
instructor: InstructorService;
|
|
748
|
-
RBAC: RBACService;
|
|
749
|
-
marketing: MarketingService;
|
|
750
|
-
membership: MembershipService;
|
|
751
|
-
public: PublicService;
|
|
752
|
-
products: ProductsService;
|
|
753
|
-
equipment: EquipmentService;
|
|
754
|
-
constructor(isDevMode: boolean, origin?: string);
|
|
755
|
-
static getInstance(isDevMode?: boolean): VitalFit;
|
|
756
|
-
version(): string;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
export { APIError, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BranchClassInfo, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchServicePrice, type BranchStatusCount, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateClassPayload, type CreateEquipment, type CreateMembershipType, type CreatePaymentMethod, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type GetUserResponse, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type LoginRequest, type LoginResponse, type MembershipType, type MembershipsSummary, type OperatingHour, type PaginatedBranch, type PaginatedEquipmentRequest, type PaginatedInstructor, type PaginatedServiceRequest, type PaginatedTotal, type Pagination, type PaginationBranchRequest, type PaginationRequest, type PagoMovilConfig, type PaymentConfiguration, type PaymentMethod, type PaymentMethodTypes, type Permission, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicesSummary, type SignUpRequest, type Specialty, type UUIDModel, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateClassPayload, type UpdateEquipment, type UpdateMembershipType, type UpdateOperatingHour, type UpdateServiceImageManual, type UpdateServiceManual, type UpdateUserRequest, type UpdateUserStaffRequest, type User, type UserApiResponse, UserGender, type UserPaginationOptions, VitalFit, type ZelleConfig, isAPIError };
|