@gymspace/sdk 1.2.20 → 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 +250 -19
- package/dist/index.d.ts +250 -19
- package/dist/index.js +65 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -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/invitations.ts +4 -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
|
@@ -808,6 +808,9 @@ var InvitationsResource = class extends BaseResource {
|
|
|
808
808
|
async cancelInvitation(id, options) {
|
|
809
809
|
return this.client.put(`${this.basePath}/${id}/cancel`, void 0, options);
|
|
810
810
|
}
|
|
811
|
+
async resendInvitation(id, options) {
|
|
812
|
+
return this.client.post(`${this.basePath}/${id}/resend`, void 0, options);
|
|
813
|
+
}
|
|
811
814
|
};
|
|
812
815
|
|
|
813
816
|
// src/resources/assets.ts
|
|
@@ -974,18 +977,66 @@ var PublicCatalogResource = class extends BaseResource {
|
|
|
974
977
|
super(...arguments);
|
|
975
978
|
this.basePath = "catalog";
|
|
976
979
|
}
|
|
980
|
+
/**
|
|
981
|
+
* Search gyms in the public catalog
|
|
982
|
+
*/
|
|
977
983
|
async searchCatalog(params, options) {
|
|
978
|
-
return this.
|
|
984
|
+
return this.client.get(`${this.basePath}/search`, params, options);
|
|
979
985
|
}
|
|
980
|
-
|
|
986
|
+
/**
|
|
987
|
+
* Get featured gyms
|
|
988
|
+
*/
|
|
989
|
+
async getFeaturedGyms(limit, options) {
|
|
990
|
+
const params = limit ? { limit: String(limit) } : void 0;
|
|
981
991
|
return this.client.get(`${this.basePath}/featured`, params, options);
|
|
982
992
|
}
|
|
993
|
+
/**
|
|
994
|
+
* Get list of cities with available gyms
|
|
995
|
+
*/
|
|
983
996
|
async getCitiesWithGyms(options) {
|
|
984
997
|
return this.client.get(`${this.basePath}/cities`, void 0, options);
|
|
985
998
|
}
|
|
986
|
-
|
|
999
|
+
/**
|
|
1000
|
+
* Get complete catalog details by gym slug
|
|
1001
|
+
*/
|
|
1002
|
+
async getCatalogBySlug(slug, options) {
|
|
987
1003
|
return this.client.get(`${this.basePath}/${slug}`, void 0, options);
|
|
988
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
|
+
}
|
|
989
1040
|
};
|
|
990
1041
|
|
|
991
1042
|
// src/resources/health.ts
|
|
@@ -1954,6 +2005,7 @@ var GymSpaceSdk = class {
|
|
|
1954
2005
|
this.assets = new AssetsResource(this.client);
|
|
1955
2006
|
this.files = new FilesResource(this.client);
|
|
1956
2007
|
this.publicCatalog = new PublicCatalogResource(this.client);
|
|
2008
|
+
this.adminCatalog = new AdminCatalogResource(this.client);
|
|
1957
2009
|
this.health = new HealthResource(this.client);
|
|
1958
2010
|
this.onboarding = new OnboardingResource(this.client);
|
|
1959
2011
|
this.products = new ProductsResource(this.client);
|
|
@@ -2738,6 +2790,14 @@ var CommissionEntityType = /* @__PURE__ */ ((CommissionEntityType2) => {
|
|
|
2738
2790
|
return CommissionEntityType2;
|
|
2739
2791
|
})(CommissionEntityType || {});
|
|
2740
2792
|
|
|
2741
|
-
|
|
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 };
|
|
2742
2802
|
//# sourceMappingURL=index.mjs.map
|
|
2743
2803
|
//# sourceMappingURL=index.mjs.map
|