@gymspace/sdk 1.2.0 → 1.2.1

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.mjs CHANGED
@@ -317,6 +317,9 @@ var OrganizationsResource = class extends BaseResource {
317
317
  async listOrganizations(options) {
318
318
  return this.client.get(`${this.basePath}/list`, void 0, options);
319
319
  }
320
+ async getOrganizationForAdmin(id, options) {
321
+ return this.client.get(`${this.basePath}/admin/${id}`, void 0, options);
322
+ }
320
323
  };
321
324
 
322
325
  // src/resources/gyms.ts
@@ -1096,6 +1099,92 @@ var SubscriptionsResource = class extends BaseResource {
1096
1099
  }
1097
1100
  };
1098
1101
 
1102
+ // src/resources/subscription-plans.ts
1103
+ var SubscriptionPlansResource = class extends BaseResource {
1104
+ constructor() {
1105
+ super(...arguments);
1106
+ this.basePath = "admin/subscription-plans";
1107
+ }
1108
+ /**
1109
+ * List all subscription plans (Super Admin only)
1110
+ */
1111
+ async listPlans(options) {
1112
+ return this.client.get(`${this.basePath}`, void 0, options);
1113
+ }
1114
+ /**
1115
+ * Create new subscription plan (Super Admin only)
1116
+ */
1117
+ async createPlan(data, options) {
1118
+ return this.client.post(`${this.basePath}`, data, options);
1119
+ }
1120
+ /**
1121
+ * Get subscription plan details (Super Admin only)
1122
+ */
1123
+ async getPlan(id, options) {
1124
+ return this.client.get(`${this.basePath}/${id}`, void 0, options);
1125
+ }
1126
+ /**
1127
+ * Update subscription plan (Super Admin only)
1128
+ */
1129
+ async updatePlan(id, data, options) {
1130
+ return this.client.put(`${this.basePath}/${id}`, data, options);
1131
+ }
1132
+ /**
1133
+ * Soft delete subscription plan (Super Admin only)
1134
+ */
1135
+ async deletePlan(id, options) {
1136
+ return this.client.delete(`${this.basePath}/${id}`, options);
1137
+ }
1138
+ };
1139
+
1140
+ // src/resources/admin-subscription-management.ts
1141
+ var AdminSubscriptionManagementResource = class extends BaseResource {
1142
+ constructor() {
1143
+ super(...arguments);
1144
+ this.basePath = "admin/organizations";
1145
+ }
1146
+ /**
1147
+ * Activate subscription renewal for an organization (Super Admin only)
1148
+ */
1149
+ async activateRenewal(organizationId, data, options) {
1150
+ return this.client.post(
1151
+ `${this.basePath}/${organizationId}/subscriptions/activate-renewal`,
1152
+ data,
1153
+ options
1154
+ );
1155
+ }
1156
+ /**
1157
+ * Cancel subscription for an organization (Super Admin only)
1158
+ */
1159
+ async cancelSubscription(organizationId, data, options) {
1160
+ return this.client.post(
1161
+ `${this.basePath}/${organizationId}/subscriptions/cancel`,
1162
+ data,
1163
+ options
1164
+ );
1165
+ }
1166
+ /**
1167
+ * Upgrade subscription plan for an organization (Super Admin only)
1168
+ */
1169
+ async upgradeSubscription(organizationId, data, options) {
1170
+ return this.client.post(
1171
+ `${this.basePath}/${organizationId}/subscriptions/upgrade`,
1172
+ data,
1173
+ options
1174
+ );
1175
+ }
1176
+ /**
1177
+ * Get subscription history for an organization (Super Admin only)
1178
+ */
1179
+ async getSubscriptionHistory(organizationId, options) {
1180
+ return this.client.get(
1181
+ `${this.basePath}/${organizationId}/subscriptions/history`,
1182
+ void 0,
1183
+ options
1184
+ );
1185
+ }
1186
+ };
1187
+
1099
1188
  // src/resources/payment-methods.ts
