@gymspace/sdk 1.9.33 → 1.9.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gymspace/sdk",
3
- "version": "1.9.33",
3
+ "version": "1.9.34",
4
4
  "description": "GymSpace TypeScript SDK for API integration",
5
5
  "author": "GymSpace Team",
6
6
  "license": "MIT",
@@ -26,6 +26,21 @@ export interface CatalogActivity {
26
26
  imageUrl: string | null;
27
27
  }
28
28
 
29
+ /**
30
+ * Pricing package for a membership plan
31
+ */
32
+ export interface CatalogPricingPackage {
33
+ id: string;
34
+ name: string;
35
+ description: string | null;
36
+ price: number;
37
+ currency: string;
38
+ durationMonths: number | null;
39
+ durationDays: number | null;
40
+ isDefault: boolean;
41
+ displayOrder: number;
42
+ }
43
+
29
44
  /**
30
45
  * Membership plan offered by the gym
31
46
  */
@@ -38,6 +53,7 @@ export interface CatalogPlan {
38
53
  duration: string;
39
54
  features: any;
40
55
  whatsappUrl: string | null;
56
+ pricingPackages?: CatalogPricingPackage[];
41
57
  }
42
58
 
43
59
  /**
@@ -208,6 +224,16 @@ export interface LeadSubmissionResponse {
208
224
  // Admin Catalog Configuration Types
209
225
  // ============================================================================
210
226
 
227
+ /**
228
+ * Catalog configuration
229
+ */
230
+ export interface CatalogConfig {
231
+ featuredPlanId?: string;
232
+ theme?: string;
233
+ mode?: string;
234
+ [key: string]: any;
235
+ }
236
+
211
237
  /**
212
238
  * Gym catalog configuration
213
239
  */
@@ -221,7 +247,7 @@ export interface GymCatalog {
221
247
  bannerFileId: string | null;
222
248
  heroMessage: string | null;
223
249
  ctaButtonText: string;
224
- config: Record<string, any> | null;
250
+ config: CatalogConfig | null;
225
251
  createdAt: string;
226
252
  updatedAt: string;
227
253
  }
@@ -37,6 +37,7 @@ export * from './messages';
37
37
  export * from './credits';
38
38
  export * from './pricing-packages';
39
39
  export * from './promo-codes';
40
+ export * from './receivables';
40
41
 
41
42
  export interface ApiResponse<T> {
42
43
  data: T;
@@ -0,0 +1,32 @@
1
+ export type MemberDebtType = 'contract' | 'sale';
2
+ export type MemberDebtStatus = 'pending' | 'overdue' | 'partially_paid';
3
+
4
+ export interface MemberDebtDto {
5
+ id: string;
6
+ type: MemberDebtType;
7
+ amount: number;
8
+ paidAmount: number;
9
+ outstandingAmount: number;
10
+ status: MemberDebtStatus;
11
+ dueDate: string;
12
+ referenceNumber: string;
13
+ description: string;
14
+ createdAt: string;
15
+ saleDate?: string;
16
+ gymId: string;
17
+ gymName: string;
18
+ }
19
+
20
+ export interface MemberDebtsSummaryDto {
21
+ totalDebt: number;
22
+ contractsDebt: number;
23
+ salesDebt: number;
24
+ overdueCount: number;
25
+ pendingCount: number;
26
+ totalItems: number;
27
+ }
28
+
29
+ export interface MemberDebtsResponseDto {
30
+ debts: MemberDebtDto[];
31
+ summary: MemberDebtsSummaryDto;
32
+ }
@@ -18,6 +18,7 @@ import {
18
18
  ResendResetCodeDto,
19
19
  ResendResetCodeResponseDto,
20
20
  } from '../models/auth';
21
+ import { MemberInvitationDetailsResponse } from '@gymspace/shared';
21
22
  import { MemberPinLoginDto, SetPinDto, MemberLoginResponse } from '../models/members';
22
23
  import { SubscriptionPlan } from '../models/subscriptions';
23
24
  import { RequestOptions } from '../types';
@@ -177,6 +178,20 @@ export class AuthResource extends BaseResource {
177
178
  );
178
179
  }
179
180
 
181
+ /**
182
+ * Get member invitation details
183
+ * GET /auth/members/invite/:token
184
+ */
185
+ async getMemberInvitationDetails(
186
+ token: string,
187
+ options?: RequestOptions,
188
+ ): Promise<MemberInvitationDetailsResponse> {
189
+ return this.client.get<MemberInvitationDetailsResponse>(
190
+ `${this.basePath}/members/invite/${token}`,
191
+ options,
192
+ );
193
+ }
194
+
180
195
  /**
181
196
  * Refresh member access token
182
197
  * POST /auth/members/refresh
@@ -1,4 +1,19 @@
1
1
  import { BaseResource } from './base';
2
+ import type {
3
+ MemberDebtType,
4
+ MemberDebtStatus,
5
+ MemberDebtDto,
6
+ MemberDebtsSummaryDto,
7
+ MemberDebtsResponseDto,
8
+ } from '../models/receivables';
9
+
10
+ export type {
11
+ MemberDebtType,
12
+ MemberDebtStatus,
13
+ MemberDebtDto,
14
+ MemberDebtsSummaryDto,
15
+ MemberDebtsResponseDto,
16
+ } from '../models/receivables';
2
17
 
3
18
  // Receivable Installment Types
4
19
  export interface ReceivableInstallmentDto {
@@ -87,25 +102,19 @@ export interface ReceivableSalesQueryParams {
87
102
  }
88
103
 
89
104
  export class ReceivablesResource extends BaseResource {
90
- /**
91
- * Get paginated list of pending contract installments with filtering, sorting, and organization scope support.
92
- * @param params Optional query parameters for filtering, pagination, and sorting
93
- * @returns Paginated list of installment receivables with summary
94
- */
95
105
  async getInstallmentReceivables(
96
106
  params?: ReceivableInstallmentsQueryParams,
97
107
  ): Promise<ReceivableInstallmentsResponseDto> {
98
108
  return this.client.get<ReceivableInstallmentsResponseDto>('/receivables/installments', params);
99
109
  }
100
110
 
101
- /**
102
- * Get paginated list of unpaid sales with filtering, sorting, and organization scope support.
103
- * @param params Optional query parameters for filtering, pagination, and sorting
104
- * @returns Paginated list of sale receivables with summary
105
- */
106
111
  async getSaleReceivables(
107
112
  params?: ReceivableSalesQueryParams,
108
113
  ): Promise<ReceivableSalesResponseDto> {
109
114
  return this.client.get<ReceivableSalesResponseDto>('/receivables/sales', params);
110
115
  }
116
+
117
+ async getMyDebts(): Promise<MemberDebtsResponseDto> {
118
+ return this.client.get<MemberDebtsResponseDto>('/receivables/my-debts');
119
+ }
111
120
  }