@vitalfit/sdk 0.3.9 → 0.3.10

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.d.cts CHANGED
@@ -1246,7 +1246,7 @@ declare class InstructorService {
1246
1246
  deleteInstructor(instructorId: string, jwt: string): Promise<void>;
1247
1247
  addSpecialty(instructorId: string, specialty: Specialty[], jwt: string): Promise<void>;
1248
1248
  removeSpecialty(instructorId: string, specialtyId: string, jwt: string): Promise<void>;
1249
- getAssignedClients(instructorId: string, jwt: string, { page, limit, sort, search }?: PaginationRequest): Promise<PaginatedTotal<AssignedClientResponse[]>>;
1249
+ getAssignedClients(jwt: string, instructorId?: string, { page, limit, sort, search }?: PaginationRequest): Promise<PaginatedTotal<AssignedClientResponse[]>>;
1250
1250
  addBranchInstructor(branchId: string, instructorIDs: string[], jwt: string): Promise<void>;
1251
1251
  removeBranchInstructor(branchId: string, instructorId: string, jwt: string): Promise<void>;
1252
1252
  getBranchInstructors(branchId: string, { search, identity_doc }: PaginatedInstructor, jwt: string): Promise<DataResponse<BranchInstructorInfo[]>>;
@@ -1501,9 +1501,9 @@ type DownloadResponse = {
1501
1501
  declare class ExportsService {
1502
1502
  private client;
1503
1503
  constructor(client: Client);
1504
- exportFinancialReport(jwt: string, start?: string, end?: string, branchId?: string): Promise<DownloadResponse>;
1505
- exportClientsReport(jwt: string, start?: string, end?: string, branchId?: string): Promise<DownloadResponse>;
1506
- exportSalesReport(jwt: string, start?: string, end?: string, branchId?: string): Promise<DownloadResponse>;
1504
+ exportFinancialReport(jwt: string, start?: string, end?: string, branchId?: string, format?: 'csv' | 'excel' | 'pdf'): Promise<DownloadResponse>;
1505
+ exportClientsReport(jwt: string, format?: 'csv' | 'excel' | 'pdf'): Promise<DownloadResponse>;
1506
+ exportSalesReport(jwt: string, start?: string, end?: string, branchId?: string, format?: 'csv' | 'excel' | 'pdf'): Promise<DownloadResponse>;
1507
1507
  exportClients(jwt: string): Promise<DownloadResponse>;
1508
1508
  exportStaff(jwt: string): Promise<DownloadResponse>;
1509
1509
  exportInstructors(jwt: string): Promise<DownloadResponse>;
package/dist/index.d.ts CHANGED
@@ -1246,7 +1246,7 @@ declare class InstructorService {
1246
1246
  deleteInstructor(instructorId: string, jwt: string): Promise<void>;
1247
1247
  addSpecialty(instructorId: string, specialty: Specialty[], jwt: string): Promise<void>;
1248
1248
  removeSpecialty(instructorId: string, specialtyId: string, jwt: string): Promise<void>;
1249
- getAssignedClients(instructorId: string, jwt: string, { page, limit, sort, search }?: PaginationRequest): Promise<PaginatedTotal<AssignedClientResponse[]>>;
1249
+ getAssignedClients(jwt: string, instructorId?: string, { page, limit, sort, search }?: PaginationRequest): Promise<PaginatedTotal<AssignedClientResponse[]>>;
1250
1250
  addBranchInstructor(branchId: string, instructorIDs: string[], jwt: string): Promise<void>;
1251
1251
  removeBranchInstructor(branchId: string, instructorId: string, jwt: string): Promise<void>;
1252
1252
  getBranchInstructors(branchId: string, { search, identity_doc }: PaginatedInstructor, jwt: string): Promise<DataResponse<BranchInstructorInfo[]>>;
@@ -1501,9 +1501,9 @@ type DownloadResponse = {
1501
1501
  declare class ExportsService {
1502
1502
  private client;
1503
1503
  constructor(client: Client);
1504
- exportFinancialReport(jwt: string, start?: string, end?: string, branchId?: string): Promise<DownloadResponse>;
1505
- exportClientsReport(jwt: string, start?: string, end?: string, branchId?: string): Promise<DownloadResponse>;
1506
- exportSalesReport(jwt: string, start?: string, end?: string, branchId?: string): Promise<DownloadResponse>;
1504
+ exportFinancialReport(jwt: string, start?: string, end?: string, branchId?: string, format?: 'csv' | 'excel' | 'pdf'): Promise<DownloadResponse>;
1505
+ exportClientsReport(jwt: string, format?: 'csv' | 'excel' | 'pdf'): Promise<DownloadResponse>;
1506
+ exportSalesReport(jwt: string, start?: string, end?: string, branchId?: string, format?: 'csv' | 'excel' | 'pdf'): Promise<DownloadResponse>;
1507
1507
  exportClients(jwt: string): Promise<DownloadResponse>;
1508
1508
  exportStaff(jwt: string): Promise<DownloadResponse>;
1509
1509
  exportInstructors(jwt: string): Promise<DownloadResponse>;
package/dist/index.js CHANGED
@@ -764,7 +764,7 @@ var InstructorService = class {
764
764
  jwt
765
765
  });
766
766
  }
767
- async getAssignedClients(instructorId, jwt, { page = 1, limit = 10, sort = "desc", search } = {}) {
767
+ async getAssignedClients(jwt, instructorId, { page = 1, limit = 10, sort = "desc", search } = {}) {
768
768
  const response = await this.client.get({
769
769
  url: `/instructor/${instructorId}/clients`,
770
770
  jwt,
@@ -2477,36 +2477,36 @@ var ExportsService = class {
2477
2477
  this.exportPaymentMethods = this.exportPaymentMethods.bind(this);
2478
2478
  }
2479
2479
  // Reports
2480
- async exportFinancialReport(jwt, start, end, branchId) {
2480
+ async exportFinancialReport(jwt, start, end, branchId, format) {
2481
2481
  return await this.client.download({
2482
2482
  url: "/reports/export/financial",
2483
2483
  jwt,
2484
2484
  params: {
2485
2485
  start,
2486
2486
  end,
2487
- branch_id: branchId
2487
+ branch_id: branchId,
2488
+ type: format
2488
2489
  }
2489
2490
  });
2490
2491
  }
2491
- async exportClientsReport(jwt, start, end, branchId) {
2492
+ async exportClientsReport(jwt, format) {
2492
2493
  return await this.client.download({
2493
2494
  url: "/reports/export/clients",
2494
2495
  jwt,
2495
2496
  params: {
2496
- start,
2497
- end,
2498
- branch_id: branchId
2497
+ type: format
2499
2498
  }
2500
2499
  });
2501
2500
  }
2502
- async exportSalesReport(jwt, start, end, branchId) {
2501
+ async exportSalesReport(jwt, start, end, branchId, format) {
2503
2502
  return await this.client.download({
2504
2503
  url: "/reports/export/sales",
2505
2504
  jwt,
2506
2505
  params: {
2507
2506
  start,
2508
2507
  end,
2509
- branch_id: branchId
2508
+ branch_id: branchId,
2509
+ type: format
2510
2510
  }
2511
2511
  });
2512
2512
  }
@@ -2737,7 +2737,7 @@ var VitalFit = class _VitalFit {
2737
2737
  return _VitalFit.instance;
2738
2738
  }
2739
2739
  version() {
2740
- return "0.3.9";
2740
+ return "0.3.10";
2741
2741
  }
2742
2742
  };
2743
2743
  export {