@gymspace/sdk 1.2.15 → 1.2.16
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 -1
- package/dist/index.d.mts +432 -1
- package/dist/index.d.ts +432 -1
- package/dist/index.js +272 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +264 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +26 -4
- package/src/models/clients.ts +13 -0
- package/src/models/commissions.ts +332 -0
- package/src/models/index.ts +1 -0
- package/src/resources/commission-calculations.ts +93 -0
- package/src/resources/commission-config.ts +66 -0
- package/src/resources/commission-promotions.ts +76 -0
- package/src/resources/commission-reports.ts +69 -0
- package/src/resources/commission-rules.ts +91 -0
- package/src/resources/index.ts +5 -0
- package/src/sdk.ts +15 -0
package/dist/index.d.ts
CHANGED
|
@@ -658,6 +658,13 @@ declare class RolesResource extends BaseResource {
|
|
|
658
658
|
getAvailablePermissions(options?: RequestOptions): Promise<PermissionsGroup>;
|
|
659
659
|
}
|
|
660
660
|
|
|
661
|
+
interface ClientTag {
|
|
662
|
+
tag: {
|
|
663
|
+
id: string;
|
|
664
|
+
name: string;
|
|
665
|
+
color: string;
|
|
666
|
+
};
|
|
667
|
+
}
|
|
661
668
|
interface CreateClientDto {
|
|
662
669
|
name: string;
|
|
663
670
|
email?: string;
|
|
@@ -736,6 +743,7 @@ interface Client {
|
|
|
736
743
|
name: string;
|
|
737
744
|
};
|
|
738
745
|
}>;
|
|
746
|
+
clientTags?: ClientTag[];
|
|
739
747
|
_count?: {
|
|
740
748
|
evaluations: number;
|
|
741
749
|
checkIns: number;
|
|
@@ -790,6 +798,9 @@ interface SearchClientsParams {
|
|
|
790
798
|
includeContractStatus?: boolean;
|
|
791
799
|
notCheckedInToday?: boolean;
|
|
792
800
|
checkedInToday?: boolean;
|
|
801
|
+
tagIds?: string[];
|
|
802
|
+
tagOperator?: 'and' | 'or';
|
|
803
|
+
includeTags?: boolean;
|
|
793
804
|
}
|
|
794
805
|
|
|
795
806
|
declare class ClientsResource extends BaseResource {
|
|
@@ -3017,6 +3028,421 @@ declare class TagsResource extends BaseResource {
|
|
|
3017
3028
|
getClientTags(clientId: string, options?: RequestOptions): Promise<ClientTagsResponse>;
|
|
3018
3029
|
}
|
|
3019
3030
|
|
|
3031
|
+
declare enum CommissionRuleType {
|
|
3032
|
+
PLAN = "PLAN",
|
|
3033
|
+
AMOUNT = "AMOUNT",
|
|
3034
|
+
PROMOTION = "PROMOTION"
|
|
3035
|
+
}
|
|
3036
|
+
declare enum CommissionStatus {
|
|
3037
|
+
PENDING = "PENDING",
|
|
3038
|
+
CONFIRMED = "CONFIRMED",
|
|
3039
|
+
PAID = "PAID",
|
|
3040
|
+
REVERSED = "REVERSED"
|
|
3041
|
+
}
|
|
3042
|
+
declare enum CommissionChangeType {
|
|
3043
|
+
CREATED = "CREATED",
|
|
3044
|
+
UPDATED = "UPDATED",
|
|
3045
|
+
DELETED = "DELETED"
|
|
3046
|
+
}
|
|
3047
|
+
declare enum CommissionEntityType {
|
|
3048
|
+
CONFIG = "CONFIG",
|
|
3049
|
+
RULE = "RULE"
|
|
3050
|
+
}
|
|
3051
|
+
interface RuleCriteria {
|
|
3052
|
+
planId?: string;
|
|
3053
|
+
minAmount?: number;
|
|
3054
|
+
maxAmount?: number;
|
|
3055
|
+
planIds?: string[];
|
|
3056
|
+
}
|
|
3057
|
+
interface CommissionConfigDto {
|
|
3058
|
+
id: string;
|
|
3059
|
+
gymId: string;
|
|
3060
|
+
defaultPercentage: number;
|
|
3061
|
+
reversalPeriodDays: number;
|
|
3062
|
+
minimumContractDays: number;
|
|
3063
|
+
isActive: boolean;
|
|
3064
|
+
createdAt: string;
|
|
3065
|
+
updatedAt: string;
|
|
3066
|
+
}
|
|
3067
|
+
interface CreateCommissionConfigDto {
|
|
3068
|
+
defaultPercentage: number;
|
|
3069
|
+
reversalPeriodDays: number;
|
|
3070
|
+
minimumContractDays: number;
|
|
3071
|
+
isActive: boolean;
|
|
3072
|
+
}
|
|
3073
|
+
interface UpdateCommissionConfigDto {
|
|
3074
|
+
defaultPercentage?: number;
|
|
3075
|
+
reversalPeriodDays?: number;
|
|
3076
|
+
minimumContractDays?: number;
|
|
3077
|
+
isActive?: boolean;
|
|
3078
|
+
}
|
|
3079
|
+
interface CommissionRuleDto {
|
|
3080
|
+
id: string;
|
|
3081
|
+
gymId: string;
|
|
3082
|
+
name: string;
|
|
3083
|
+
type: CommissionRuleType;
|
|
3084
|
+
percentage: number;
|
|
3085
|
+
priority: number;
|
|
3086
|
+
criteria: RuleCriteria;
|
|
3087
|
+
startDate?: string;
|
|
3088
|
+
endDate?: string;
|
|
3089
|
+
description?: string;
|
|
3090
|
+
isActive: boolean;
|
|
3091
|
+
createdAt: string;
|
|
3092
|
+
updatedAt: string;
|
|
3093
|
+
usageCount: number;
|
|
3094
|
+
}
|
|
3095
|
+
interface CreateCommissionRuleDto {
|
|
3096
|
+
name: string;
|
|
3097
|
+
type: CommissionRuleType;
|
|
3098
|
+
percentage: number;
|
|
3099
|
+
criteria?: RuleCriteria;
|
|
3100
|
+
startDate?: string;
|
|
3101
|
+
endDate?: string;
|
|
3102
|
+
description?: string;
|
|
3103
|
+
}
|
|
3104
|
+
interface UpdateCommissionRuleDto {
|
|
3105
|
+
name?: string;
|
|
3106
|
+
percentage?: number;
|
|
3107
|
+
criteria?: RuleCriteria;
|
|
3108
|
+
startDate?: string;
|
|
3109
|
+
endDate?: string;
|
|
3110
|
+
description?: string;
|
|
3111
|
+
isActive?: boolean;
|
|
3112
|
+
}
|
|
3113
|
+
interface CommissionRuleFiltersDto {
|
|
3114
|
+
type?: CommissionRuleType;
|
|
3115
|
+
isActive?: boolean;
|
|
3116
|
+
search?: string;
|
|
3117
|
+
page: number;
|
|
3118
|
+
limit: number;
|
|
3119
|
+
}
|
|
3120
|
+
interface CommissionCalculationDto {
|
|
3121
|
+
id: string;
|
|
3122
|
+
gymId: string;
|
|
3123
|
+
contractId: string;
|
|
3124
|
+
collaboratorId: string;
|
|
3125
|
+
ruleId: string | null;
|
|
3126
|
+
percentage: number;
|
|
3127
|
+
baseAmount: number;
|
|
3128
|
+
amount: number;
|
|
3129
|
+
status: CommissionStatus;
|
|
3130
|
+
saleDate: string;
|
|
3131
|
+
createdAt: string;
|
|
3132
|
+
updatedAt: string;
|
|
3133
|
+
}
|
|
3134
|
+
interface CommissionFiltersDto {
|
|
3135
|
+
status?: CommissionStatus;
|
|
3136
|
+
collaboratorId?: string;
|
|
3137
|
+
startDate?: string;
|
|
3138
|
+
endDate?: string;
|
|
3139
|
+
page: number;
|
|
3140
|
+
limit: number;
|
|
3141
|
+
}
|
|
3142
|
+
interface CommissionSummaryDto {
|
|
3143
|
+
period: {
|
|
3144
|
+
start: string;
|
|
3145
|
+
end: string;
|
|
3146
|
+
};
|
|
3147
|
+
totals: {
|
|
3148
|
+
totalCommissions: number;
|
|
3149
|
+
totalContracts: number;
|
|
3150
|
+
averageCommission: number;
|
|
3151
|
+
totalPaid: number;
|
|
3152
|
+
totalPending: number;
|
|
3153
|
+
};
|
|
3154
|
+
byStatus: {
|
|
3155
|
+
status: CommissionStatus;
|
|
3156
|
+
count: number;
|
|
3157
|
+
total: number;
|
|
3158
|
+
}[];
|
|
3159
|
+
}
|
|
3160
|
+
interface SimulateCommissionDto {
|
|
3161
|
+
collaboratorId: string;
|
|
3162
|
+
planId: string;
|
|
3163
|
+
baseAmount: number;
|
|
3164
|
+
saleDate: string;
|
|
3165
|
+
}
|
|
3166
|
+
interface CommissionSimulationDto {
|
|
3167
|
+
percentage: number;
|
|
3168
|
+
baseAmount: number;
|
|
3169
|
+
amount: number;
|
|
3170
|
+
appliedRule: {
|
|
3171
|
+
id: string;
|
|
3172
|
+
name: string;
|
|
3173
|
+
type: CommissionRuleType;
|
|
3174
|
+
percentage: number;
|
|
3175
|
+
} | null;
|
|
3176
|
+
isDefault: boolean;
|
|
3177
|
+
}
|
|
3178
|
+
interface CommissionComparisonDto {
|
|
3179
|
+
scenarios: CommissionSimulationDto[];
|
|
3180
|
+
bestScenario: {
|
|
3181
|
+
index: number;
|
|
3182
|
+
amount: number;
|
|
3183
|
+
difference: number;
|
|
3184
|
+
};
|
|
3185
|
+
}
|
|
3186
|
+
interface ReportFiltersDto {
|
|
3187
|
+
startDate?: string;
|
|
3188
|
+
endDate?: string;
|
|
3189
|
+
period?: 'week' | 'month' | 'quarter' | 'year';
|
|
3190
|
+
ruleId?: string;
|
|
3191
|
+
collaboratorId?: string;
|
|
3192
|
+
limit?: number;
|
|
3193
|
+
offset?: number;
|
|
3194
|
+
}
|
|
3195
|
+
interface CommissionSummaryReportDto {
|
|
3196
|
+
period: {
|
|
3197
|
+
start: string;
|
|
3198
|
+
end: string;
|
|
3199
|
+
};
|
|
3200
|
+
totals: {
|
|
3201
|
+
totalCommissions: number;
|
|
3202
|
+
totalContracts: number;
|
|
3203
|
+
averageCommission: number;
|
|
3204
|
+
totalPaid: number;
|
|
3205
|
+
totalPending: number;
|
|
3206
|
+
};
|
|
3207
|
+
byStatus: {
|
|
3208
|
+
status: string;
|
|
3209
|
+
count: number;
|
|
3210
|
+
total: number;
|
|
3211
|
+
}[];
|
|
3212
|
+
byRule: {
|
|
3213
|
+
ruleId: string;
|
|
3214
|
+
ruleName: string;
|
|
3215
|
+
ruleType: string;
|
|
3216
|
+
contractsCount: number;
|
|
3217
|
+
totalCommissions: number;
|
|
3218
|
+
averageCommission: number;
|
|
3219
|
+
}[];
|
|
3220
|
+
byCollaborator: {
|
|
3221
|
+
collaboratorId: string;
|
|
3222
|
+
collaboratorName: string;
|
|
3223
|
+
contractsCount: number;
|
|
3224
|
+
totalCommissions: number;
|
|
3225
|
+
averageCommission: number;
|
|
3226
|
+
}[];
|
|
3227
|
+
trend: {
|
|
3228
|
+
date: string;
|
|
3229
|
+
commissions: number;
|
|
3230
|
+
contracts: number;
|
|
3231
|
+
}[];
|
|
3232
|
+
}
|
|
3233
|
+
interface RuleReportDto {
|
|
3234
|
+
ruleId: string;
|
|
3235
|
+
ruleName: string;
|
|
3236
|
+
ruleType: string;
|
|
3237
|
+
percentage: number;
|
|
3238
|
+
contractsCount: number;
|
|
3239
|
+
totalCommissions: number;
|
|
3240
|
+
averageCommission: number;
|
|
3241
|
+
minCommission: number;
|
|
3242
|
+
maxCommission: number;
|
|
3243
|
+
effectiveness: {
|
|
3244
|
+
usageRate: number;
|
|
3245
|
+
conversionImpact: number;
|
|
3246
|
+
roi: number;
|
|
3247
|
+
};
|
|
3248
|
+
}
|
|
3249
|
+
interface CollaboratorReportDto {
|
|
3250
|
+
collaboratorId: string;
|
|
3251
|
+
collaboratorName: string;
|
|
3252
|
+
roleName: string;
|
|
3253
|
+
contractsCount: number;
|
|
3254
|
+
totalCommissions: number;
|
|
3255
|
+
averageCommission: number;
|
|
3256
|
+
totalPaid: number;
|
|
3257
|
+
totalPending: number;
|
|
3258
|
+
performance: {
|
|
3259
|
+
rank: number;
|
|
3260
|
+
percentile: number;
|
|
3261
|
+
comparisonWithAverage: number;
|
|
3262
|
+
};
|
|
3263
|
+
rulesUsed: {
|
|
3264
|
+
ruleId: string;
|
|
3265
|
+
ruleName: string;
|
|
3266
|
+
count: number;
|
|
3267
|
+
total: number;
|
|
3268
|
+
}[];
|
|
3269
|
+
}
|
|
3270
|
+
interface PromotionReportFiltersDto {
|
|
3271
|
+
promotionId?: string;
|
|
3272
|
+
status?: 'active' | 'scheduled' | 'expired';
|
|
3273
|
+
startDate?: string;
|
|
3274
|
+
endDate?: string;
|
|
3275
|
+
}
|
|
3276
|
+
interface PromotionReportDto {
|
|
3277
|
+
promotionId: string;
|
|
3278
|
+
promotionName: string;
|
|
3279
|
+
percentage: number;
|
|
3280
|
+
startDate: string;
|
|
3281
|
+
endDate: string;
|
|
3282
|
+
status: string;
|
|
3283
|
+
impact: {
|
|
3284
|
+
contractsCreated: number;
|
|
3285
|
+
totalCommissions: number;
|
|
3286
|
+
averageCommission: number;
|
|
3287
|
+
comparisonWithNormal: {
|
|
3288
|
+
normalCommissions: number;
|
|
3289
|
+
promotionalCommissions: number;
|
|
3290
|
+
additionalCost: number;
|
|
3291
|
+
percentageIncrease: number;
|
|
3292
|
+
};
|
|
3293
|
+
salesIncrease: {
|
|
3294
|
+
contractsBeforePromotion: number;
|
|
3295
|
+
contractsDuringPromotion: number;
|
|
3296
|
+
percentageIncrease: number;
|
|
3297
|
+
};
|
|
3298
|
+
roi: {
|
|
3299
|
+
additionalRevenue: number;
|
|
3300
|
+
additionalCost: number;
|
|
3301
|
+
netBenefit: number;
|
|
3302
|
+
roiPercentage: number;
|
|
3303
|
+
};
|
|
3304
|
+
};
|
|
3305
|
+
}
|
|
3306
|
+
interface CommissionHistoryFiltersDto {
|
|
3307
|
+
entityType?: CommissionEntityType;
|
|
3308
|
+
changeType?: CommissionChangeType;
|
|
3309
|
+
startDate?: string;
|
|
3310
|
+
endDate?: string;
|
|
3311
|
+
page: number;
|
|
3312
|
+
limit: number;
|
|
3313
|
+
}
|
|
3314
|
+
interface CommissionHistoryDto {
|
|
3315
|
+
id: string;
|
|
3316
|
+
configId: string | null;
|
|
3317
|
+
ruleId: string | null;
|
|
3318
|
+
changeType: CommissionChangeType;
|
|
3319
|
+
entityType: CommissionEntityType;
|
|
3320
|
+
previousValue: any;
|
|
3321
|
+
newValue: any;
|
|
3322
|
+
changedBy: {
|
|
3323
|
+
id: string;
|
|
3324
|
+
name: string;
|
|
3325
|
+
email: string;
|
|
3326
|
+
};
|
|
3327
|
+
changedAt: string;
|
|
3328
|
+
reason: string | null;
|
|
3329
|
+
impact: string | null;
|
|
3330
|
+
}
|
|
3331
|
+
interface PaginatedCommissionResult<T> {
|
|
3332
|
+
items: T[];
|
|
3333
|
+
total: number;
|
|
3334
|
+
limit: number;
|
|
3335
|
+
offset: number;
|
|
3336
|
+
}
|
|
3337
|
+
|
|
3338
|
+
declare class CommissionConfigResource extends BaseResource {
|
|
3339
|
+
private basePath;
|
|
3340
|
+
createConfig(data: CreateCommissionConfigDto, options?: RequestOptions): Promise<CommissionConfigDto>;
|
|
3341
|
+
getActiveConfig(options?: RequestOptions): Promise<CommissionConfigDto>;
|
|
3342
|
+
getConfig(id: string, options?: RequestOptions): Promise<CommissionConfigDto>;
|
|
3343
|
+
listConfigs(params?: {
|
|
3344
|
+
page: number;
|
|
3345
|
+
limit: number;
|
|
3346
|
+
}, options?: RequestOptions): Promise<PaginatedResponseDto<CommissionConfigDto>>;
|
|
3347
|
+
updateConfig(id: string, data: UpdateCommissionConfigDto, options?: RequestOptions): Promise<CommissionConfigDto>;
|
|
3348
|
+
deactivateConfig(id: string, options?: RequestOptions): Promise<CommissionConfigDto>;
|
|
3349
|
+
getConfigHistory(id: string, params?: CommissionHistoryFiltersDto, options?: RequestOptions): Promise<PaginatedResponseDto<CommissionHistoryDto>>;
|
|
3350
|
+
validateConfig(data: CreateCommissionConfigDto, options?: RequestOptions): Promise<{
|
|
3351
|
+
valid: boolean;
|
|
3352
|
+
errors?: string[];
|
|
3353
|
+
}>;
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3356
|
+
declare class CommissionRulesResource extends BaseResource {
|
|
3357
|
+
private basePath;
|
|
3358
|
+
createRule(data: CreateCommissionRuleDto, options?: RequestOptions): Promise<CommissionRuleDto>;
|
|
3359
|
+
getRule(id: string, options?: RequestOptions): Promise<CommissionRuleDto>;
|
|
3360
|
+
listRules(params?: CommissionRuleFiltersDto, options?: RequestOptions): Promise<PaginatedResponseDto<CommissionRuleDto>>;
|
|
3361
|
+
updateRule(id: string, data: UpdateCommissionRuleDto, options?: RequestOptions): Promise<CommissionRuleDto>;
|
|
3362
|
+
deleteRule(id: string, options?: RequestOptions): Promise<{
|
|
3363
|
+
success: boolean;
|
|
3364
|
+
}>;
|
|
3365
|
+
activateRule(id: string, options?: RequestOptions): Promise<CommissionRuleDto>;
|
|
3366
|
+
deactivateRule(id: string, options?: RequestOptions): Promise<CommissionRuleDto>;
|
|
3367
|
+
getRuleHistory(id: string, params?: CommissionHistoryFiltersDto, options?: RequestOptions): Promise<PaginatedResponseDto<CommissionHistoryDto>>;
|
|
3368
|
+
validateRule(data: CreateCommissionRuleDto, options?: RequestOptions): Promise<{
|
|
3369
|
+
valid: boolean;
|
|
3370
|
+
errors?: string[];
|
|
3371
|
+
conflicts?: CommissionRuleDto[];
|
|
3372
|
+
}>;
|
|
3373
|
+
getMyRules(options?: RequestOptions): Promise<CommissionRuleDto[]>;
|
|
3374
|
+
getApplicableRule(params: {
|
|
3375
|
+
collaboratorId: string;
|
|
3376
|
+
planId?: string;
|
|
3377
|
+
amount?: number;
|
|
3378
|
+
promotionId?: string;
|
|
3379
|
+
}, options?: RequestOptions): Promise<CommissionRuleDto | null>;
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3382
|
+
declare class CommissionCalculationsResource extends BaseResource {
|
|
3383
|
+
private basePath;
|
|
3384
|
+
createCalculation(data: {
|
|
3385
|
+
contractId: string;
|
|
3386
|
+
collaboratorId: string;
|
|
3387
|
+
}, options?: RequestOptions): Promise<CommissionCalculationDto>;
|
|
3388
|
+
getCalculation(id: string, options?: RequestOptions): Promise<CommissionCalculationDto>;
|
|
3389
|
+
getCalculations(params?: CommissionFiltersDto, options?: RequestOptions): Promise<PaginatedResponseDto<CommissionCalculationDto>>;
|
|
3390
|
+
getCollaboratorCalculations(collaboratorId: string, params?: CommissionFiltersDto, options?: RequestOptions): Promise<PaginatedResponseDto<CommissionCalculationDto>>;
|
|
3391
|
+
confirmCalculation(id: string, data: {
|
|
3392
|
+
note?: string;
|
|
3393
|
+
}, options?: RequestOptions): Promise<CommissionCalculationDto>;
|
|
3394
|
+
reverseCalculation(id: string, data: {
|
|
3395
|
+
reason: string;
|
|
3396
|
+
}, options?: RequestOptions): Promise<CommissionCalculationDto>;
|
|
3397
|
+
markAsPaid(id: string, data: {
|
|
3398
|
+
paidDate: string;
|
|
3399
|
+
note?: string;
|
|
3400
|
+
}, options?: RequestOptions): Promise<CommissionCalculationDto>;
|
|
3401
|
+
simulate(data: SimulateCommissionDto, options?: RequestOptions): Promise<CommissionSimulationDto>;
|
|
3402
|
+
getMyCommissions(params?: CommissionFiltersDto, options?: RequestOptions): Promise<PaginatedResponseDto<CommissionCalculationDto>>;
|
|
3403
|
+
getMyCommissionsSummary(options?: RequestOptions): Promise<CommissionSummaryDto>;
|
|
3404
|
+
}
|
|
3405
|
+
|
|
3406
|
+
declare class CommissionReportsResource extends BaseResource {
|
|
3407
|
+
private basePath;
|
|
3408
|
+
getSummary(params?: ReportFiltersDto, options?: RequestOptions): Promise<CommissionSummaryReportDto>;
|
|
3409
|
+
getByRule(params?: ReportFiltersDto, options?: RequestOptions): Promise<RuleReportDto[]>;
|
|
3410
|
+
getByCollaborator(params?: ReportFiltersDto, options?: RequestOptions): Promise<CollaboratorReportDto[]>;
|
|
3411
|
+
getPromotionAnalytics(params?: PromotionReportFiltersDto, options?: RequestOptions): Promise<PromotionReportDto[]>;
|
|
3412
|
+
exportToCSV(params?: ReportFiltersDto, options?: RequestOptions): Promise<Blob>;
|
|
3413
|
+
getTrends(params?: ReportFiltersDto, options?: RequestOptions): Promise<{
|
|
3414
|
+
date: string;
|
|
3415
|
+
commissions: number;
|
|
3416
|
+
contracts: number;
|
|
3417
|
+
}[]>;
|
|
3418
|
+
getTopPerformers(params?: ReportFiltersDto & {
|
|
3419
|
+
limit?: number;
|
|
3420
|
+
}, options?: RequestOptions): Promise<CollaboratorReportDto[]>;
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
declare class CommissionPromotionsResource extends BaseResource {
|
|
3424
|
+
private basePath;
|
|
3425
|
+
createPromotion(data: CreateCommissionRuleDto, options?: RequestOptions): Promise<CommissionRuleDto>;
|
|
3426
|
+
getPromotion(id: string, options?: RequestOptions): Promise<CommissionRuleDto>;
|
|
3427
|
+
listPromotions(params?: CommissionRuleFiltersDto, options?: RequestOptions): Promise<PaginatedResponseDto<CommissionRuleDto>>;
|
|
3428
|
+
updatePromotion(id: string, data: UpdateCommissionRuleDto, options?: RequestOptions): Promise<CommissionRuleDto>;
|
|
3429
|
+
deletePromotion(id: string, options?: RequestOptions): Promise<{
|
|
3430
|
+
success: boolean;
|
|
3431
|
+
}>;
|
|
3432
|
+
activatePromotion(id: string, options?: RequestOptions): Promise<CommissionRuleDto>;
|
|
3433
|
+
deactivatePromotion(id: string, options?: RequestOptions): Promise<CommissionRuleDto>;
|
|
3434
|
+
validatePromotion(data: CreateCommissionRuleDto, options?: RequestOptions): Promise<{
|
|
3435
|
+
valid: boolean;
|
|
3436
|
+
errors?: string[];
|
|
3437
|
+
conflicts?: CommissionRuleDto[];
|
|
3438
|
+
}>;
|
|
3439
|
+
estimateImpact(id: string, options?: RequestOptions): Promise<{
|
|
3440
|
+
estimatedContracts: number;
|
|
3441
|
+
estimatedCommissions: number;
|
|
3442
|
+
estimatedCost: number;
|
|
3443
|
+
}>;
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3020
3446
|
declare class GymSpaceSdk {
|
|
3021
3447
|
client: ApiClient;
|
|
3022
3448
|
private expoFetch?;
|
|
@@ -3049,6 +3475,11 @@ declare class GymSpaceSdk {
|
|
|
3049
3475
|
bulkMessaging: BulkMessagingResource;
|
|
3050
3476
|
activities: ActivitiesResource;
|
|
3051
3477
|
tags: TagsResource;
|
|
3478
|
+
commissionConfig: CommissionConfigResource;
|
|
3479
|
+
commissionRules: CommissionRulesResource;
|
|
3480
|
+
commissionCalculations: CommissionCalculationsResource;
|
|
3481
|
+
commissionReports: CommissionReportsResource;
|
|
3482
|
+
commissionPromotions: CommissionPromotionsResource;
|
|
3052
3483
|
constructor(config: GymSpaceConfig);
|
|
3053
3484
|
/**
|
|
3054
3485
|
* Set the authentication token
|
|
@@ -3118,4 +3549,4 @@ declare class NetworkError extends GymSpaceError {
|
|
|
3118
3549
|
constructor(message?: string);
|
|
3119
3550
|
}
|
|
3120
3551
|
|
|
3121
|
-
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, type BulkMessageVariable, BulkMessagingResource, type BulkTemplate, type BusinessHours, type CancelContractDto, type CancelSubscriptionDto, type CancellationAnalytics, CancellationReason, 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 ClientTagsResponse, ClientsResource, type CollaboratorRoleDto, CollaboratorsResource, 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 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 GetFeaturedGymsParams, type GetGymInvitationsParams, type GetMembershipPlansParams, type GetTagClientsParams, type Gym, type GymAmenities, type GymSchedule, type GymSettings, type GymSocialMedia, type GymSpaceConfig, GymSpaceError, GymSpaceSdk, type GymStats, GymsResource, HealthResource, type HealthResponse, type InitializeConnectionResponse, type InventorySettings, type InvitationValidationResponse, InvitationsResource, 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 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, PublicCatalogResource, type ReactivateContractDto, type ReadyResponse, type RegisterCollaboratorDto, type RegisterOwnerDto, type RejectedClient, type RejectedClientDto, type RemoveTagsDto, type RemoveTagsResponse, type RenewContractDto, type RequestOptions, type RequestPasswordResetDto, type RequestPasswordResetResponseDto, type ResendResetCodeDto, type ResendResetCodeResponseDto, type ResendVerificationDto, type ResetPasswordDto, type ResetPasswordResponseDto, type ResumeContractDto, RolesResource, type Sale, type SaleItem, type SaleItemDto, SalesResource, type SalesRevenue, type SalesStats, type SearchActivitiesParams, type SearchCatalogParams, 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 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, SuspensionType, type Tag, type TagClientsResponse, type TagStatsResponse, type TagWithAssignment, TagsResource, type TimeSlot, type TopSellingProduct, type UpdateActivityDto, type UpdateActivityNotificationDto, type UpdateBulkTemplateDto, type UpdateClientDto, 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 };
|
|
3552
|
+
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, type BulkMessageVariable, BulkMessagingResource, type BulkTemplate, type BusinessHours, type CancelContractDto, type CancelSubscriptionDto, type CancellationAnalytics, CancellationReason, 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 GetFeaturedGymsParams, type GetGymInvitationsParams, type GetMembershipPlansParams, type GetTagClientsParams, type Gym, type GymAmenities, type GymSchedule, type GymSettings, type GymSocialMedia, type GymSpaceConfig, GymSpaceError, GymSpaceSdk, type GymStats, GymsResource, HealthResource, type HealthResponse, type InitializeConnectionResponse, type InventorySettings, type InvitationValidationResponse, InvitationsResource, 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 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 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, SuspensionType, type Tag, type TagClientsResponse, type TagStatsResponse, type TagWithAssignment, TagsResource, type TimeSlot, type TopSellingProduct, type UpdateActivityDto, type UpdateActivityNotificationDto, type UpdateBulkTemplateDto, 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 };
|