@applite/js-sdk 0.0.2 → 0.0.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.
@@ -0,0 +1,713 @@
1
+ import { CreateAppWithdraw, CreateAppSchema, CreateAgentSchema, UpdateAgentSchema, CreateAppointmentSchema, UpdateAppointmentStatusSchema, CreateCompanySchema, UpdateCompanySchema, CreateServiceSchema, UpdateServiceSchema } from '@applite/db';
2
+ import { z } from 'zod';
3
+
4
+ interface HttpClientConfig {
5
+ /**
6
+ * Base URL used for every request. Defaults to an empty string so that
7
+ * relative paths can be used when the SDK is consumed alongside the API.
8
+ */
9
+ baseUrl?: string;
10
+ /**
11
+ * Optional headers that should be sent with every request.
12
+ */
13
+ headers?: HeadersInit;
14
+ /**
15
+ * Custom fetch implementation for environments where the global fetch is
16
+ * not available or needs to be mocked during testing.
17
+ */
18
+ fetchFn?: typeof fetch;
19
+ }
20
+ interface ApiSuccessResponse<T> {
21
+ success: true;
22
+ data: T;
23
+ error?: unknown;
24
+ }
25
+ interface ApiErrorResponse {
26
+ success: false;
27
+ error?: unknown;
28
+ }
29
+ type ApiResponse<T> = ApiSuccessResponse<T> | ApiErrorResponse;
30
+ declare class HttpClient {
31
+ private readonly baseUrl;
32
+ private readonly headers;
33
+ private readonly fetchImpl;
34
+ constructor(config?: HttpClientConfig);
35
+ post<T>(path: string, body: Record<string, unknown> | object): Promise<ApiSuccessResponse<T>>;
36
+ }
37
+
38
+ declare const plateformTypes: readonly ["STORE", "TRANSPORT", "RESTAURATION", "MULTI_SERVICE", "E_LEARNING", "DUTICOTAC"];
39
+ type PlateformType = (typeof plateformTypes)[number];
40
+ declare const sexes: readonly ["M", "F"];
41
+ type Sexe = (typeof sexes)[number];
42
+ interface AppCustomerListParams {
43
+ appId: string;
44
+ apiKey: string;
45
+ plateformType?: PlateformType[];
46
+ }
47
+ interface AppCustomerListItem {
48
+ id: string;
49
+ fullname: string;
50
+ telephone: string;
51
+ email: string | null;
52
+ photoUrl: string | null;
53
+ createdAt: string;
54
+ plateforms: PlateformType[];
55
+ }
56
+ interface AppCustomerAuthParams {
57
+ appId: string;
58
+ apiKey: string;
59
+ fullname: string;
60
+ email?: string | null;
61
+ telephone: string;
62
+ plateform?: PlateformType | null;
63
+ }
64
+ interface AppCustomerCheckParams {
65
+ appId: string;
66
+ apiKey: string;
67
+ telephone: string;
68
+ plateform?: PlateformType | null;
69
+ }
70
+ interface AppCustomer {
71
+ id: string;
72
+ fullname: string;
73
+ email: string | null;
74
+ telephone: string;
75
+ photoUrl: string | null;
76
+ plateforms: PlateformType[];
77
+ createdAt: string;
78
+ }
79
+ interface AppCustomerListFewItem {
80
+ id: string;
81
+ fullname: string;
82
+ photoUrl: string | null;
83
+ createdAt: string;
84
+ }
85
+ interface AppCustomerDetail extends AppCustomer {
86
+ addresses: Record<string, unknown>[];
87
+ transactions: Record<string, unknown>[];
88
+ storeReviews: Record<string, unknown>[];
89
+ app: {
90
+ id: string;
91
+ name: string;
92
+ slug: string;
93
+ };
94
+ }
95
+ interface AppCustomerGetParams {
96
+ appId: string;
97
+ apiKey: string;
98
+ id: string;
99
+ }
100
+ interface AppCustomerUpdateParams {
101
+ appId: string;
102
+ apiKey: string;
103
+ id: string;
104
+ fullname?: string | null;
105
+ email?: string | null;
106
+ photoUrl?: string | null;
107
+ photoId?: string | null;
108
+ gender?: Sexe | null;
109
+ dob?: string | Date | null;
110
+ country?: string | null;
111
+ }
112
+ declare class AppCustomerModule {
113
+ private readonly http;
114
+ constructor(http: HttpClient);
115
+ list(params: AppCustomerListParams): Promise<ApiSuccessResponse<AppCustomerListItem[]>>;
116
+ auth(params: AppCustomerAuthParams): Promise<ApiSuccessResponse<AppCustomer>>;
117
+ check(params: AppCustomerCheckParams): Promise<ApiSuccessResponse<AppCustomer | null>>;
118
+ listFew(params: AppCustomerListParams): Promise<ApiSuccessResponse<AppCustomerListFewItem[]>>;
119
+ get(params: AppCustomerGetParams): Promise<ApiSuccessResponse<AppCustomerDetail | null>>;
120
+ update(params: AppCustomerUpdateParams): Promise<ApiSuccessResponse<AppCustomerDetail>>;
121
+ }
122
+
123
+ interface ApiKeyParams {
124
+ apiKey: string;
125
+ }
126
+ interface AppScopedParams extends ApiKeyParams {
127
+ appId: string;
128
+ }
129
+
130
+ interface BalanceParams extends AppScopedParams {
131
+ }
132
+ interface TransactionListParams extends AppScopedParams {
133
+ }
134
+ interface TransactionGetParams extends AppScopedParams {
135
+ id: string;
136
+ }
137
+ type WithdrawParams = z.infer<typeof CreateAppWithdraw> & {
138
+ appId: string;
139
+ };
140
+ declare class AppFinanceModule {
141
+ private readonly http;
142
+ constructor(http: HttpClient);
143
+ balance(params: BalanceParams): Promise<ApiSuccessResponse<number | null>>;
144
+ listTransactions(params: TransactionListParams): Promise<ApiSuccessResponse<unknown>>;
145
+ getTransaction(params: TransactionGetParams): Promise<ApiSuccessResponse<unknown>>;
146
+ withdraw(params: WithdrawParams): Promise<ApiSuccessResponse<unknown>>;
147
+ }
148
+
149
+ type CreateAppParams = z.infer<typeof CreateAppSchema>;
150
+ interface AppSummary {
151
+ id: string;
152
+ name: string;
153
+ slug: string;
154
+ description: string | null;
155
+ modules: unknown;
156
+ logo: string | null;
157
+ createdAt: string;
158
+ apiKey: string;
159
+ totalCustomers: number;
160
+ totalSales: number;
161
+ totalOrders: number;
162
+ ownerId: string;
163
+ balance: number;
164
+ }
165
+ interface AppDetail extends AppSummary {
166
+ callbackUrl?: string | null;
167
+ }
168
+ interface GetAppBySlugParams extends ApiKeyParams {
169
+ slug: string;
170
+ }
171
+ declare class AppInfoModule {
172
+ private readonly http;
173
+ constructor(http: HttpClient);
174
+ list(params: ApiKeyParams): Promise<ApiSuccessResponse<AppSummary[]>>;
175
+ create(params: CreateAppParams): Promise<ApiSuccessResponse<AppDetail>>;
176
+ getBySlug(params: GetAppBySlugParams): Promise<ApiSuccessResponse<AppDetail>>;
177
+ getById(params: AppScopedParams): Promise<ApiSuccessResponse<AppDetail>>;
178
+ }
179
+
180
+ interface GetStatisticParams extends AppScopedParams {
181
+ type: string;
182
+ year: number;
183
+ month: string;
184
+ plateform?: string | null;
185
+ }
186
+ interface CreateStatisticParams extends GetStatisticParams {
187
+ amount: number;
188
+ description?: string | null;
189
+ }
190
+ interface UpdateStatisticParams extends AppScopedParams {
191
+ id: string;
192
+ amount: number;
193
+ description?: string | null;
194
+ }
195
+ declare class AppStatsModule {
196
+ private readonly http;
197
+ constructor(http: HttpClient);
198
+ create(params: CreateStatisticParams): Promise<ApiSuccessResponse<unknown>>;
199
+ get(params: GetStatisticParams): Promise<ApiSuccessResponse<number>>;
200
+ set(params: CreateStatisticParams): Promise<ApiSuccessResponse<unknown>>;
201
+ update(params: UpdateStatisticParams): Promise<ApiSuccessResponse<unknown>>;
202
+ }
203
+
204
+ interface CreateBadgeParams extends AppScopedParams {
205
+ name: string;
206
+ description?: string | null;
207
+ image?: string | null;
208
+ imageId?: string | null;
209
+ sellerId: string;
210
+ }
211
+ interface EditBadgeParams extends AppScopedParams {
212
+ id: string;
213
+ name: string;
214
+ description?: string | null;
215
+ image?: string | null;
216
+ imageId?: string | null;
217
+ }
218
+ interface DeleteBadgeParams extends AppScopedParams {
219
+ id: string;
220
+ }
221
+ interface CreateCategoryParams extends AppScopedParams {
222
+ name: string;
223
+ description?: string | null;
224
+ sellerId: string;
225
+ image?: string | null;
226
+ imageId?: string | null;
227
+ parentId?: string | null;
228
+ }
229
+ interface EditCategoryParams extends AppScopedParams {
230
+ id: string;
231
+ name: string;
232
+ description?: string | null;
233
+ image?: string | null;
234
+ imageId?: string | null;
235
+ parentId?: string | null;
236
+ }
237
+ interface GetCategoryParams extends AppScopedParams {
238
+ id: string;
239
+ }
240
+ interface CreateCollectionParams extends AppScopedParams {
241
+ title: string;
242
+ description?: string | null;
243
+ slug: string;
244
+ image?: string | null;
245
+ type?: string;
246
+ productIds?: string[];
247
+ isActive?: boolean;
248
+ }
249
+ interface EditCollectionParams extends AppScopedParams {
250
+ id: string;
251
+ title: string;
252
+ description?: string | null;
253
+ slug: string;
254
+ image?: string | null;
255
+ type?: string;
256
+ productIds?: string[];
257
+ isActive?: boolean;
258
+ }
259
+ interface GetCollectionParams extends AppScopedParams {
260
+ id: string;
261
+ }
262
+ interface CreateDiscountParams extends AppScopedParams {
263
+ code: string;
264
+ type: string;
265
+ value: number;
266
+ startsAt: string | Date;
267
+ endsAt?: string | Date | null;
268
+ usageLimit?: number | null;
269
+ minRequirement?: string;
270
+ minQuantity?: number | null;
271
+ minAmount?: number | null;
272
+ appliesTo?: string;
273
+ collectionIds?: string[];
274
+ productIds?: string[];
275
+ isActive?: boolean;
276
+ }
277
+ interface EditDiscountParams extends AppScopedParams {
278
+ id: string;
279
+ code: string;
280
+ type?: string;
281
+ value?: number;
282
+ startsAt?: string | Date;
283
+ endsAt?: string | Date | null;
284
+ usageLimit?: number | null;
285
+ minRequirement?: string;
286
+ minQuantity?: number | null;
287
+ minAmount?: number | null;
288
+ appliesTo?: string;
289
+ collectionIds?: string[];
290
+ productIds?: string[];
291
+ isActive?: boolean;
292
+ }
293
+ interface GetDiscountParams extends AppScopedParams {
294
+ id: string;
295
+ }
296
+ interface CreateOptionParams extends AppScopedParams {
297
+ name: string;
298
+ description?: string | null;
299
+ values: {
300
+ id: string;
301
+ text: string;
302
+ }[];
303
+ sellerId: string;
304
+ }
305
+ interface EditOptionParams extends AppScopedParams {
306
+ id: string;
307
+ name: string;
308
+ description?: string | null;
309
+ values: {
310
+ id: string;
311
+ text: string;
312
+ }[];
313
+ }
314
+ interface GetOptionParams extends AppScopedParams {
315
+ id: string;
316
+ }
317
+ interface CreateOrderParams extends AppScopedParams {
318
+ customerId: string;
319
+ sellerId: string;
320
+ items: {
321
+ variantId: string;
322
+ productId: string;
323
+ quantity?: number;
324
+ }[];
325
+ ref?: string | null;
326
+ shippingAddress?: Record<string, unknown>;
327
+ billingAddress?: Record<string, unknown>;
328
+ discountTotal?: number;
329
+ shippingTotal?: number;
330
+ taxTotal?: number;
331
+ }
332
+ interface EditOrderParams extends AppScopedParams {
333
+ id: string;
334
+ status?: string | null;
335
+ paymentStatus?: string | null;
336
+ fulfillmentStatus?: string | null;
337
+ ref?: string | null;
338
+ shippingAddress?: Record<string, unknown>;
339
+ billingAddress?: Record<string, unknown>;
340
+ }
341
+ interface GetOrderParams extends AppScopedParams {
342
+ id: string;
343
+ }
344
+ interface CreateProductParams extends AppScopedParams {
345
+ name: string;
346
+ sku?: string | null;
347
+ description?: string | null;
348
+ seoTitle?: string | null;
349
+ seoDescription?: string | null;
350
+ status?: string;
351
+ sellerId: string;
352
+ categoryId: string;
353
+ badgeId?: string | null;
354
+ collectionIds?: string[];
355
+ tagIds?: string[];
356
+ shippingProfileId?: string | null;
357
+ variants: unknown[];
358
+ attributes?: {
359
+ key: string;
360
+ value: string;
361
+ }[];
362
+ }
363
+ interface EditProductParams extends AppScopedParams {
364
+ id: string;
365
+ name: string;
366
+ description?: string | null;
367
+ seoTitle?: string | null;
368
+ seoDescription?: string | null;
369
+ status?: string;
370
+ categoryId?: string;
371
+ badgeId?: string | null;
372
+ collectionIds?: string[];
373
+ tagIds?: string[];
374
+ shippingProfileId?: string | null;
375
+ variants: unknown[];
376
+ attributes?: {
377
+ key: string;
378
+ value: string;
379
+ }[];
380
+ }
381
+ interface GetProductParams extends AppScopedParams {
382
+ id: string;
383
+ }
384
+ interface CreateSellerParams extends AppScopedParams {
385
+ fullname: string;
386
+ telephone: string;
387
+ email: string;
388
+ password?: string | null;
389
+ confirm?: string | null;
390
+ avatar?: string | null;
391
+ avatarId?: string | null;
392
+ country?: string;
393
+ isDefault?: boolean;
394
+ }
395
+ interface EditSellerParams extends AppScopedParams {
396
+ id: string;
397
+ fullname: string;
398
+ avatar?: string | null;
399
+ avatarId?: string | null;
400
+ telephone: string;
401
+ email: string;
402
+ }
403
+ interface GetSellerParams extends AppScopedParams {
404
+ id: string;
405
+ }
406
+ interface CreateShippingProfileParams extends AppScopedParams {
407
+ name: string;
408
+ zones?: unknown[];
409
+ isDefault?: boolean;
410
+ }
411
+ interface EditShippingProfileParams extends AppScopedParams {
412
+ id: string;
413
+ name: string;
414
+ zones?: unknown[];
415
+ isDefault?: boolean;
416
+ }
417
+ interface GetShippingProfileParams extends AppScopedParams {
418
+ id: string;
419
+ }
420
+ interface CreateTagParams extends AppScopedParams {
421
+ name: string;
422
+ }
423
+ interface EditTagParams extends AppScopedParams {
424
+ id: string;
425
+ name: string;
426
+ }
427
+ interface GetTagParams extends AppScopedParams {
428
+ id: string;
429
+ }
430
+ interface CreateTaxParams extends AppScopedParams {
431
+ name: string;
432
+ rate: number;
433
+ country?: string | null;
434
+ region?: string | null;
435
+ isCompound?: boolean;
436
+ isShippingTaxable?: boolean;
437
+ }
438
+ interface EditTaxParams extends AppScopedParams {
439
+ id: string;
440
+ name: string;
441
+ rate?: number;
442
+ country?: string | null;
443
+ region?: string | null;
444
+ isCompound?: boolean;
445
+ isShippingTaxable?: boolean;
446
+ }
447
+ interface GetTaxParams extends AppScopedParams {
448
+ id: string;
449
+ }
450
+ declare class StoreBadgeModule {
451
+ private readonly http;
452
+ constructor(http: HttpClient);
453
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
454
+ create(params: CreateBadgeParams): Promise<ApiSuccessResponse<unknown>>;
455
+ get(params: EditBadgeParams): Promise<ApiSuccessResponse<unknown>>;
456
+ update(params: EditBadgeParams): Promise<ApiSuccessResponse<unknown>>;
457
+ delete(params: DeleteBadgeParams): Promise<ApiSuccessResponse<unknown>>;
458
+ }
459
+ declare class StoreCategoryModule {
460
+ private readonly http;
461
+ constructor(http: HttpClient);
462
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
463
+ create(params: CreateCategoryParams): Promise<ApiSuccessResponse<unknown>>;
464
+ get(params: GetCategoryParams): Promise<ApiSuccessResponse<unknown>>;
465
+ update(params: EditCategoryParams): Promise<ApiSuccessResponse<unknown>>;
466
+ delete(params: GetCategoryParams): Promise<ApiSuccessResponse<unknown>>;
467
+ }
468
+ declare class StoreCollectionModule {
469
+ private readonly http;
470
+ constructor(http: HttpClient);
471
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
472
+ create(params: CreateCollectionParams): Promise<ApiSuccessResponse<unknown>>;
473
+ get(params: GetCollectionParams): Promise<ApiSuccessResponse<unknown>>;
474
+ update(params: EditCollectionParams): Promise<ApiSuccessResponse<unknown>>;
475
+ delete(params: GetCollectionParams): Promise<ApiSuccessResponse<unknown>>;
476
+ }
477
+ declare class StoreDiscountModule {
478
+ private readonly http;
479
+ constructor(http: HttpClient);
480
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
481
+ create(params: CreateDiscountParams): Promise<ApiSuccessResponse<unknown>>;
482
+ get(params: GetDiscountParams): Promise<ApiSuccessResponse<unknown>>;
483
+ update(params: EditDiscountParams): Promise<ApiSuccessResponse<unknown>>;
484
+ delete(params: GetDiscountParams): Promise<ApiSuccessResponse<unknown>>;
485
+ }
486
+ declare class StoreOptionModule {
487
+ private readonly http;
488
+ constructor(http: HttpClient);
489
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
490
+ create(params: CreateOptionParams): Promise<ApiSuccessResponse<unknown>>;
491
+ get(params: GetOptionParams): Promise<ApiSuccessResponse<unknown>>;
492
+ update(params: EditOptionParams): Promise<ApiSuccessResponse<unknown>>;
493
+ delete(params: GetOptionParams): Promise<ApiSuccessResponse<unknown>>;
494
+ }
495
+ declare class StoreOrderModule {
496
+ private readonly http;
497
+ constructor(http: HttpClient);
498
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
499
+ create(params: CreateOrderParams): Promise<ApiSuccessResponse<unknown>>;
500
+ get(params: GetOrderParams): Promise<ApiSuccessResponse<unknown>>;
501
+ update(params: EditOrderParams): Promise<ApiSuccessResponse<unknown>>;
502
+ delete(params: GetOrderParams): Promise<ApiSuccessResponse<unknown>>;
503
+ }
504
+ declare class StoreProductModule {
505
+ private readonly http;
506
+ constructor(http: HttpClient);
507
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
508
+ create(params: CreateProductParams): Promise<ApiSuccessResponse<unknown>>;
509
+ get(params: GetProductParams): Promise<ApiSuccessResponse<unknown>>;
510
+ update(params: EditProductParams): Promise<ApiSuccessResponse<unknown>>;
511
+ delete(params: GetProductParams): Promise<ApiSuccessResponse<unknown>>;
512
+ }
513
+ declare class StoreSellerModule {
514
+ private readonly http;
515
+ constructor(http: HttpClient);
516
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
517
+ create(params: CreateSellerParams): Promise<ApiSuccessResponse<unknown>>;
518
+ get(params: GetSellerParams): Promise<ApiSuccessResponse<unknown>>;
519
+ update(params: EditSellerParams): Promise<ApiSuccessResponse<unknown>>;
520
+ delete(params: GetSellerParams): Promise<ApiSuccessResponse<unknown>>;
521
+ }
522
+ declare class StoreShippingModule {
523
+ private readonly http;
524
+ constructor(http: HttpClient);
525
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
526
+ create(params: CreateShippingProfileParams): Promise<ApiSuccessResponse<unknown>>;
527
+ delete(params: GetShippingProfileParams): Promise<ApiSuccessResponse<unknown>>;
528
+ }
529
+ declare class StoreTagModule {
530
+ private readonly http;
531
+ constructor(http: HttpClient);
532
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
533
+ create(params: CreateTagParams): Promise<ApiSuccessResponse<unknown>>;
534
+ get(params: GetTagParams): Promise<ApiSuccessResponse<unknown>>;
535
+ update(params: EditTagParams): Promise<ApiSuccessResponse<unknown>>;
536
+ delete(params: GetTagParams): Promise<ApiSuccessResponse<unknown>>;
537
+ }
538
+ declare class StoreTaxModule {
539
+ private readonly http;
540
+ constructor(http: HttpClient);
541
+ list(params: AppScopedParams): Promise<ApiSuccessResponse<unknown>>;
542
+ create(params: CreateTaxParams): Promise<ApiSuccessResponse<unknown>>;
543
+ get(params: GetTaxParams): Promise<ApiSuccessResponse<unknown>>;
544
+ update(params: EditTaxParams): Promise<ApiSuccessResponse<unknown>>;
545
+ delete(params: GetTaxParams): Promise<ApiSuccessResponse<unknown>>;
546
+ }
547
+ declare class StoreModule {
548
+ readonly badge: StoreBadgeModule;
549
+ readonly category: StoreCategoryModule;
550
+ readonly collection: StoreCollectionModule;
551
+ readonly discount: StoreDiscountModule;
552
+ readonly option: StoreOptionModule;
553
+ readonly order: StoreOrderModule;
554
+ readonly product: StoreProductModule;
555
+ readonly seller: StoreSellerModule;
556
+ readonly shipping: StoreShippingModule;
557
+ readonly tag: StoreTagModule;
558
+ readonly tax: StoreTaxModule;
559
+ constructor(http: HttpClient);
560
+ }
561
+
562
+ interface WelcomeItemParams extends AppScopedParams {
563
+ }
564
+ interface CreateWelcomeItemParams extends AppScopedParams {
565
+ fileUrl: string;
566
+ fileType?: string;
567
+ title?: string;
568
+ description?: string;
569
+ plateformType: string;
570
+ }
571
+ interface EditWelcomeItemParams extends AppScopedParams {
572
+ id: string;
573
+ fileUrl?: string;
574
+ fileType?: string;
575
+ title?: string;
576
+ description?: string;
577
+ plateformType?: string;
578
+ }
579
+ interface WelcomeItemGetParams extends AppScopedParams {
580
+ id: string;
581
+ }
582
+ declare class AppWelcomeItemModule {
583
+ private readonly http;
584
+ constructor(http: HttpClient);
585
+ list(params: WelcomeItemParams): Promise<ApiSuccessResponse<unknown>>;
586
+ create(params: CreateWelcomeItemParams): Promise<ApiSuccessResponse<unknown>>;
587
+ get(params: WelcomeItemGetParams): Promise<ApiSuccessResponse<unknown>>;
588
+ update(params: EditWelcomeItemParams): Promise<ApiSuccessResponse<unknown>>;
589
+ delete(params: WelcomeItemGetParams): Promise<ApiSuccessResponse<unknown>>;
590
+ }
591
+
592
+ type CreateAgentParams = z.infer<typeof CreateAgentSchema> & {
593
+ appId: string;
594
+ };
595
+ type EditAgentParams = z.infer<typeof UpdateAgentSchema> & {
596
+ appId: string;
597
+ id: string;
598
+ };
599
+ interface GetAgentParams extends AppScopedParams {
600
+ id: string;
601
+ companyId?: string | null;
602
+ }
603
+ interface ListAgentsParams extends AppScopedParams {
604
+ companyId?: string | null;
605
+ serviceId?: string;
606
+ isActive?: boolean;
607
+ }
608
+ declare class MultiServiceAgentModule {
609
+ private readonly http;
610
+ constructor(http: HttpClient);
611
+ list(params: ListAgentsParams): Promise<ApiSuccessResponse<unknown>>;
612
+ create(params: CreateAgentParams): Promise<ApiSuccessResponse<unknown>>;
613
+ get(params: GetAgentParams): Promise<ApiSuccessResponse<unknown>>;
614
+ update(params: EditAgentParams): Promise<ApiSuccessResponse<unknown>>;
615
+ delete(params: GetAgentParams): Promise<ApiSuccessResponse<unknown>>;
616
+ }
617
+
618
+ type CreateAppointmentParams = z.infer<typeof CreateAppointmentSchema> & {
619
+ appId: string;
620
+ };
621
+ type UpdateAppointmentStatusParams = z.infer<typeof UpdateAppointmentStatusSchema> & {
622
+ appId: string;
623
+ id: string;
624
+ companyId?: string | null;
625
+ };
626
+ interface ListAppointmentsParams extends AppScopedParams {
627
+ companyId?: string | null;
628
+ serviceId?: string;
629
+ status?: string;
630
+ }
631
+ declare class MultiServiceAppointmentModule {
632
+ private readonly http;
633
+ constructor(http: HttpClient);
634
+ create(params: CreateAppointmentParams): Promise<ApiSuccessResponse<unknown>>;
635
+ list(params: ListAppointmentsParams): Promise<ApiSuccessResponse<unknown>>;
636
+ updateStatus(params: UpdateAppointmentStatusParams): Promise<ApiSuccessResponse<unknown>>;
637
+ }
638
+
639
+ type CreateCompanyParams = z.infer<typeof CreateCompanySchema> & {
640
+ appId: string;
641
+ };
642
+ type EditCompanyParams = z.infer<typeof UpdateCompanySchema> & {
643
+ appId: string;
644
+ id: string;
645
+ };
646
+ interface GetCompanyParams extends AppScopedParams {
647
+ id: string;
648
+ }
649
+ interface ListCompaniesParams extends AppScopedParams {
650
+ }
651
+ declare class MultiServiceCompanyModule {
652
+ private readonly http;
653
+ constructor(http: HttpClient);
654
+ list(params: ListCompaniesParams): Promise<ApiSuccessResponse<unknown>>;
655
+ create(params: CreateCompanyParams): Promise<ApiSuccessResponse<unknown>>;
656
+ get(params: GetCompanyParams): Promise<ApiSuccessResponse<unknown>>;
657
+ update(params: EditCompanyParams): Promise<ApiSuccessResponse<unknown>>;
658
+ delete(params: GetCompanyParams): Promise<ApiSuccessResponse<unknown>>;
659
+ }
660
+
661
+ type CreateServiceParams = z.infer<typeof CreateServiceSchema> & {
662
+ appId: string;
663
+ };
664
+ type EditServiceParams = z.infer<typeof UpdateServiceSchema> & {
665
+ appId: string;
666
+ id: string;
667
+ };
668
+ interface GetServiceParams extends AppScopedParams {
669
+ id: string;
670
+ companyId?: string | null;
671
+ }
672
+ interface ListServicesParams extends AppScopedParams {
673
+ companyId?: string | null;
674
+ }
675
+ declare class MultiServiceServiceModule {
676
+ private readonly http;
677
+ constructor(http: HttpClient);
678
+ list(params: ListServicesParams): Promise<ApiSuccessResponse<unknown>>;
679
+ create(params: CreateServiceParams): Promise<ApiSuccessResponse<unknown>>;
680
+ get(params: GetServiceParams): Promise<ApiSuccessResponse<unknown>>;
681
+ update(params: EditServiceParams): Promise<ApiSuccessResponse<unknown>>;
682
+ delete(params: GetServiceParams): Promise<ApiSuccessResponse<unknown>>;
683
+ }
684
+
685
+ declare class MultiServiceModule {
686
+ private readonly http;
687
+ readonly company: MultiServiceCompanyModule;
688
+ readonly service: MultiServiceServiceModule;
689
+ readonly appointment: MultiServiceAppointmentModule;
690
+ readonly agent: MultiServiceAgentModule;
691
+ constructor(http: HttpClient);
692
+ }
693
+
694
+ declare class AppModule {
695
+ readonly customer: AppCustomerModule;
696
+ readonly stats: AppStatsModule;
697
+ readonly finance: AppFinanceModule;
698
+ readonly welcomeItem: AppWelcomeItemModule;
699
+ readonly info: AppInfoModule;
700
+ readonly store: StoreModule;
701
+ readonly multiService: MultiServiceModule;
702
+ constructor(http: HttpClient);
703
+ }
704
+
705
+ interface AppliteUIConfig extends HttpClientConfig {
706
+ }
707
+ declare class AppliteUI {
708
+ readonly http: HttpClient;
709
+ readonly app: AppModule;
710
+ constructor(config?: AppliteUIConfig);
711
+ }
712
+
713
+ export { type ApiErrorResponse, type ApiKeyParams, type ApiResponse, type ApiSuccessResponse, type AppCustomer, type AppCustomerAuthParams, type AppCustomerCheckParams, type AppCustomerDetail, type AppCustomerGetParams, type AppCustomerListFewItem, type AppCustomerListItem, type AppCustomerListParams, AppCustomerModule, type AppCustomerUpdateParams, type AppDetail, AppFinanceModule, AppInfoModule, AppModule, type AppScopedParams, AppStatsModule, type AppSummary, AppWelcomeItemModule, AppliteUI, type AppliteUIConfig, type BalanceParams, type CreateAgentParams, type CreateAppParams, type CreateAppointmentParams, type CreateBadgeParams, type CreateCategoryParams, type CreateCollectionParams, type CreateCompanyParams, type CreateDiscountParams, type CreateOptionParams, type CreateOrderParams, type CreateProductParams, type CreateSellerParams, type CreateServiceParams, type CreateShippingProfileParams, type CreateStatisticParams, type CreateTagParams, type CreateTaxParams, type CreateWelcomeItemParams, type DeleteBadgeParams, type EditAgentParams, type EditBadgeParams, type EditCategoryParams, type EditCollectionParams, type EditCompanyParams, type EditDiscountParams, type EditOptionParams, type EditOrderParams, type EditProductParams, type EditSellerParams, type EditServiceParams, type EditShippingProfileParams, type EditTagParams, type EditTaxParams, type EditWelcomeItemParams, type GetAgentParams, type GetAppBySlugParams, type GetCategoryParams, type GetCollectionParams, type GetCompanyParams, type GetDiscountParams, type GetOptionParams, type GetOrderParams, type GetProductParams, type GetSellerParams, type GetServiceParams, type GetShippingProfileParams, type GetStatisticParams, type GetTagParams, type GetTaxParams, HttpClient, type HttpClientConfig, type ListAgentsParams, type ListAppointmentsParams, type ListCompaniesParams, type ListServicesParams, MultiServiceAgentModule, MultiServiceAppointmentModule, MultiServiceCompanyModule, MultiServiceModule, MultiServiceServiceModule, type PlateformType, type Sexe, StoreBadgeModule, StoreCategoryModule, StoreCollectionModule, StoreDiscountModule, StoreModule, StoreOptionModule, StoreOrderModule, StoreProductModule, StoreSellerModule, StoreShippingModule, StoreTagModule, StoreTaxModule, type TransactionGetParams, type TransactionListParams, type UpdateAppointmentStatusParams, type UpdateStatisticParams, type WelcomeItemGetParams, type WelcomeItemParams, type WithdrawParams, plateformTypes, sexes };