@gymspace/sdk 1.2.21 → 1.2.22
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/.tsbuildinfo +1 -0
- package/dist/index.d.mts +249 -19
- package/dist/index.d.ts +249 -19
- package/dist/index.js +62 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/models/activities.ts +5 -7
- package/src/models/bulk-messaging.ts +1 -0
- package/src/models/catalog.ts +236 -0
- package/src/models/index.ts +1 -0
- package/src/models/subscriptions.ts +2 -1
- package/src/resources/admin-catalog.ts +46 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/public-catalog.ts +45 -44
- package/src/resources/subscription-plans.ts +6 -0
- package/src/sdk.ts +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -247,6 +247,7 @@ interface Subscription {
|
|
|
247
247
|
startDate: Date;
|
|
248
248
|
endDate: Date;
|
|
249
249
|
isActive: boolean;
|
|
250
|
+
isTrial?: boolean;
|
|
250
251
|
}
|
|
251
252
|
interface AvailablePlanDto {
|
|
252
253
|
id: string;
|
|
@@ -1480,17 +1481,111 @@ declare class FilesResource extends BaseResource {
|
|
|
1480
1481
|
render(id: string): Promise<Blob>;
|
|
1481
1482
|
}
|
|
1482
1483
|
|
|
1483
|
-
|
|
1484
|
+
/**
|
|
1485
|
+
* Hero section of the catalog
|
|
1486
|
+
*/
|
|
1487
|
+
interface CatalogHeroSection {
|
|
1488
|
+
logo: string | null;
|
|
1489
|
+
banner: string | null;
|
|
1490
|
+
heroMessage: string | null;
|
|
1491
|
+
ctaButtonText: string;
|
|
1492
|
+
whatsappUrl: string | null;
|
|
1493
|
+
}
|
|
1494
|
+
/**
|
|
1495
|
+
* Activity/class offered by the gym
|
|
1496
|
+
*/
|
|
1497
|
+
interface CatalogActivity {
|
|
1498
|
+
id: string;
|
|
1499
|
+
name: string;
|
|
1500
|
+
description: string | null;
|
|
1501
|
+
startTime: string;
|
|
1502
|
+
duration: number;
|
|
1503
|
+
days: string[];
|
|
1504
|
+
imageUrl: string | null;
|
|
1505
|
+
}
|
|
1506
|
+
/**
|
|
1507
|
+
* Membership plan offered by the gym
|
|
1508
|
+
*/
|
|
1509
|
+
interface CatalogPlan {
|
|
1510
|
+
id: string;
|
|
1511
|
+
name: string;
|
|
1512
|
+
description: string | null;
|
|
1513
|
+
price: number;
|
|
1514
|
+
currency: string;
|
|
1515
|
+
duration: string;
|
|
1516
|
+
features: any;
|
|
1517
|
+
whatsappUrl: string | null;
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1520
|
+
* Social media links
|
|
1521
|
+
*/
|
|
1522
|
+
interface CatalogSocialMedia {
|
|
1523
|
+
instagram: string | null;
|
|
1524
|
+
facebook: string | null;
|
|
1525
|
+
tiktok: string | null;
|
|
1526
|
+
whatsapp: string | null;
|
|
1527
|
+
}
|
|
1528
|
+
/**
|
|
1529
|
+
* Gym location information
|
|
1530
|
+
*/
|
|
1531
|
+
interface CatalogLocation {
|
|
1532
|
+
address: string | null;
|
|
1533
|
+
city: string | null;
|
|
1534
|
+
state: string | null;
|
|
1535
|
+
latitude: number | null;
|
|
1536
|
+
longitude: number | null;
|
|
1537
|
+
}
|
|
1538
|
+
/**
|
|
1539
|
+
* Formatted schedule for a day
|
|
1540
|
+
*/
|
|
1541
|
+
interface FormattedSchedule {
|
|
1542
|
+
day: string;
|
|
1543
|
+
hours: string;
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Complete catalog response
|
|
1547
|
+
*/
|
|
1548
|
+
interface CatalogResponse {
|
|
1549
|
+
gym: {
|
|
1550
|
+
id: string;
|
|
1551
|
+
name: string;
|
|
1552
|
+
slug: string;
|
|
1553
|
+
description: string | null;
|
|
1554
|
+
phone: string | null;
|
|
1555
|
+
email: string | null;
|
|
1556
|
+
currency: string;
|
|
1557
|
+
};
|
|
1558
|
+
hero: CatalogHeroSection;
|
|
1559
|
+
plans: CatalogPlan[];
|
|
1560
|
+
activities: CatalogActivity[];
|
|
1561
|
+
schedule: FormattedSchedule[];
|
|
1562
|
+
socialMedia: CatalogSocialMedia;
|
|
1563
|
+
location: CatalogLocation;
|
|
1564
|
+
}
|
|
1565
|
+
/**
|
|
1566
|
+
* City with gym count
|
|
1567
|
+
*/
|
|
1568
|
+
interface CityWithGyms {
|
|
1569
|
+
city: string;
|
|
1570
|
+
state: string;
|
|
1571
|
+
count: number;
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Search catalog parameters
|
|
1575
|
+
*/
|
|
1576
|
+
interface SearchCatalogParams {
|
|
1484
1577
|
search?: string;
|
|
1485
1578
|
city?: string;
|
|
1486
1579
|
state?: string;
|
|
1487
1580
|
latitude?: string;
|
|
1488
1581
|
longitude?: string;
|
|
1489
1582
|
radius?: string;
|
|
1583
|
+
limit?: number;
|
|
1584
|
+
offset?: number;
|
|
1490
1585
|
}
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1586
|
+
/**
|
|
1587
|
+
* Catalog gym in search results
|
|
1588
|
+
*/
|
|
1494
1589
|
interface CatalogGym {
|
|
1495
1590
|
id: string;
|
|
1496
1591
|
name: string;
|
|
@@ -1503,17 +1598,146 @@ interface CatalogGym {
|
|
|
1503
1598
|
amenities?: any;
|
|
1504
1599
|
settings?: any;
|
|
1505
1600
|
}
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1601
|
+
/**
|
|
1602
|
+
* Search catalog response
|
|
1603
|
+
*/
|
|
1604
|
+
interface SearchCatalogResponse {
|
|
1605
|
+
gyms: CatalogGym[];
|
|
1606
|
+
pagination: {
|
|
1607
|
+
total: number;
|
|
1608
|
+
limit: number;
|
|
1609
|
+
offset: number;
|
|
1610
|
+
};
|
|
1510
1611
|
}
|
|
1612
|
+
/**
|
|
1613
|
+
* Lead gender enum
|
|
1614
|
+
*/
|
|
1615
|
+
declare enum LeadGender {
|
|
1616
|
+
MALE = "male",
|
|
1617
|
+
FEMALE = "female",
|
|
1618
|
+
OTHER = "other"
|
|
1619
|
+
}
|
|
1620
|
+
/**
|
|
1621
|
+
* Create lead DTO
|
|
1622
|
+
*/
|
|
1623
|
+
interface CreateLeadDto {
|
|
1624
|
+
fullName: string;
|
|
1625
|
+
age: number;
|
|
1626
|
+
phone: string;
|
|
1627
|
+
gender: LeadGender;
|
|
1628
|
+
objective: string;
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* Catalog lead entity
|
|
1632
|
+
*/
|
|
1633
|
+
interface CatalogLead {
|
|
1634
|
+
id: string;
|
|
1635
|
+
catalogId: string;
|
|
1636
|
+
fullName: string;
|
|
1637
|
+
age: number;
|
|
1638
|
+
phone: string;
|
|
1639
|
+
gender: string;
|
|
1640
|
+
objective: string;
|
|
1641
|
+
source: string;
|
|
1642
|
+
ipAddress: string | null;
|
|
1643
|
+
userAgent: string | null;
|
|
1644
|
+
isContacted: boolean;
|
|
1645
|
+
contactedAt: string | null;
|
|
1646
|
+
createdAt: string;
|
|
1647
|
+
updatedAt: string;
|
|
1648
|
+
}
|
|
1649
|
+
/**
|
|
1650
|
+
* Lead filters for querying
|
|
1651
|
+
*/
|
|
1652
|
+
interface LeadFiltersDto {
|
|
1653
|
+
startDate?: string;
|
|
1654
|
+
endDate?: string;
|
|
1655
|
+
isContacted?: boolean;
|
|
1656
|
+
limit?: number;
|
|
1657
|
+
offset?: number;
|
|
1658
|
+
}
|
|
1659
|
+
/**
|
|
1660
|
+
* Lead submission response
|
|
1661
|
+
*/
|
|
1662
|
+
interface LeadSubmissionResponse {
|
|
1663
|
+
message: string;
|
|
1664
|
+
}
|
|
1665
|
+
/**
|
|
1666
|
+
* Gym catalog configuration
|
|
1667
|
+
*/
|
|
1668
|
+
interface GymCatalog {
|
|
1669
|
+
id: string;
|
|
1670
|
+
gymId: string;
|
|
1671
|
+
slug: string;
|
|
1672
|
+
logo: string | null;
|
|
1673
|
+
banner: string | null;
|
|
1674
|
+
logoFileId: string | null;
|
|
1675
|
+
bannerFileId: string | null;
|
|
1676
|
+
heroMessage: string | null;
|
|
1677
|
+
ctaButtonText: string;
|
|
1678
|
+
createdAt: string;
|
|
1679
|
+
updatedAt: string;
|
|
1680
|
+
}
|
|
1681
|
+
/**
|
|
1682
|
+
* Update catalog configuration DTO
|
|
1683
|
+
*/
|
|
1684
|
+
interface UpdateCatalogConfigDto {
|
|
1685
|
+
slug?: string;
|
|
1686
|
+
heroMessage?: string;
|
|
1687
|
+
ctaButtonText?: string;
|
|
1688
|
+
logoFileId?: string;
|
|
1689
|
+
bannerFileId?: string;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* Public Catalog Resource
|
|
1694
|
+
* Handles public-facing catalog operations (no authentication required)
|
|
1695
|
+
*/
|
|
1511
1696
|
declare class PublicCatalogResource extends BaseResource {
|
|
1512
1697
|
private basePath;
|
|
1513
|
-
|
|
1514
|
-
|
|
1698
|
+
/**
|
|
1699
|
+
* Search gyms in the public catalog
|
|
1700
|
+
*/
|
|
1701
|
+
searchCatalog(params?: SearchCatalogParams, options?: RequestOptions): Promise<SearchCatalogResponse>;
|
|
1702
|
+
/**
|
|
1703
|
+
* Get featured gyms
|
|
1704
|
+
*/
|
|
1705
|
+
getFeaturedGyms(limit?: number, options?: RequestOptions): Promise<CatalogGym[]>;
|
|
1706
|
+
/**
|
|
1707
|
+
* Get list of cities with available gyms
|
|
1708
|
+
*/
|
|
1515
1709
|
getCitiesWithGyms(options?: RequestOptions): Promise<CityWithGyms[]>;
|
|
1516
|
-
|
|
1710
|
+
/**
|
|
1711
|
+
* Get complete catalog details by gym slug
|
|
1712
|
+
*/
|
|
1713
|
+
getCatalogBySlug(slug: string, options?: RequestOptions): Promise<CatalogResponse>;
|
|
1714
|
+
/**
|
|
1715
|
+
* Submit a lead form for a specific gym
|
|
1716
|
+
*/
|
|
1717
|
+
submitLead(slug: string, data: CreateLeadDto, options?: RequestOptions): Promise<LeadSubmissionResponse>;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
/**
|
|
1721
|
+
* Admin Catalog Resource
|
|
1722
|
+
* Handles catalog administration operations (requires authentication and CATALOG permissions)
|
|
1723
|
+
*/
|
|
1724
|
+
declare class AdminCatalogResource extends BaseResource {
|
|
1725
|
+
private basePath;
|
|
1726
|
+
/**
|
|
1727
|
+
* Get catalog configuration for the current gym
|
|
1728
|
+
* Requires: CATALOG_READ permission
|
|
1729
|
+
*/
|
|
1730
|
+
getCatalogConfig(options?: RequestOptions): Promise<GymCatalog>;
|
|
1731
|
+
/**
|
|
1732
|
+
* Update catalog configuration
|
|
1733
|
+
* Requires: CATALOG_UPDATE permission
|
|
1734
|
+
*/
|
|
1735
|
+
updateCatalogConfig(data: UpdateCatalogConfigDto, options?: RequestOptions): Promise<GymCatalog>;
|
|
1736
|
+
/**
|
|
1737
|
+
* Get catalog leads with optional filtering
|
|
1738
|
+
* Requires: CATALOG_READ permission
|
|
1739
|
+
*/
|
|
1740
|
+
getLeads(filters?: LeadFiltersDto, options?: RequestOptions): Promise<CatalogLead[]>;
|
|
1517
1741
|
}
|
|
1518
1742
|
|
|
1519
1743
|
interface HealthResponse {
|
|
@@ -2137,6 +2361,7 @@ declare class SubscriptionsResource extends BaseResource {
|
|
|
2137
2361
|
interface SubscriptionPlanDto {
|
|
2138
2362
|
id: string;
|
|
2139
2363
|
name: string;
|
|
2364
|
+
planType?: string;
|
|
2140
2365
|
price: {
|
|
2141
2366
|
PEN?: {
|
|
2142
2367
|
currency: 'PEN';
|
|
@@ -2164,6 +2389,7 @@ interface SubscriptionPlanDto {
|
|
|
2164
2389
|
features: Record<string, any>;
|
|
2165
2390
|
description?: string;
|
|
2166
2391
|
isActive: boolean;
|
|
2392
|
+
isVisibleToPublic: boolean;
|
|
2167
2393
|
createdAt: Date;
|
|
2168
2394
|
updatedAt: Date;
|
|
2169
2395
|
activeSubscriptions?: number;
|
|
@@ -2178,6 +2404,7 @@ interface PricingDto {
|
|
|
2178
2404
|
}
|
|
2179
2405
|
interface CreateSubscriptionPlanDto {
|
|
2180
2406
|
name: string;
|
|
2407
|
+
planType?: string;
|
|
2181
2408
|
price: PricingDto;
|
|
2182
2409
|
billingFrequency: string;
|
|
2183
2410
|
duration?: number;
|
|
@@ -2188,9 +2415,11 @@ interface CreateSubscriptionPlanDto {
|
|
|
2188
2415
|
features: Record<string, any>;
|
|
2189
2416
|
description?: string;
|
|
2190
2417
|
isActive?: boolean;
|
|
2418
|
+
isVisibleToPublic?: boolean;
|
|
2191
2419
|
}
|
|
2192
2420
|
interface UpdateSubscriptionPlanDto {
|
|
2193
2421
|
name?: string;
|
|
2422
|
+
planType?: string;
|
|
2194
2423
|
price?: PricingDto;
|
|
2195
2424
|
billingFrequency?: string;
|
|
2196
2425
|
duration?: number;
|
|
@@ -2201,6 +2430,7 @@ interface UpdateSubscriptionPlanDto {
|
|
|
2201
2430
|
features?: Record<string, any>;
|
|
2202
2431
|
description?: string;
|
|
2203
2432
|
isActive?: boolean;
|
|
2433
|
+
isVisibleToPublic?: boolean;
|
|
2204
2434
|
}
|
|
2205
2435
|
declare class SubscriptionPlansResource extends BaseResource {
|
|
2206
2436
|
private basePath;
|
|
@@ -2557,6 +2787,7 @@ interface BulkTemplate {
|
|
|
2557
2787
|
description?: string;
|
|
2558
2788
|
tags: string[];
|
|
2559
2789
|
isActive: boolean;
|
|
2790
|
+
isHide: boolean;
|
|
2560
2791
|
usageCount: number;
|
|
2561
2792
|
lastUsedAt?: Date;
|
|
2562
2793
|
createdByUserId: string;
|
|
@@ -2728,24 +2959,22 @@ interface SearchActivitiesParams {
|
|
|
2728
2959
|
isActive?: boolean;
|
|
2729
2960
|
}
|
|
2730
2961
|
interface CreateActivityNotificationDto {
|
|
2731
|
-
|
|
2732
|
-
customMessage?: string;
|
|
2962
|
+
message: string;
|
|
2733
2963
|
advanceTimeMinutes: number;
|
|
2964
|
+
isActive?: boolean;
|
|
2734
2965
|
}
|
|
2735
2966
|
interface UpdateActivityNotificationDto {
|
|
2736
|
-
|
|
2737
|
-
customMessage?: string;
|
|
2967
|
+
message?: string;
|
|
2738
2968
|
advanceTimeMinutes?: number;
|
|
2739
2969
|
isActive?: boolean;
|
|
2740
2970
|
}
|
|
2741
2971
|
interface ActivityNotification {
|
|
2742
2972
|
id: string;
|
|
2743
2973
|
activityId: string;
|
|
2744
|
-
templateId
|
|
2745
|
-
customMessage?: string;
|
|
2974
|
+
templateId: string;
|
|
2746
2975
|
advanceTimeMinutes: number;
|
|
2747
2976
|
isActive: boolean;
|
|
2748
|
-
template
|
|
2977
|
+
template: {
|
|
2749
2978
|
id: string;
|
|
2750
2979
|
name: string;
|
|
2751
2980
|
message: string;
|
|
@@ -3443,6 +3672,7 @@ declare class GymSpaceSdk {
|
|
|
3443
3672
|
assets: AssetsResource;
|
|
3444
3673
|
files: FilesResource;
|
|
3445
3674
|
publicCatalog: PublicCatalogResource;
|
|
3675
|
+
adminCatalog: AdminCatalogResource;
|
|
3446
3676
|
health: HealthResource;
|
|
3447
3677
|
onboarding: OnboardingResource;
|
|
3448
3678
|
products: ProductsResource;
|
|
@@ -3532,4 +3762,4 @@ declare class NetworkError extends GymSpaceError {
|
|
|
3532
3762
|
constructor(message?: string);
|
|
3533
3763
|
}
|
|
3534
3764
|
|
|
3535
|
-
export { type ActivateRenewalDto, ActivitiesResource, type Activity, type ActivityNotification, type ActivityPlanRestriction, type ActivityStats, type ActivityStatsParams, AdminSubscriptionManagementResource, type AdminSubscriptionStatusDto, type AffiliateOrganizationDto, type Amenities, ApiClient, type ApiResponse, type AssetResponseDto, AssetsResource, type AssignTagsDto, type AssignTagsResponse, AuthResource, AuthenticationError, AuthorizationError, type AvailablePlanDto, type BulkLogsResponse, type BulkLogsResponseDto, type BulkMessageLog, type BulkMessageLogDto, type BulkMessageResult, type BulkMessageResultDto, BulkMessagingResource, type BulkTemplate, type BusinessHours, type CancelContractDto, type CancelSubscriptionDto, type CancellationAnalytics, type CatalogGym, type ChangePasswordDto, type ChangePasswordResponseDto, type CheckIn, type CheckInDetail, type CheckInListResponse, type CheckInStats, type CheckInSystemFeatures, type CheckIns, type CheckInsList, CheckInsResource, type CheckLimitResponse, type CityWithGyms, type Client, type ClientCheckInHistory, type ClientManagementFeatures, type ClientStat, type ClientStats, type ClientTag, type ClientTagsResponse, ClientsResource, type CollaboratorReportDto, type CollaboratorRoleDto, CollaboratorsResource, type CommissionCalculationDto, CommissionCalculationsResource, CommissionChangeType, type CommissionComparisonDto, type CommissionConfigDto, CommissionConfigResource, CommissionEntityType, type CommissionFiltersDto, type CommissionHistoryDto, type CommissionHistoryFiltersDto, CommissionPromotionsResource, CommissionReportsResource, type CommissionRuleDto, type CommissionRuleFiltersDto, CommissionRuleType, CommissionRulesResource, type CommissionSimulationDto, CommissionStatus, type CommissionSummaryDto, type CommissionSummaryReportDto, type CompleteGuidedSetupData, type ConfigureFeaturesData, type ConnectionStatusResponse, type Contact, type Contract, type ContractLifecycleEvent, type ContractSettings, ContractsResource, type ContractsRevenue, type CreateActivityDto, type CreateActivityNotificationDto, type CreateBulkTemplateDto, type CreateCheckInDto, type CreateClientDto, type CreateCommissionConfigDto, type CreateCommissionRuleDto, type CreateContractDto, type CreateGymDto, type CreateMembershipPlanDto, type CreatePaymentMethodDto, type CreateProductCategoryDto, type CreateProductDto, type CreateSaleDto, type CreateServiceDto, type CreateSubscriptionPlanDto, type CreateSupplierDto, type CreateTagDto, type CreateTemplateDto, type CreateWhatsAppConfigDto, type CurrentSessionResponse, type CurrentlyInGymResponse, type CustomerSalesReport, DashboardResource, type DashboardStats, type DateRangeParams, type DaySchedule, type Debts, type DeleteActivityParams, type DeleteTagResponse, type DisconnectResponse, type EligibleClient, type EligibleClientsResponse, type ExpiringContract, type FileResponseDto, FilesResource, type FreezeContractDto, type GenerateAIMessageDto, type GenerateAIMessageParams, type GenerateAIMessageResponse, type GenerateAIMessageResponseDto, type GetBulkLogsQueryDto, type GetCheckInStatsParams, type GetClientCheckInHistoryParams, type GetContractsParams, type
|
|
3765
|
+
export { type ActivateRenewalDto, ActivitiesResource, type Activity, type ActivityNotification, type ActivityPlanRestriction, type ActivityStats, type ActivityStatsParams, AdminCatalogResource, AdminSubscriptionManagementResource, type AdminSubscriptionStatusDto, type AffiliateOrganizationDto, type Amenities, ApiClient, type ApiResponse, type AssetResponseDto, AssetsResource, type AssignTagsDto, type AssignTagsResponse, AuthResource, AuthenticationError, AuthorizationError, type AvailablePlanDto, type BulkLogsResponse, type BulkLogsResponseDto, type BulkMessageLog, type BulkMessageLogDto, type BulkMessageResult, type BulkMessageResultDto, BulkMessagingResource, type BulkTemplate, type BusinessHours, type CancelContractDto, type CancelSubscriptionDto, type CancellationAnalytics, type CatalogActivity, type CatalogGym, type CatalogHeroSection, type CatalogLead, type CatalogLocation, type CatalogPlan, type CatalogResponse, type CatalogSocialMedia, type ChangePasswordDto, type ChangePasswordResponseDto, type CheckIn, type CheckInDetail, type CheckInListResponse, type CheckInStats, type CheckInSystemFeatures, type CheckIns, type CheckInsList, CheckInsResource, type CheckLimitResponse, type CityWithGyms, type Client, type ClientCheckInHistory, type ClientManagementFeatures, type ClientStat, type ClientStats, type ClientTag, type ClientTagsResponse, ClientsResource, type CollaboratorReportDto, type CollaboratorRoleDto, CollaboratorsResource, type CommissionCalculationDto, CommissionCalculationsResource, CommissionChangeType, type CommissionComparisonDto, type CommissionConfigDto, CommissionConfigResource, CommissionEntityType, type CommissionFiltersDto, type CommissionHistoryDto, type CommissionHistoryFiltersDto, CommissionPromotionsResource, CommissionReportsResource, type CommissionRuleDto, type CommissionRuleFiltersDto, CommissionRuleType, CommissionRulesResource, type CommissionSimulationDto, CommissionStatus, type CommissionSummaryDto, type CommissionSummaryReportDto, type CompleteGuidedSetupData, type ConfigureFeaturesData, type ConnectionStatusResponse, type Contact, type Contract, type ContractLifecycleEvent, type ContractSettings, ContractsResource, type ContractsRevenue, type CreateActivityDto, type CreateActivityNotificationDto, type CreateBulkTemplateDto, type CreateCheckInDto, type CreateClientDto, type CreateCommissionConfigDto, type CreateCommissionRuleDto, type CreateContractDto, type CreateGymDto, type CreateLeadDto, type CreateMembershipPlanDto, type CreatePaymentMethodDto, type CreateProductCategoryDto, type CreateProductDto, type CreateSaleDto, type CreateServiceDto, type CreateSubscriptionPlanDto, type CreateSupplierDto, type CreateTagDto, type CreateTemplateDto, type CreateWhatsAppConfigDto, type CurrentSessionResponse, type CurrentlyInGymResponse, type CustomerSalesReport, DashboardResource, type DashboardStats, type DateRangeParams, type DaySchedule, type Debts, type DeleteActivityParams, type DeleteTagResponse, type DisconnectResponse, type EligibleClient, type EligibleClientsResponse, type ExpiringContract, type FileResponseDto, FilesResource, type FormattedSchedule, type FreezeContractDto, type GenerateAIMessageDto, type GenerateAIMessageParams, type GenerateAIMessageResponse, type GenerateAIMessageResponseDto, type GetBulkLogsQueryDto, type GetCheckInStatsParams, type GetClientCheckInHistoryParams, type GetContractsParams, type GetGymInvitationsParams, type GetMembershipPlansParams, type GetTagClientsParams, type Gym, type GymAmenities, type GymCatalog, type GymSchedule, type GymSettings, type GymSocialMedia, type GymSpaceConfig, GymSpaceError, GymSpaceSdk, type GymStats, GymsResource, HealthResource, type HealthResponse, type InitializeConnectionResponse, type InventorySettings, type InvitationValidationResponse, InvitationsResource, type LeadFiltersDto, LeadGender, type LeadSubmissionResponse, type ListContactsResponse, type LoginDto, type LoginResponseDto, type MembershipManagementFeatures, type MembershipPlan, type MembershipPlanStats, MembershipPlansResource, NetworkError, type NewClients, NotFoundError, type NotificationSettings, OnboardingResource, type OnboardingResponse, type OnboardingStatus, OnboardingStep, type Organization, type OrganizationAdminDetails, type OrganizationStats, type OrganizationWithDetails, OrganizationsResource, type PaginatedCommissionResult, type PaginatedResponse, type PaginatedResponseDto, type PaginationParams, type PaginationQueryDto, type PaySaleDto, type PaymentMethod, type PaymentMethodStats, PaymentMethodsResource, type PermissionsGroup, type PreviewTemplateResponse, type PriceDto, type PricingDto, type Product, type ProductCategory, ProductsResource, type PromotionReportDto, type PromotionReportFiltersDto, PublicCatalogResource, type ReactivateContractDto, type ReadyResponse, type RegisterCollaboratorDto, type RegisterOwnerDto, type RejectedClient, type RejectedClientDto, type RemoveTagsDto, type RemoveTagsResponse, type RenewContractDto, type ReorderCommissionRulesDto, type ReportFiltersDto, type RequestOptions, type RequestPasswordResetDto, type RequestPasswordResetResponseDto, type ResendResetCodeDto, type ResendResetCodeResponseDto, type ResendVerificationDto, type ResetPasswordDto, type ResetPasswordResponseDto, type ResumeContractDto, RolesResource, type RuleCriteria, type RuleReportDto, type Sale, type SaleItem, type SaleItemDto, SalesResource, type SalesRevenue, type SalesStats, type SearchActivitiesParams, type SearchCatalogParams, type SearchCatalogResponse, type SearchCheckInsParams, type SearchClientsParams, type SearchPaymentMethodsParams, type SearchProductsParams, type SearchSalesParams, type SearchSuppliersParams, type SearchTagsParams, type SearchTemplatesDto, type SearchWhatsAppMessagesDto, type SendBulkMessagesDto, type SendWhatsAppMessageDto, type SentActivityNotification, type SimulateCommissionDto, type SocialMedia, type StartOnboardingData, type StartOnboardingResponse, type StockMovement, type Subscription, type SubscriptionHistoryDto, type SubscriptionPlan, type SubscriptionPlanDto, SubscriptionPlansResource, type SubscriptionStatusDto, SubscriptionsResource, type Supplier, SuppliersResource, type SuppliersStats, type SuspendContractDto, type Tag, type TagClientsResponse, type TagStatsResponse, type TagWithAssignment, TagsResource, type TimeSlot, type TopSellingProduct, type UpdateActivityDto, type UpdateActivityNotificationDto, type UpdateBulkTemplateDto, type UpdateCatalogConfigDto, type UpdateClientDto, type UpdateCommissionConfigDto, type UpdateCommissionRuleDto, type UpdateGymContractSettingsDto, type UpdateGymDto, type UpdateGymInventorySettingsDto, type UpdateGymScheduleDto, type UpdateGymSettingsData, type UpdateGymSocialMediaDto, type UpdateMembershipPlanDto, type UpdateOrganizationDto, type UpdatePaymentMethodDto, type UpdatePaymentStatusDto, type UpdateProductCategoryDto, type UpdateProductDto, type UpdateProfileDto, type UpdateSaleDto, type UpdateStockDto, type UpdateSubscriptionPlanDto, type UpdateSupplierDto, type UpdateTagDto, type UpdateTemplateDto, type UpdateWhatsAppConfigDto, type UpgradeSubscriptionDto, type UploadAssetDto, type UploadFileDto, type UserProfileDto, UsersResource, ValidationError, type VerifyEmailDto, type VerifyResetCodeDto, type VerifyResetCodeResponseDto, type WeeklySchedule, type WhatsAppConfig, type WhatsAppMessage, WhatsAppResource, type WhatsAppTemplate, WhatsAppTemplatesResource };
|
package/dist/index.js
CHANGED
|
@@ -983,18 +983,66 @@ var PublicCatalogResource = class extends BaseResource {
|
|
|
983
983
|
super(...arguments);
|
|
984
984
|
this.basePath = "catalog";
|
|
985
985
|
}
|
|
986
|
+
/**
|
|
987
|
+
* Search gyms in the public catalog
|
|
988
|
+
*/
|
|
986
989
|
async searchCatalog(params, options) {
|
|
987
|
-
return this.
|
|
990
|
+
return this.client.get(`${this.basePath}/search`, params, options);
|
|
988
991
|
}
|
|
989
|
-
|
|
992
|
+
/**
|
|
993
|
+
* Get featured gyms
|
|
994
|
+
*/
|
|
995
|
+
async getFeaturedGyms(limit, options) {
|
|
996
|
+
const params = limit ? { limit: String(limit) } : void 0;
|
|
990
997
|
return this.client.get(`${this.basePath}/featured`, params, options);
|
|
991
998
|
}
|
|
999
|
+
/**
|
|
1000
|
+
* Get list of cities with available gyms
|
|
1001
|
+
*/
|
|
992
1002
|
async getCitiesWithGyms(options) {
|
|
993
1003
|
return this.client.get(`${this.basePath}/cities`, void 0, options);
|
|
994
1004
|
}
|
|
995
|
-
|
|
1005
|
+
/**
|
|
1006
|
+
* Get complete catalog details by gym slug
|
|
1007
|
+
*/
|
|
1008
|
+
async getCatalogBySlug(slug, options) {
|
|
996
1009
|
return this.client.get(`${this.basePath}/${slug}`, void 0, options);
|
|
997
1010
|
}
|
|
1011
|
+
/**
|
|
1012
|
+
* Submit a lead form for a specific gym
|
|
1013
|
+
*/
|
|
1014
|
+
async submitLead(slug, data, options) {
|
|
1015
|
+
return this.client.post(`${this.basePath}/${slug}/lead`, data, options);
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
|
|
1019
|
+
// src/resources/admin-catalog.ts
|
|
1020
|
+
var AdminCatalogResource = class extends BaseResource {
|
|
1021
|
+
constructor() {
|
|
1022
|
+
super(...arguments);
|
|
1023
|
+
this.basePath = "admin/catalog";
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Get catalog configuration for the current gym
|
|
1027
|
+
* Requires: CATALOG_READ permission
|
|
1028
|
+
*/
|
|
1029
|
+
async getCatalogConfig(options) {
|
|
1030
|
+
return this.client.get(this.basePath, void 0, options);
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Update catalog configuration
|
|
1034
|
+
* Requires: CATALOG_UPDATE permission
|
|
1035
|
+
*/
|
|
1036
|
+
async updateCatalogConfig(data, options) {
|
|
1037
|
+
return this.client.put(this.basePath, data, options);
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Get catalog leads with optional filtering
|
|
1041
|
+
* Requires: CATALOG_READ permission
|
|
1042
|
+
*/
|
|
1043
|
+
async getLeads(filters, options) {
|
|
1044
|
+
return this.client.get(`${this.basePath}/leads`, filters, options);
|
|
1045
|
+
}
|
|
998
1046
|
};
|
|
999
1047
|
|
|
1000
1048
|
// src/resources/health.ts
|
|
@@ -1963,6 +2011,7 @@ var GymSpaceSdk = class {
|
|
|
1963
2011
|
this.assets = new AssetsResource(this.client);
|
|
1964
2012
|
this.files = new FilesResource(this.client);
|
|
1965
2013
|
this.publicCatalog = new PublicCatalogResource(this.client);
|
|
2014
|
+
this.adminCatalog = new AdminCatalogResource(this.client);
|
|
1966
2015
|
this.health = new HealthResource(this.client);
|
|
1967
2016
|
this.onboarding = new OnboardingResource(this.client);
|
|
1968
2017
|
this.products = new ProductsResource(this.client);
|
|
@@ -2747,8 +2796,17 @@ var CommissionEntityType = /* @__PURE__ */ ((CommissionEntityType2) => {
|
|
|
2747
2796
|
return CommissionEntityType2;
|
|
2748
2797
|
})(CommissionEntityType || {});
|
|
2749
2798
|
|
|
2799
|
+
// src/models/catalog.ts
|
|
2800
|
+
var LeadGender = /* @__PURE__ */ ((LeadGender2) => {
|
|
2801
|
+
LeadGender2["MALE"] = "male";
|
|
2802
|
+
LeadGender2["FEMALE"] = "female";
|
|
2803
|
+
LeadGender2["OTHER"] = "other";
|
|
2804
|
+
return LeadGender2;
|
|
2805
|
+
})(LeadGender || {});
|
|
2806
|
+
|
|
2750
2807
|
exports.ACTIVITY_EVENTS = ACTIVITY_EVENTS;
|
|
2751
2808
|
exports.ActivitiesResource = ActivitiesResource;
|
|
2809
|
+
exports.AdminCatalogResource = AdminCatalogResource;
|
|
2752
2810
|
exports.AdminSubscriptionManagementResource = AdminSubscriptionManagementResource;
|
|
2753
2811
|
exports.ApiClient = ApiClient;
|
|
2754
2812
|
exports.AssetCategory = AssetCategory;
|
|
@@ -2791,6 +2849,7 @@ exports.HEADERS = HEADERS;
|
|
|
2791
2849
|
exports.HealthResource = HealthResource;
|
|
2792
2850
|
exports.InvitationStatus = InvitationStatus;
|
|
2793
2851
|
exports.InvitationsResource = InvitationsResource;
|
|
2852
|
+
exports.LeadGender = LeadGender;
|
|
2794
2853
|
exports.MembershipPlansResource = MembershipPlansResource;
|
|
2795
2854
|
exports.NetworkError = NetworkError;
|
|
2796
2855
|
exports.NotFoundError = NotFoundError;
|