@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.mjs
CHANGED
|
@@ -977,18 +977,66 @@ var PublicCatalogResource = class extends BaseResource {
|
|
|
977
977
|
super(...arguments);
|
|
978
978
|
this.basePath = "catalog";
|
|
979
979
|
}
|
|
980
|
+
/**
|
|
981
|
+
* Search gyms in the public catalog
|
|
982
|
+
*/
|
|
980
983
|
async searchCatalog(params, options) {
|
|
981
|
-
return this.
|
|
984
|
+
return this.client.get(`${this.basePath}/search`, params, options);
|
|
982
985
|
}
|
|
983
|
-
|
|
986
|
+
/**
|
|
987
|
+
* Get featured gyms
|
|
988
|
+
*/
|
|
989
|
+
async getFeaturedGyms(limit, options) {
|
|
990
|
+
const params = limit ? { limit: String(limit) } : void 0;
|
|
984
991
|
return this.client.get(`${this.basePath}/featured`, params, options);
|
|
985
992
|
}
|
|
993
|
+
/**
|
|
994
|
+
* Get list of cities with available gyms
|
|
995
|
+
*/
|
|
986
996
|
async getCitiesWithGyms(options) {
|
|
987
997
|
return this.client.get(`${this.basePath}/cities`, void 0, options);
|
|
988
998
|
}
|
|
989
|
-
|
|
999
|
+
/**
|
|
1000
|
+
* Get complete catalog details by gym slug
|
|
1001
|
+
*/
|
|
1002
|
+
async getCatalogBySlug(slug, options) {
|
|
990
1003
|
return this.client.get(`${this.basePath}/${slug}`, void 0, options);
|
|
991
1004
|
}
|
|
1005
|
+
/**
|
|
1006
|
+
* Submit a lead form for a specific gym
|
|
1007
|
+
*/
|
|
1008
|
+
async submitLead(slug, data, options) {
|
|
1009
|
+
return this.client.post(`${this.basePath}/${slug}/lead`, data, options);
|
|
1010
|
+
}
|
|
1011
|
+
};
|
|
1012
|
+
|
|
1013
|
+
// src/resources/admin-catalog.ts
|
|
1014
|
+
var AdminCatalogResource = class extends BaseResource {
|
|
1015
|
+
constructor() {
|
|
1016
|
+
super(...arguments);
|
|
1017
|
+
this.basePath = "admin/catalog";
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Get catalog configuration for the current gym
|
|
1021
|
+
* Requires: CATALOG_READ permission
|
|
1022
|
+
*/
|
|
1023
|
+
async getCatalogConfig(options) {
|
|
1024
|
+
return this.client.get(this.basePath, void 0, options);
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* Update catalog configuration
|
|
1028
|
+
* Requires: CATALOG_UPDATE permission
|
|
1029
|
+
*/
|
|
1030
|
+
async updateCatalogConfig(data, options) {
|
|
1031
|
+
return this.client.put(this.basePath, data, options);
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Get catalog leads with optional filtering
|
|
1035
|
+
* Requires: CATALOG_READ permission
|
|
1036
|
+
*/
|
|
1037
|
+
async getLeads(filters, options) {
|
|
1038
|
+
return this.client.get(`${this.basePath}/leads`, filters, options);
|
|
1039
|
+
}
|
|
992
1040
|
};
|
|
993
1041
|
|
|
994
1042
|
// src/resources/health.ts
|
|
@@ -1957,6 +2005,7 @@ var GymSpaceSdk = class {
|
|
|
1957
2005
|
this.assets = new AssetsResource(this.client);
|
|
1958
2006
|
this.files = new FilesResource(this.client);
|
|
1959
2007
|
this.publicCatalog = new PublicCatalogResource(this.client);
|
|
2008
|
+
this.adminCatalog = new AdminCatalogResource(this.client);
|
|
1960
2009
|
this.health = new HealthResource(this.client);
|
|
1961
2010
|
this.onboarding = new OnboardingResource(this.client);
|
|
1962
2011
|
this.products = new ProductsResource(this.client);
|
|
@@ -2741,6 +2790,14 @@ var CommissionEntityType = /* @__PURE__ */ ((CommissionEntityType2) => {
|
|
|
2741
2790
|
return CommissionEntityType2;
|
|
2742
2791
|
})(CommissionEntityType || {});
|
|
2743
2792
|
|
|
2744
|
-
|
|
2793
|
+
// src/models/catalog.ts
|
|
2794
|
+
var LeadGender = /* @__PURE__ */ ((LeadGender2) => {
|
|
2795
|
+
LeadGender2["MALE"] = "male";
|
|
2796
|
+
LeadGender2["FEMALE"] = "female";
|
|
2797
|
+
LeadGender2["OTHER"] = "other";
|
|
2798
|
+
return LeadGender2;
|
|
2799
|
+
})(LeadGender || {});
|
|
2800
|
+
|
|
2801
|
+
export { ACTIVITY_EVENTS, ActivitiesResource, AdminCatalogResource, AdminSubscriptionManagementResource, ApiClient, AssetCategory, AssetStatus, AssetsResource, AuthResource, AuthenticationError, AuthorizationError, BULK_MESSAGE_VARIABLES, BULK_MESSAGE_VARIABLE_CATEGORIES, BULK_MESSAGING_EVENTS, BulkMessagingResource, CACHE_TTL, CancellationReason, CheckInsResource, ClientStatus, ClientsResource, CollaboratorStatus, CollaboratorsResource, CommissionCalculationsResource, CommissionChangeType, CommissionConfigResource, CommissionEntityType, CommissionPromotionsResource, CommissionReportsResource, CommissionRuleType, CommissionRulesResource, CommissionStatus, ContractAssetType, ContractStatus, ContractsResource, DATE_FORMATS, DashboardResource, FILE_LIMITS, FilesResource, GymSpaceError, GymSpaceSdk, GymsResource, HEADERS, HealthResource, InvitationStatus, InvitationsResource, LeadGender, MembershipPlansResource, NetworkError, NotFoundError, OnboardingResource, OnboardingStep, OrganizationsResource, PAGINATION_DEFAULTS, PERMISSIONS, PaymentFrequency, PaymentMethodsResource, PlanStatus, ProductsResource, PublicCatalogResource, ROLE_NAMES, ROLE_PERMISSIONS, RoleNames, RolesResource, SalesResource, SubscriptionPlansResource, SubscriptionStatus, SubscriptionsResource, SuppliersResource, SuspensionType, TEMPLATE_CODES, TEMPLATE_METADATA, TagsResource, TemplateCode, TemplateType, UserType, UsersResource, ValidationError, WHATSAPP_EVENTS, WHATSAPP_TEMPLATE_EVENTS, WhatsAppResource, WhatsAppTemplatesResource, aiGeneratedTemplateSchema, bulkMessageGenerationRequestSchema, bulkMessageSchema, canAccessFeature, getRoleCapabilities, getRoleDescription, getRoleDisplayName, isAdminRole, isEncargadoRole, templateGenerationRequestSchema };
|
|
2745
2802
|
//# sourceMappingURL=index.mjs.map
|
|
2746
2803
|
//# sourceMappingURL=index.mjs.map
|