1100
1189
  var PaymentMethodsResource = class extends BaseResource {
1101
1190
  constructor() {
@@ -1150,6 +1239,8 @@ var GymSpaceSdk = class {
1150
1239
  this.suppliers = new SuppliersResource(this.client);
1151
1240
  this.users = new UsersResource(this.client);
1152
1241
  this.subscriptions = new SubscriptionsResource(this.client);
1242
+ this.subscriptionPlans = new SubscriptionPlansResource(this.client);
1243
+ this.adminSubscriptionManagement = new AdminSubscriptionManagementResource(this.client);
1153
1244
  this.paymentMethods = new PaymentMethodsResource(this.client);
1154
1245
  }
1155
1246
  /**
@@ -1190,7 +1281,7 @@ var GymSpaceSdk = class {
1190
1281
  }
1191
1282
  };
1192
1283
 
1193
- // ../../node_modules/@gymspace/shared/dist/index.mjs
1284
+ // node_modules/@gymspace/shared/dist/index.mjs
1194
1285
  var UserType = /* @__PURE__ */ ((UserType2) => {
1195
1286
  UserType2["OWNER"] = "owner";
1196
1287
  UserType2["COLLABORATOR"] = "collaborator";
@@ -1491,6 +1582,6 @@ var OnboardingStep = /* @__PURE__ */ ((OnboardingStep2) => {
1491
1582
  return OnboardingStep2;
1492
1583
  })(OnboardingStep || {});
1493
1584
 
1494
- export { ApiClient, AssetCategory, AssetStatus, AssetsResource, AuthResource, AuthenticationError, AuthorizationError, CACHE_TTL, CheckInsResource, ClientStatus, ClientsResource, CollaboratorStatus, CommentType, ContractAssetType, ContractStatus, ContractsResource, DATE_FORMATS, DashboardResource, EvaluationAssetCategory, EvaluationAssetStage, EvaluationStatus, EvaluationType, EvaluationsResource, FILE_LIMITS, FilesResource, GymSpaceError, GymSpaceSdk, GymsResource, HEADERS, HealthResource, InvitationStatus, InvitationsResource, LeadStatus, LeadsResource, MembershipPlansResource, NetworkError, NotFoundError, OnboardingResource, OnboardingStep, OrganizationsResource, PAGINATION_DEFAULTS, PERMISSIONS, PaymentFrequency, PaymentMethodsResource, PlanStatus, ProductsResource, PublicCatalogResource, ROLE_PERMISSIONS, SalesResource, SubscriptionStatus, SubscriptionsResource, SuppliersResource, UserType, UsersResource, ValidationError };
1585
+ export { AdminSubscriptionManagementResource, ApiClient, AssetCategory, AssetStatus, AssetsResource, AuthResource, AuthenticationError, AuthorizationError, CACHE_TTL, CheckInsResource, ClientStatus, ClientsResource, CollaboratorStatus, CommentType, ContractAssetType, ContractStatus, ContractsResource, DATE_FORMATS, DashboardResource, EvaluationAssetCategory, EvaluationAssetStage, EvaluationStatus, EvaluationType, EvaluationsResource, FILE_LIMITS, FilesResource, GymSpaceError, GymSpaceSdk, GymsResource, HEADERS, HealthResource, InvitationStatus, InvitationsResource, LeadStatus, LeadsResource, MembershipPlansResource, NetworkError, NotFoundError, OnboardingResource, OnboardingStep, OrganizationsResource, PAGINATION_DEFAULTS, PERMISSIONS, PaymentFrequency, PaymentMethodsResource, PlanStatus, ProductsResource, PublicCatalogResource, ROLE_PERMISSIONS, SalesResource, SubscriptionPlansResource, SubscriptionStatus, SubscriptionsResource, SuppliersResource, UserType, UsersResource, ValidationError };
1495
1586
  //# sourceMappingURL=index.mjs.map
1496
1587
  //# sourceMappingURL=index.mjs.map