@applite/js-sdk 0.0.1 → 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.
package/dist/index.mjs CHANGED
@@ -1,5 +1,8 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
1
4
  // src/http.ts
2
- var HttpClient = class {
5
+ var _HttpClient = class _HttpClient {
3
6
  constructor(config = {}) {
4
7
  this.baseUrl = config.baseUrl?.replace(/\/$/, "") ?? "";
5
8
  this.headers = config.headers ?? {};
@@ -28,6 +31,8 @@ var HttpClient = class {
28
31
  return payload;
29
32
  }
30
33
  };
34
+ __name(_HttpClient, "HttpClient");
35
+ var HttpClient = _HttpClient;
31
36
 
32
37
  // src/modules/app/customer.ts
33
38
  var plateformTypes = [
@@ -39,7 +44,7 @@ var plateformTypes = [
39
44
  "DUTICOTAC"
40
45
  ];
41
46
  var sexes = ["M", "F"];
42
- var AppCustomerModule = class {
47
+ var _AppCustomerModule = class _AppCustomerModule {
43
48
  constructor(http) {
44
49
  this.http = http;
45
50
  }
@@ -101,9 +106,11 @@ var AppCustomerModule = class {
101
106
  );
102
107
  }
103
108
  };
109
+ __name(_AppCustomerModule, "AppCustomerModule");
110
+ var AppCustomerModule = _AppCustomerModule;
104
111
 
105
112
  // src/modules/app/finance.ts
106
- var AppFinanceModule = class {
113
+ var _AppFinanceModule = class _AppFinanceModule {
107
114
  constructor(http) {
108
115
  this.http = http;
109
116
  }
@@ -124,9 +131,11 @@ var AppFinanceModule = class {
124
131
  return this.http.post(`/app/${appId}/withdraw`, body);
125
132
  }
126
133
  };
134
+ __name(_AppFinanceModule, "AppFinanceModule");
135
+ var AppFinanceModule = _AppFinanceModule;
127
136
 
128
137
  // src/modules/app/info.ts
129
- var AppInfoModule = class {
138
+ var _AppInfoModule = class _AppInfoModule {
130
139
  constructor(http) {
131
140
  this.http = http;
132
141
  }
@@ -145,9 +154,11 @@ var AppInfoModule = class {
145
154
  return this.http.post(`/app/app/${appId}`, body);
146
155
  }
147
156
  };
157
+ __name(_AppInfoModule, "AppInfoModule");
158
+ var AppInfoModule = _AppInfoModule;
148
159
 
149
160
  // src/modules/app/stats.ts
150
- var AppStatsModule = class {
161
+ var _AppStatsModule = class _AppStatsModule {
151
162
  constructor(http) {
152
163
  this.http = http;
153
164
  }
@@ -168,9 +179,11 @@ var AppStatsModule = class {
168
179
  return this.http.post(`/app/${appId}/stats/${id}/update`, body);
169
180
  }
170
181
  };
182
+ __name(_AppStatsModule, "AppStatsModule");
183
+ var AppStatsModule = _AppStatsModule;
171
184
 
172
185
  // src/modules/app/store.ts
173
- var StoreBadgeModule = class {
186
+ var _StoreBadgeModule = class _StoreBadgeModule {
174
187
  constructor(http) {
175
188
  this.http = http;
176
189
  }
@@ -195,7 +208,9 @@ var StoreBadgeModule = class {
195
208
  return this.http.post(`/app/${appId}/store/badge/${id}/delete`, body);
196
209
  }
197
210
  };
198
- var StoreCategoryModule = class {
211
+ __name(_StoreBadgeModule, "StoreBadgeModule");
212
+ var StoreBadgeModule = _StoreBadgeModule;
213
+ var _StoreCategoryModule = class _StoreCategoryModule {
199
214
  constructor(http) {
200
215
  this.http = http;
201
216
  }
@@ -220,7 +235,9 @@ var StoreCategoryModule = class {
220
235
  return this.http.post(`/app/${appId}/store/category/${id}/delete`, body);
221
236
  }
222
237
  };
223
- var StoreCollectionModule = class {
238
+ __name(_StoreCategoryModule, "StoreCategoryModule");
239
+ var StoreCategoryModule = _StoreCategoryModule;
240
+ var _StoreCollectionModule = class _StoreCollectionModule {
224
241
  constructor(http) {
225
242
  this.http = http;
226
243
  }
@@ -245,7 +262,9 @@ var StoreCollectionModule = class {
245
262
  return this.http.post(`/app/${appId}/store/collection/${id}/delete`, body);
246
263
  }
247
264
  };
248
- var StoreDiscountModule = class {
265
+ __name(_StoreCollectionModule, "StoreCollectionModule");
266
+ var StoreCollectionModule = _StoreCollectionModule;
267
+ var _StoreDiscountModule = class _StoreDiscountModule {
249
268
  constructor(http) {
250
269
  this.http = http;
251
270
  }
@@ -270,7 +289,9 @@ var StoreDiscountModule = class {
270
289
  return this.http.post(`/app/${appId}/store/discount/${id}/delete`, body);
271
290
  }
272
291
  };
273
- var StoreOptionModule = class {
292
+ __name(_StoreDiscountModule, "StoreDiscountModule");
293
+ var StoreDiscountModule = _StoreDiscountModule;
294
+ var _StoreOptionModule = class _StoreOptionModule {
274
295
  constructor(http) {
275
296
  this.http = http;
276
297
  }
@@ -295,7 +316,9 @@ var StoreOptionModule = class {
295
316
  return this.http.post(`/app/${appId}/store/option/${id}/delete`, body);
296
317
  }
297
318
  };
298
- var StoreOrderModule = class {
319
+ __name(_StoreOptionModule, "StoreOptionModule");
320
+ var StoreOptionModule = _StoreOptionModule;
321
+ var _StoreOrderModule = class _StoreOrderModule {
299
322
  constructor(http) {
300
323
  this.http = http;
301
324
  }
@@ -320,7 +343,9 @@ var StoreOrderModule = class {
320
343
  return this.http.post(`/app/${appId}/store/order/${id}/delete`, body);
321
344
  }
322
345
  };
323
- var StoreProductModule = class {
346
+ __name(_StoreOrderModule, "StoreOrderModule");
347
+ var StoreOrderModule = _StoreOrderModule;
348
+ var _StoreProductModule = class _StoreProductModule {
324
349
  constructor(http) {
325
350
  this.http = http;
326
351
  }
@@ -345,7 +370,9 @@ var StoreProductModule = class {
345
370
  return this.http.post(`/app/${appId}/store/product/${id}/delete`, body);
346
371
  }
347
372
  };
348
- var StoreSellerModule = class {
373
+ __name(_StoreProductModule, "StoreProductModule");
374
+ var StoreProductModule = _StoreProductModule;
375
+ var _StoreSellerModule = class _StoreSellerModule {
349
376
  constructor(http) {
350
377
  this.http = http;
351
378
  }
@@ -370,7 +397,9 @@ var StoreSellerModule = class {
370
397
  return this.http.post(`/app/${appId}/store/seller/${id}/delete`, body);
371
398
  }
372
399
  };
373
- var StoreShippingModule = class {
400
+ __name(_StoreSellerModule, "StoreSellerModule");
401
+ var StoreSellerModule = _StoreSellerModule;
402
+ var _StoreShippingModule = class _StoreShippingModule {
374
403
  constructor(http) {
375
404
  this.http = http;
376
405
  }
@@ -387,7 +416,9 @@ var StoreShippingModule = class {
387
416
  return this.http.post(`/app/${appId}/store/shipping/${id}/delete`, body);
388
417
  }
389
418
  };
390
- var StoreTagModule = class {
419
+ __name(_StoreShippingModule, "StoreShippingModule");
420
+ var StoreShippingModule = _StoreShippingModule;
421
+ var _StoreTagModule = class _StoreTagModule {
391
422
  constructor(http) {
392
423
  this.http = http;
393
424
  }
@@ -412,7 +443,9 @@ var StoreTagModule = class {
412
443
  return this.http.post(`/app/${appId}/store/tag/${id}/delete`, body);
413
444
  }
414
445
  };
415
- var StoreTaxModule = class {
446
+ __name(_StoreTagModule, "StoreTagModule");
447
+ var StoreTagModule = _StoreTagModule;
448
+ var _StoreTaxModule = class _StoreTaxModule {
416
449
  constructor(http) {
417
450
  this.http = http;
418
451
  }
@@ -437,9 +470,10 @@ var StoreTaxModule = class {
437
470
  return this.http.post(`/app/${appId}/store/tax/${id}/delete`, body);
438
471
  }
439
472
  };
440
- var StoreModule = class {
473
+ __name(_StoreTaxModule, "StoreTaxModule");
474
+ var StoreTaxModule = _StoreTaxModule;
475
+ var _StoreModule = class _StoreModule {
441
476
  constructor(http) {
442
- this.http = http;
443
477
  this.badge = new StoreBadgeModule(http);
444
478
  this.category = new StoreCategoryModule(http);
445
479
  this.collection = new StoreCollectionModule(http);
@@ -453,9 +487,11 @@ var StoreModule = class {
453
487
  this.tax = new StoreTaxModule(http);
454
488
  }
455
489
  };
490
+ __name(_StoreModule, "StoreModule");
491
+ var StoreModule = _StoreModule;
456
492
 
457
493
  // src/modules/app/welcome-item.ts
458
- var AppWelcomeItemModule = class {
494
+ var _AppWelcomeItemModule = class _AppWelcomeItemModule {
459
495
  constructor(http) {
460
496
  this.http = http;
461
497
  }
@@ -480,93 +516,136 @@ var AppWelcomeItemModule = class {
480
516
  return this.http.post(`/app/${appId}/welcome-item/${id}/delete`, body);
481
517
  }
482
518
  };
519
+ __name(_AppWelcomeItemModule, "AppWelcomeItemModule");
520
+ var AppWelcomeItemModule = _AppWelcomeItemModule;
483
521
 
484
- // src/modules/app/multi-service/index.ts
485
- var MultiServiceModule = class {
522
+ // src/modules/app/multi-service/agent.ts
523
+ var _MultiServiceAgentModule = class _MultiServiceAgentModule {
486
524
  constructor(http) {
487
525
  this.http = http;
488
526
  }
489
- listCompanies(params) {
527
+ list(params) {
490
528
  const { appId, ...body } = params;
491
- return this.http.post(`/app/${appId}/multi-service/companies/list`, body);
529
+ return this.http.post(`/app/${appId}/multi-service/agents/list`, body);
492
530
  }
493
- createCompany(params) {
531
+ create(params) {
494
532
  const { appId, ...body } = params;
495
- return this.http.post(`/app/${appId}/multi-service/companies/create`, body);
496
- }
497
- getCompany(params) {
498
- const { appId, id, ...body } = params;
499
- return this.http.post(`/app/${appId}/multi-service/companies/${id}`, body);
500
- }
501
- updateCompany(params) {
502
- const { appId, id, ...body } = params;
503
- return this.http.post(`/app/${appId}/multi-service/companies/${id}/edit`, body);
533
+ return this.http.post(`/app/${appId}/multi-service/agents/create`, body);
504
534
  }
505
- deleteCompany(params) {
535
+ get(params) {
506
536
  const { appId, id, ...body } = params;
507
- return this.http.post(`/app/${appId}/multi-service/companies/${id}/delete`, body);
508
- }
509
- listServices(params) {
510
- const { appId, ...body } = params;
511
- return this.http.post(`/app/${appId}/multi-service/services/list`, body);
512
- }
513
- createService(params) {
514
- const { appId, ...body } = params;
515
- return this.http.post(`/app/${appId}/multi-service/services/create`, body);
537
+ return this.http.post(`/app/${appId}/multi-service/agents/${id}`, body);
516
538
  }
517
- getService(params) {
539
+ update(params) {
518
540
  const { appId, id, ...body } = params;
519
- return this.http.post(`/app/${appId}/multi-service/services/${id}`, body);
541
+ return this.http.post(`/app/${appId}/multi-service/agents/${id}/edit`, body);
520
542
  }
521
- updateService(params) {
543
+ delete(params) {
522
544
  const { appId, id, ...body } = params;
523
- return this.http.post(`/app/${appId}/multi-service/services/${id}/edit`, body);
545
+ return this.http.post(`/app/${appId}/multi-service/agents/${id}/delete`, body);
524
546
  }
525
- deleteService(params) {
526
- const { appId, id, ...body } = params;
527
- return this.http.post(`/app/${appId}/multi-service/services/${id}/delete`, body);
547
+ };
548
+ __name(_MultiServiceAgentModule, "MultiServiceAgentModule");
549
+ var MultiServiceAgentModule = _MultiServiceAgentModule;
550
+
551
+ // src/modules/app/multi-service/appointment.ts
552
+ var _MultiServiceAppointmentModule = class _MultiServiceAppointmentModule {
553
+ constructor(http) {
554
+ this.http = http;
528
555
  }
529
- createAppointment(params) {
556
+ create(params) {
530
557
  const { appId, ...body } = params;
531
558
  return this.http.post(`/app/${appId}/multi-service/appointments/create`, body);
532
559
  }
533
- listAppointments(params) {
560
+ list(params) {
534
561
  const { appId, ...body } = params;
535
562
  return this.http.post(`/app/${appId}/multi-service/appointments/list`, body);
536
563
  }
537
- updateAppointmentStatus(params) {
564
+ updateStatus(params) {
538
565
  const { appId, id, ...body } = params;
539
566
  return this.http.post(
540
567
  `/app/${appId}/multi-service/appointments/${id}/status`,
541
568
  body
542
569
  );
543
570
  }
544
- listAgents(params) {
571
+ };
572
+ __name(_MultiServiceAppointmentModule, "MultiServiceAppointmentModule");
573
+ var MultiServiceAppointmentModule = _MultiServiceAppointmentModule;
574
+
575
+ // src/modules/app/multi-service/company.ts
576
+ var _MultiServiceCompanyModule = class _MultiServiceCompanyModule {
577
+ constructor(http) {
578
+ this.http = http;
579
+ }
580
+ list(params) {
545
581
  const { appId, ...body } = params;
546
- return this.http.post(`/app/${appId}/multi-service/agents/list`, body);
582
+ return this.http.post(`/app/${appId}/multi-service/companies/list`, body);
547
583
  }
548
- createAgent(params) {
584
+ create(params) {
549
585
  const { appId, ...body } = params;
550
- return this.http.post(`/app/${appId}/multi-service/agents/create`, body);
586
+ return this.http.post(`/app/${appId}/multi-service/companies/create`, body);
551
587
  }
552
- getAgent(params) {
588
+ get(params) {
553
589
  const { appId, id, ...body } = params;
554
- return this.http.post(`/app/${appId}/multi-service/agents/${id}`, body);
590
+ return this.http.post(`/app/${appId}/multi-service/companies/${id}`, body);
555
591
  }
556
- updateAgent(params) {
592
+ update(params) {
557
593
  const { appId, id, ...body } = params;
558
- return this.http.post(`/app/${appId}/multi-service/agents/${id}/edit`, body);
594
+ return this.http.post(`/app/${appId}/multi-service/companies/${id}/edit`, body);
559
595
  }
560
- deleteAgent(params) {
596
+ delete(params) {
561
597
  const { appId, id, ...body } = params;
562
- return this.http.post(`/app/${appId}/multi-service/agents/${id}/delete`, body);
598
+ return this.http.post(`/app/${appId}/multi-service/companies/${id}/delete`, body);
563
599
  }
564
600
  };
601
+ __name(_MultiServiceCompanyModule, "MultiServiceCompanyModule");
602
+ var MultiServiceCompanyModule = _MultiServiceCompanyModule;
565
603
 
566
- // src/modules/app/index.ts
567
- var AppModule = class {
604
+ // src/modules/app/multi-service/service.ts
605
+ var _MultiServiceServiceModule = class _MultiServiceServiceModule {
606
+ constructor(http) {
607
+ this.http = http;
608
+ }
609
+ list(params) {
610
+ const { appId, ...body } = params;
611
+ return this.http.post(`/app/${appId}/multi-service/services/list`, body);
612
+ }
613
+ create(params) {
614
+ const { appId, ...body } = params;
615
+ return this.http.post(`/app/${appId}/multi-service/services/create`, body);
616
+ }
617
+ get(params) {
618
+ const { appId, id, ...body } = params;
619
+ return this.http.post(`/app/${appId}/multi-service/services/${id}`, body);
620
+ }
621
+ update(params) {
622
+ const { appId, id, ...body } = params;
623
+ return this.http.post(`/app/${appId}/multi-service/services/${id}/edit`, body);
624
+ }
625
+ delete(params) {
626
+ const { appId, id, ...body } = params;
627
+ return this.http.post(`/app/${appId}/multi-service/services/${id}/delete`, body);
628
+ }
629
+ };
630
+ __name(_MultiServiceServiceModule, "MultiServiceServiceModule");
631
+ var MultiServiceServiceModule = _MultiServiceServiceModule;
632
+
633
+ // src/modules/app/multi-service/index.ts
634
+ var _MultiServiceModule = class _MultiServiceModule {
568
635
  constructor(http) {
569
636
  this.http = http;
637
+ this.company = new MultiServiceCompanyModule(http);
638
+ this.service = new MultiServiceServiceModule(http);
639
+ this.appointment = new MultiServiceAppointmentModule(http);
640
+ this.agent = new MultiServiceAgentModule(http);
641
+ }
642
+ };
643
+ __name(_MultiServiceModule, "MultiServiceModule");
644
+ var MultiServiceModule = _MultiServiceModule;
645
+
646
+ // src/modules/app/index.ts
647
+ var _AppModule = class _AppModule {
648
+ constructor(http) {
570
649
  this.customer = new AppCustomerModule(http);
571
650
  this.stats = new AppStatsModule(http);
572
651
  this.finance = new AppFinanceModule(http);
@@ -576,9 +655,11 @@ var AppModule = class {
576
655
  this.multiService = new MultiServiceModule(http);
577
656
  }
578
657
  };
658
+ __name(_AppModule, "AppModule");
659
+ var AppModule = _AppModule;
579
660
 
580
661
  // src/index.ts
581
- var AppliteUI = class {
662
+ var _AppliteUI = class _AppliteUI {
582
663
  constructor(config = {}) {
583
664
  this.http = new HttpClient({
584
665
  baseUrl: config.baseUrl,
@@ -588,29 +669,9 @@ var AppliteUI = class {
588
669
  this.app = new AppModule(this.http);
589
670
  }
590
671
  };
591
- export {
592
- AppCustomerModule,
593
- AppFinanceModule,
594
- AppInfoModule,
595
- AppModule,
596
- AppStatsModule,
597
- AppWelcomeItemModule,
598
- AppliteUI,
599
- HttpClient,
600
- MultiServiceModule,
601
- StoreBadgeModule,
602
- StoreCategoryModule,
603
- StoreCollectionModule,
604
- StoreDiscountModule,
605
- StoreModule,
606
- StoreOptionModule,
607
- StoreOrderModule,
608
- StoreProductModule,
609
- StoreSellerModule,
610
- StoreShippingModule,
611
- StoreTagModule,
612
- StoreTaxModule,
613
- plateformTypes,
614
- sexes
615
- };
672
+ __name(_AppliteUI, "AppliteUI");
673
+ var AppliteUI = _AppliteUI;
674
+
675
+ export { AppCustomerModule, AppFinanceModule, AppInfoModule, AppModule, AppStatsModule, AppWelcomeItemModule, AppliteUI, HttpClient, MultiServiceAgentModule, MultiServiceAppointmentModule, MultiServiceCompanyModule, MultiServiceModule, MultiServiceServiceModule, StoreBadgeModule, StoreCategoryModule, StoreCollectionModule, StoreDiscountModule, StoreModule, StoreOptionModule, StoreOrderModule, StoreProductModule, StoreSellerModule, StoreShippingModule, StoreTagModule, StoreTaxModule, plateformTypes, sexes };
676
+ //# sourceMappingURL=index.mjs.map
616
677
  //# sourceMappingURL=index.mjs.map