sae-ts-sdk 0.1.0
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/LICENSE +21 -0
- package/README.md +80 -0
- package/dist/client/SaeClient.d.ts +227 -0
- package/dist/client/SaeClient.js +709 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +23 -0
- package/dist/models/enums.d.ts +97 -0
- package/dist/models/enums.js +121 -0
- package/dist/models/logs.d.ts +36 -0
- package/dist/models/logs.js +10 -0
- package/dist/models/requests.d.ts +509 -0
- package/dist/models/requests.js +2 -0
- package/dist/models/responses.d.ts +607 -0
- package/dist/models/responses.js +2 -0
- package/dist/services/systemLogService.d.ts +9 -0
- package/dist/services/systemLogService.js +44 -0
- package/dist/utils/DocumentCalculator.d.ts +48 -0
- package/dist/utils/DocumentCalculator.js +71 -0
- package/package.json +73 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 EskenderDev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# sae-ts-sdk
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/sae-ts-sdk)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
|
|
6
|
+
**TypeScript/JavaScript SDK oficial para la API SAE** — Sistema de Administración de Empresa con Facturación Electrónica de Hacienda Costa Rica.
|
|
7
|
+
|
|
8
|
+
## Instalación
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install sae-ts-sdk
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Uso Básico
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { SaeClient } from 'sae-ts-sdk';
|
|
18
|
+
|
|
19
|
+
const client = new SaeClient('https://api.tu-sae.com');
|
|
20
|
+
|
|
21
|
+
// Login
|
|
22
|
+
const result = await client.login('usuario@empresa.com', 'password');
|
|
23
|
+
|
|
24
|
+
// Emitir factura
|
|
25
|
+
const factura = await client.emitir({
|
|
26
|
+
Emisor: { /* ... */ },
|
|
27
|
+
Receptor: { /* ... */ },
|
|
28
|
+
DetalleServicio: { /* ... */ }
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Módulos Disponibles
|
|
33
|
+
|
|
34
|
+
| Módulo | Descripción |
|
|
35
|
+
|--------|-------------|
|
|
36
|
+
| **Auth** | Login, registro, reset de contraseña |
|
|
37
|
+
| **Hacienda** | Emitir, consultar, endosar documentos |
|
|
38
|
+
| **Tenant Users** | Invitar usuarios, gestionar roles |
|
|
39
|
+
| **Branches & Terminals** | Sucursales, terminales, secuencias |
|
|
40
|
+
| **License Addons** | Compra/cancelación de paquetes |
|
|
41
|
+
| **Reports** | IVA, libro de ventas, compras, CABYS + PDF/Excel |
|
|
42
|
+
| **Developer API** | Aplicaciones registradas, módulos |
|
|
43
|
+
| **Admin** | Gestión global de plataforma (solo SuperAdmin) |
|
|
44
|
+
| **Webhooks** | Suscripción a eventos de Hacienda |
|
|
45
|
+
|
|
46
|
+
## SignalR (Tiempo Real)
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { SaeClient } from 'sae-ts-sdk';
|
|
50
|
+
|
|
51
|
+
const client = new SaeClient('https://api.tu-sae.com');
|
|
52
|
+
await client.login('usuario@empresa.com', 'password');
|
|
53
|
+
|
|
54
|
+
// Conectar SignalR
|
|
55
|
+
const hubUrl = 'https://api.tu-sae.com/hubs/hacienda';
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
> El SDK usa Axios para HTTP. Para SignalR en tiempo real, usa la librería `@microsoft/signalr` directamente con el endpoint `/hubs/hacienda` autenticando con el JWT obtenido en `login()`.
|
|
59
|
+
|
|
60
|
+
## Variables de Entorno
|
|
61
|
+
|
|
62
|
+
Para desarrollo local:
|
|
63
|
+
|
|
64
|
+
```env
|
|
65
|
+
PUBLIC_API_URL=https://localhost:55431
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Reportes
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// Reporte IVA D-104 de enero 2025
|
|
72
|
+
const reporte = await client.getReport<ReporteIvaDto>('iva', 1, 2025);
|
|
73
|
+
|
|
74
|
+
// Descargar como PDF
|
|
75
|
+
const pdf = await client.downloadReport('iva', 'pdf', 1, 2025);
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Licencia
|
|
79
|
+
|
|
80
|
+
MIT © [EskenderDev](https://github.com/EskenderDev)
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { GenerarDocumentoRequest, HaciendaConfigRequest, UpdateTenantRequest, MensajeEndosoRequest, CreateSettlementRequest, PurchaseAddonRequest, ReportAddonPurchaseRequest, ApproveAddonRequest, RejectAddonRequest, EnviarDocumentoSimplificadoRequest, RegisterRequest, ResetPasswordRequest, PartnerRegisterRequest, IssueLicenseRequest, LeadRegisterRequest, TenantRoleRequest, CreateOrderRequest, ReportOrderPaymentRequest, InviteUserRequest, UpdateUserRoleRequest, AcceptInviteRequest, ConfirmEmailRequest, CreateBranchRequest, UpdateBranchRequest, CreateTerminalRequest, UpdateTerminalRequest, UpdateSequenceRequest, CreateLicensePackageRequest, UpdateLicensePackageRequest, RegisterAppRequest, AdminRegisterRequest, AdminUpdateRequest, SettlementPayRequest, ValidateLicenseRequest, ActivateLicenseRequest, CreatePlatformModuleRequest, UpdatePlatformModuleRequest, CreateDeveloperModuleRequest, UpdateDeveloperModuleRequest } from '../models/requests';
|
|
3
|
+
import { LoginResult, PasswordResetResponse, DocumentoResult, HaciendaEnvioResult, HaciendaConfigResponse, EnvironmentInfoResponse, TenantResponse, ProvinciaResponse, CantonResponse, DistritoResponse, EconomicActivityResponse, PagedResult, DocumentoJsonDto, CommissionSettlementDto, SalesCommissionDto, LicensePackageResponse, LicenseAddonResponse, BillingSummaryResponse, DocumentResumen, PartnerProfile, PartnerClient, PublicPlan, PermissionDto, TenantRoleDto, LicenseResponse, TenantLicense, AdminMeResponse, ImpersonateResponse, PendingApprovalDto, DashboardStatsResponse, SubscriptionOrderDto, BranchResponse, TerminalResponse, DocumentSequenceResponse, NextConsecutiveResponse, DeveloperClientResponse, RegisteredApplicationResponse, SystemSettingResponse, UnifiedPaymentResponse, AdminAuthUserResponse, GlobalStatsResponse, SaeIdentifierResponse, PlatformModuleResponse } from '../models/responses';
|
|
4
|
+
import { SystemLogService } from '../services/systemLogService';
|
|
5
|
+
export interface ApiClient {
|
|
6
|
+
get<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
7
|
+
post<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
|
|
8
|
+
put<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
|
|
9
|
+
delete<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
10
|
+
}
|
|
11
|
+
export declare class SaeClient implements ApiClient {
|
|
12
|
+
private http;
|
|
13
|
+
private baseUrl;
|
|
14
|
+
private token?;
|
|
15
|
+
private apiKey?;
|
|
16
|
+
private tenantId?;
|
|
17
|
+
private terminalKey?;
|
|
18
|
+
logs: SystemLogService;
|
|
19
|
+
constructor(baseUrl?: string, token?: string, apiKey?: string);
|
|
20
|
+
private updateHeaders;
|
|
21
|
+
setToken(token: string): void;
|
|
22
|
+
setApiKey(apiKey: string): void;
|
|
23
|
+
setTenantId(tenantId: string | undefined): void;
|
|
24
|
+
setTerminalKey(terminalKey: string | undefined): void;
|
|
25
|
+
get<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
26
|
+
post<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
|
|
27
|
+
put<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
|
|
28
|
+
delete<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
29
|
+
login(email: string, password?: string): Promise<LoginResult>;
|
|
30
|
+
adminLogin(email: string, password?: string): Promise<LoginResult>;
|
|
31
|
+
forgotPassword(email: string): Promise<PasswordResetResponse>;
|
|
32
|
+
resetPassword(token: string, newPassword: string): Promise<PasswordResetResponse>;
|
|
33
|
+
register(request: RegisterRequest): Promise<void>;
|
|
34
|
+
resendVerification(email: string): Promise<void>;
|
|
35
|
+
confirmEmail(request: ConfirmEmailRequest): Promise<void>;
|
|
36
|
+
adminForgotPassword(email: string): Promise<void>;
|
|
37
|
+
adminResetPassword(request: ResetPasswordRequest): Promise<void>;
|
|
38
|
+
adminMe(): Promise<AdminMeResponse>;
|
|
39
|
+
adminImpersonate(tenantId: string): Promise<ImpersonateResponse>;
|
|
40
|
+
adminGetPendingApprovals(): Promise<PendingApprovalDto[]>;
|
|
41
|
+
adminApproveApproval(id: string, type: number, overrideTenantId?: string): Promise<void>;
|
|
42
|
+
adminRejectApproval(id: string, type: number, reason: string): Promise<void>;
|
|
43
|
+
adminGetRedisQueues(): Promise<any>;
|
|
44
|
+
adminGetBillingSettings(): Promise<any>;
|
|
45
|
+
adminUpdateSettingsBatch(settings: Record<string, string>): Promise<void>;
|
|
46
|
+
adminGetPlans(): Promise<any[]>;
|
|
47
|
+
adminGetPlan(id: string): Promise<any>;
|
|
48
|
+
adminCreatePlan(data: any): Promise<void>;
|
|
49
|
+
adminUpdatePlan(id: string, data: any): Promise<void>;
|
|
50
|
+
adminDeletePlan(id: string): Promise<void>;
|
|
51
|
+
getCurrentTenant(): Promise<TenantResponse>;
|
|
52
|
+
updateCurrentTenant(request: UpdateTenantRequest): Promise<TenantResponse>;
|
|
53
|
+
regenerateApiKey(): Promise<{
|
|
54
|
+
apiKey: string;
|
|
55
|
+
}>;
|
|
56
|
+
getMyTenants(): Promise<TenantResponse[]>;
|
|
57
|
+
registerTenant(name: string, taxId: string): Promise<TenantResponse>;
|
|
58
|
+
getTenantBillingSettings(tenantId: string): Promise<Record<string, string>>;
|
|
59
|
+
uploadTenantLogo(formData: FormData): Promise<{
|
|
60
|
+
logoUrl: string;
|
|
61
|
+
}>;
|
|
62
|
+
deleteTenantLogo(): Promise<{
|
|
63
|
+
message: string;
|
|
64
|
+
}>;
|
|
65
|
+
getTenantUsers(): Promise<any[]>;
|
|
66
|
+
inviteTenantUser(request: InviteUserRequest): Promise<any>;
|
|
67
|
+
acceptInvitation(request: AcceptInviteRequest): Promise<any>;
|
|
68
|
+
removeTenantUser(id: string): Promise<void>;
|
|
69
|
+
updateTenantUserRole(id: string, request: UpdateUserRoleRequest): Promise<void>;
|
|
70
|
+
getRoles(): Promise<TenantRoleDto[]>;
|
|
71
|
+
getPermissions(): Promise<PermissionDto[]>;
|
|
72
|
+
createRole(request: TenantRoleRequest): Promise<TenantRoleDto>;
|
|
73
|
+
updateRole(id: string, request: TenantRoleRequest): Promise<TenantRoleDto>;
|
|
74
|
+
deleteRole(id: string): Promise<void>;
|
|
75
|
+
getProvincias(): Promise<ProvinciaResponse[]>;
|
|
76
|
+
getCantones(provinceCode: string): Promise<CantonResponse[]>;
|
|
77
|
+
getDistritos(provinceCode: string, cantonCode: string): Promise<DistritoResponse[]>;
|
|
78
|
+
getCurrencies(search?: string): Promise<any[]>;
|
|
79
|
+
getEconomicActivities(search?: string): Promise<EconomicActivityResponse[]>;
|
|
80
|
+
generarDocumento(documento: GenerarDocumentoRequest): Promise<DocumentoResult>;
|
|
81
|
+
enviarDocumento(documento: GenerarDocumentoRequest): Promise<HaciendaEnvioResult>;
|
|
82
|
+
emitir(request: EnviarDocumentoSimplificadoRequest): Promise<HaciendaEnvioResult>;
|
|
83
|
+
consultarEstado(clave: string): Promise<HaciendaEnvioResult>;
|
|
84
|
+
endosarDocumento(request: MensajeEndosoRequest): Promise<any>;
|
|
85
|
+
aceptarDocumento(request: any): Promise<any>;
|
|
86
|
+
getUsedCurrencies(): Promise<any[]>;
|
|
87
|
+
getDocumentById(id: string): Promise<DocumentoJsonDto>;
|
|
88
|
+
getDocumentXml(id: string): Promise<ArrayBuffer>;
|
|
89
|
+
getDocumentResponseXml(id: string): Promise<ArrayBuffer>;
|
|
90
|
+
getDocumentPdf(id: string): Promise<ArrayBuffer>;
|
|
91
|
+
getDocumentPdfByClave(clave: string): Promise<ArrayBuffer>;
|
|
92
|
+
buscarDocumentos(params: any): Promise<PagedResult<DocumentoJsonDto>>;
|
|
93
|
+
exportDocuments(format: 'csv' | 'excel' | 'pdf', filters: any): Promise<ArrayBuffer>;
|
|
94
|
+
getDocumentSummary(fechaDesde?: string, fechaHasta?: string): Promise<DocumentResumen>;
|
|
95
|
+
retryDocument(clave: string): Promise<void>;
|
|
96
|
+
regenerateDocument(clave: string, newConsecutive?: number): Promise<any>;
|
|
97
|
+
getNextConsecutive(sucursal: number, terminal: number, tipoDocumento: string): Promise<number>;
|
|
98
|
+
resendDocumentEmail(id: string): Promise<void>;
|
|
99
|
+
forceDocumentRejection(id: string): Promise<void>;
|
|
100
|
+
getDocumentSafetyScore(clave: string): Promise<any>;
|
|
101
|
+
getReport<T>(type: string, mes: number, anio: number): Promise<T>;
|
|
102
|
+
downloadReport(type: string, format: string, mes: number, anio: number): Promise<ArrayBuffer>;
|
|
103
|
+
getHaciendaConfig(): Promise<HaciendaConfigResponse>;
|
|
104
|
+
saveHaciendaConfig(config: HaciendaConfigRequest): Promise<HaciendaConfigResponse>;
|
|
105
|
+
getHaciendaEnvironments(): Promise<EnvironmentInfoResponse[]>;
|
|
106
|
+
getHaciendaConfigByEnvironment(environment: number | string): Promise<HaciendaConfigResponse>;
|
|
107
|
+
switchHaciendaEnvironment(environment: number | string): Promise<EnvironmentInfoResponse>;
|
|
108
|
+
getBranches(): Promise<BranchResponse[]>;
|
|
109
|
+
getBranch(id: string): Promise<BranchResponse>;
|
|
110
|
+
createBranch(request: CreateBranchRequest): Promise<BranchResponse>;
|
|
111
|
+
updateBranch(id: string, request: UpdateBranchRequest): Promise<void>;
|
|
112
|
+
deleteBranch(id: string): Promise<void>;
|
|
113
|
+
getTerminals(branchId: string): Promise<TerminalResponse[]>;
|
|
114
|
+
getTerminal(id: string): Promise<TerminalResponse>;
|
|
115
|
+
createTerminal(branchId: string, request: CreateTerminalRequest): Promise<TerminalResponse>;
|
|
116
|
+
updateTerminal(id: string, request: UpdateTerminalRequest): Promise<void>;
|
|
117
|
+
deleteTerminal(id: string): Promise<void>;
|
|
118
|
+
getTerminalSequences(terminalId: string): Promise<DocumentSequenceResponse[]>;
|
|
119
|
+
updateTerminalSequence(terminalId: string, docType: string, request: UpdateSequenceRequest): Promise<void>;
|
|
120
|
+
getNextConsecutiveManual(sucursal: number, terminal: number, tipoDocumento: string): Promise<number>;
|
|
121
|
+
getNextConsecutiveByTerminal(terminalId: string, docType: string): Promise<NextConsecutiveResponse>;
|
|
122
|
+
generateTerminalLicense(terminalId: string): Promise<TerminalResponse>;
|
|
123
|
+
getLicensePackages(systemOnly?: boolean, tenantId?: string): Promise<LicensePackageResponse[]>;
|
|
124
|
+
getLicensePackage(id: string): Promise<LicensePackageResponse>;
|
|
125
|
+
createLicensePackage(request: CreateLicensePackageRequest): Promise<LicensePackageResponse>;
|
|
126
|
+
updateLicensePackage(id: string, request: UpdateLicensePackageRequest): Promise<void>;
|
|
127
|
+
deleteLicensePackage(id: string): Promise<void>;
|
|
128
|
+
/** Updates the active modules for a specific license. Returns { activeModules, allowedModules }. */
|
|
129
|
+
updateLicenseModules(id: string, moduleCodes: string[]): Promise<{
|
|
130
|
+
activeModules: string[];
|
|
131
|
+
allowedModules: string[];
|
|
132
|
+
}>;
|
|
133
|
+
/** Gets the allowed and active modules for a specific license without modifying anything. */
|
|
134
|
+
getLicenseModules(id: string): Promise<{
|
|
135
|
+
activeModules: string[];
|
|
136
|
+
allowedModules: string[];
|
|
137
|
+
}>;
|
|
138
|
+
getDeveloperClients(): Promise<DeveloperClientResponse[]>;
|
|
139
|
+
getDeveloperApplications(): Promise<RegisteredApplicationResponse[]>;
|
|
140
|
+
registerDeveloperApplication(request: RegisterAppRequest): Promise<RegisteredApplicationResponse>;
|
|
141
|
+
deactivateDeveloperApplication(id: string): Promise<void>;
|
|
142
|
+
getSaeIdentifiers(): Promise<SaeIdentifierResponse[]>;
|
|
143
|
+
getDeveloperModules(): Promise<PlatformModuleResponse[]>;
|
|
144
|
+
createDeveloperModule(request: CreateDeveloperModuleRequest): Promise<PlatformModuleResponse>;
|
|
145
|
+
validateModuleCode(code: string): Promise<boolean>;
|
|
146
|
+
updateDeveloperModule(id: string, request: UpdateDeveloperModuleRequest): Promise<PlatformModuleResponse>;
|
|
147
|
+
deleteDeveloperModule(id: string): Promise<void>;
|
|
148
|
+
validateLicense(request: ValidateLicenseRequest): Promise<any>;
|
|
149
|
+
activateLicense(request: ActivateLicenseRequest): Promise<any>;
|
|
150
|
+
adminUpdateLicenseModules(licenseId: string, modules: string[]): Promise<void>;
|
|
151
|
+
adminGetUsers(): Promise<any[]>;
|
|
152
|
+
adminUpgradeSubscription(tenantId: string, tier: number): Promise<void>;
|
|
153
|
+
adminUpdateTenant(id: string, request: any): Promise<void>;
|
|
154
|
+
adminGetTenantConfig(id: string): Promise<any>;
|
|
155
|
+
adminGetGlobalConfig(): Promise<any>;
|
|
156
|
+
getUnifiedPaymentHistory(): Promise<UnifiedPaymentResponse[]>;
|
|
157
|
+
approveSubscriptionRequest(id: string): Promise<void>;
|
|
158
|
+
rejectSubscriptionRequest(id: string, reason: string): Promise<void>;
|
|
159
|
+
getSystemSettings(): Promise<SystemSettingResponse[]>;
|
|
160
|
+
updateSystemSetting(key: string, value: string): Promise<void>;
|
|
161
|
+
updateSystemSettingsBatch(settings: Record<string, string>): Promise<void>;
|
|
162
|
+
retryAllHaciendaDocuments(): Promise<void>;
|
|
163
|
+
getAdminUsers(): Promise<AdminAuthUserResponse[]>;
|
|
164
|
+
registerAdminUser(request: AdminRegisterRequest): Promise<AdminAuthUserResponse>;
|
|
165
|
+
updateAdminUser(id: string, request: AdminUpdateRequest): Promise<void>;
|
|
166
|
+
deleteAdminUser(id: string): Promise<void>;
|
|
167
|
+
getGlobalStats(): Promise<GlobalStatsResponse>;
|
|
168
|
+
getAdminSettlements(): Promise<CommissionSettlementDto[]>;
|
|
169
|
+
paySettlement(settlementId: string, request: SettlementPayRequest): Promise<void>;
|
|
170
|
+
getPendingApprovals(): Promise<PendingApprovalDto[]>;
|
|
171
|
+
approveApproval(id: string, type: number, overrideTenantId?: string): Promise<void>;
|
|
172
|
+
rejectApproval(id: string, type: number, reason: string): Promise<void>;
|
|
173
|
+
getPendingInvoices(): Promise<SubscriptionOrderDto[]>;
|
|
174
|
+
retryInvoice(id: string): Promise<any>;
|
|
175
|
+
adminGetPlatformModules(): Promise<PlatformModuleResponse[]>;
|
|
176
|
+
adminGetPlatformModule(id: string): Promise<PlatformModuleResponse>;
|
|
177
|
+
adminCreatePlatformModule(request: CreatePlatformModuleRequest): Promise<PlatformModuleResponse>;
|
|
178
|
+
adminUpdatePlatformModule(id: string, request: UpdatePlatformModuleRequest): Promise<PlatformModuleResponse>;
|
|
179
|
+
adminDeletePlatformModule(id: string): Promise<void>;
|
|
180
|
+
getPartnerProfile(): Promise<PartnerProfile | null>;
|
|
181
|
+
registerPartner(request: PartnerRegisterRequest): Promise<PartnerProfile>;
|
|
182
|
+
getPartnerCommissions(): Promise<SalesCommissionDto[]>;
|
|
183
|
+
getPartnerClients(): Promise<PartnerClient[]>;
|
|
184
|
+
getSubscriptionPlans(): Promise<PublicPlan[]>;
|
|
185
|
+
getSubscriptionPlanById(id: string): Promise<PublicPlan>;
|
|
186
|
+
getDashboardStats(): Promise<DashboardStatsResponse>;
|
|
187
|
+
getSubscriptionHistory(): Promise<SubscriptionOrderDto[]>;
|
|
188
|
+
createSubscriptionOrder(request: CreateOrderRequest): Promise<SubscriptionOrderDto>;
|
|
189
|
+
reportSubscriptionPayment(request: ReportOrderPaymentRequest): Promise<SubscriptionOrderDto>;
|
|
190
|
+
getAdminBillingSettings(): Promise<Record<string, string>>;
|
|
191
|
+
registerLead(request: LeadRegisterRequest): Promise<void>;
|
|
192
|
+
adminGetLeads(): Promise<any[]>;
|
|
193
|
+
getMySettlements(): Promise<CommissionSettlementDto[]>;
|
|
194
|
+
getAvailableCommissions(): Promise<SalesCommissionDto[]>;
|
|
195
|
+
createSettlement(request: CreateSettlementRequest): Promise<CommissionSettlementDto>;
|
|
196
|
+
generateSettlementInvoice(settlementId: string): Promise<CommissionSettlementDto>;
|
|
197
|
+
getAvailablePackages(): Promise<LicensePackageResponse[]>;
|
|
198
|
+
purchaseAddon(request: PurchaseAddonRequest): Promise<LicenseAddonResponse>;
|
|
199
|
+
reportAddonPurchase(request: ReportAddonPurchaseRequest): Promise<LicenseAddonResponse>;
|
|
200
|
+
getTenantAddons(): Promise<LicenseAddonResponse[]>;
|
|
201
|
+
cancelAddon(addonId: string): Promise<void>;
|
|
202
|
+
adminGetLicenseLimits(): Promise<any[]>;
|
|
203
|
+
adminGetDeveloperSettlements(): Promise<any[]>;
|
|
204
|
+
getMyDeveloperSettlements(): Promise<any[]>;
|
|
205
|
+
getDeveloperPendingCommissions(): Promise<any[]>;
|
|
206
|
+
createDeveloperSettlement(commissionIds: string[]): Promise<any>;
|
|
207
|
+
payDeveloperSettlement(id: string, reference: string, paymentMethod?: string): Promise<any>;
|
|
208
|
+
getBillingSummary(): Promise<BillingSummaryResponse>;
|
|
209
|
+
getAddonPackages(): Promise<any[]>;
|
|
210
|
+
adminGetAllAddons(status?: string): Promise<LicenseAddonResponse[]>;
|
|
211
|
+
adminGetAllPackages(): Promise<any[]>;
|
|
212
|
+
adminGetPackage(id: string): Promise<any>;
|
|
213
|
+
adminCreatePackage(data: any): Promise<void>;
|
|
214
|
+
adminUpdatePackage(id: string, data: any): Promise<void>;
|
|
215
|
+
adminDeletePackage(id: string): Promise<void>;
|
|
216
|
+
adminGetPendingAddons(): Promise<LicenseAddonResponse[]>;
|
|
217
|
+
adminApproveAddon(addonId: string, request: ApproveAddonRequest): Promise<void>;
|
|
218
|
+
adminRejectAddon(addonId: string, request: RejectAddonRequest): Promise<void>;
|
|
219
|
+
getTenantLicenses(): Promise<TenantLicense[]>;
|
|
220
|
+
adminGetAllLicenses(): Promise<LicenseResponse[]>;
|
|
221
|
+
issueLicense(tenantId: string, request: IssueLicenseRequest): Promise<LicenseResponse>;
|
|
222
|
+
revokeLicense(licenseId: string): Promise<void>;
|
|
223
|
+
getWebhooks(): Promise<any[]>;
|
|
224
|
+
createWebhook(data: any): Promise<any>;
|
|
225
|
+
deleteWebhook(id: string): Promise<void>;
|
|
226
|
+
getDocumentsJson(filters: any): Promise<any>;
|
|
227
|
+
}
|