@gymspace/sdk 1.2.8 → 1.2.11
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.d.mts +54 -183
- package/dist/index.d.ts +54 -183
- package/dist/index.js +45 -78
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46 -77
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +36 -4
- package/src/models/check-ins.ts +6 -4
- package/src/models/dashboard.ts +26 -1
- package/src/models/index.ts +0 -2
- package/src/models/onboarding.ts +0 -17
- package/src/models/payment-methods.ts +2 -2
- package/src/models/products.ts +2 -10
- package/src/resources/admin-subscription-management.ts +1 -1
- package/src/resources/dashboard.ts +11 -1
- package/src/resources/index.ts +0 -2
- package/src/resources/payment-methods.ts +3 -3
- package/src/resources/products.ts +21 -31
- package/src/sdk.ts +7 -6
- package/src/models/evaluations.ts +0 -91
- package/src/models/leads.ts +0 -52
- package/src/resources/evaluations.ts +0 -63
- package/src/resources/leads.ts +0 -48
package/src/resources/leads.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { BaseResource } from './base';
|
|
2
|
-
import {
|
|
3
|
-
Lead,
|
|
4
|
-
CreateLeadDto,
|
|
5
|
-
UpdateLeadDto,
|
|
6
|
-
SearchLeadsParams,
|
|
7
|
-
LeadStats
|
|
8
|
-
} from '../models/leads';
|
|
9
|
-
import { RequestOptions, PaginatedResponseDto } from '../types';
|
|
10
|
-
|
|
11
|
-
export class LeadsResource extends BaseResource {
|
|
12
|
-
private basePath = 'leads';
|
|
13
|
-
|
|
14
|
-
async createLead(data: CreateLeadDto, options?: RequestOptions): Promise<Lead> {
|
|
15
|
-
return this.client.post<Lead>(this.basePath, data, options);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async searchLeads(
|
|
19
|
-
params?: SearchLeadsParams,
|
|
20
|
-
options?: RequestOptions
|
|
21
|
-
): Promise<PaginatedResponseDto<Lead>> {
|
|
22
|
-
return this.paginate<Lead>(this.basePath, params, options);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async getLead(id: string, options?: RequestOptions): Promise<Lead> {
|
|
26
|
-
return this.client.get<Lead>(`${this.basePath}/${id}`, undefined, options);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async updateLead(
|
|
30
|
-
id: string,
|
|
31
|
-
data: UpdateLeadDto,
|
|
32
|
-
options?: RequestOptions
|
|
33
|
-
): Promise<Lead> {
|
|
34
|
-
return this.client.put<Lead>(`${this.basePath}/${id}`, data, options);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async getLeadStats(options?: RequestOptions): Promise<LeadStats> {
|
|
38
|
-
return this.client.get<LeadStats>(`${this.basePath}/stats/gym`, undefined, options);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async convertLead(id: string, options?: RequestOptions): Promise<{ clientId: string }> {
|
|
42
|
-
return this.client.post<{ clientId: string }>(
|
|
43
|
-
`${this.basePath}/${id}/convert`,
|
|
44
|
-
undefined,
|
|
45
|
-
options
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
}
|