@abpjs/saas 3.1.0 → 4.0.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/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { ABP, RoutesService, RestService } from '@abpjs/core';
1
+ import { ABP, RoutesService, RestService, PagedResultDto } from '@abpjs/core';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
 
4
4
  /**
@@ -98,133 +98,281 @@ declare const SAAS_ROUTE_PROVIDERS: {
98
98
  };
99
99
 
100
100
  /**
101
- * SaaS Component Identifiers
102
- * Used for component registration and routing
101
+ * SaaS Proxy DTOs
102
+ * Translated from @volo/abp.ng.saas v3.2.0
103
103
  *
104
- * @since 2.4.0
105
- * @updated 2.7.0 - Changed from enum to const object
104
+ * Typed Data Transfer Objects for the SaaS module proxy services.
105
+ *
106
+ * @since 3.2.0
106
107
  */
107
- declare const eSaasComponents: {
108
- readonly Editions: "Saas.EditionsComponent";
109
- readonly Tenants: "Saas.TenantsComponent";
110
- };
108
+
111
109
  /**
112
- * Type for SaaS component key values
110
+ * Base DTO for edition create/update operations
111
+ * @since 3.2.0
113
112
  */
114
- type SaasComponentKey = (typeof eSaasComponents)[keyof typeof eSaasComponents];
113
+ interface EditionCreateOrUpdateDtoBase {
114
+ displayName: string;
115
+ extraProperties?: ABP.Dictionary<unknown>;
116
+ }
117
+ /**
118
+ * DTO for creating a new edition
119
+ * @since 3.2.0
120
+ */
121
+ type EditionCreateDto = EditionCreateOrUpdateDtoBase;
122
+ /**
123
+ * DTO for updating an edition
124
+ * @since 3.2.0
125
+ */
126
+ type EditionUpdateDto = EditionCreateOrUpdateDtoBase;
127
+ /**
128
+ * DTO for edition entity response
129
+ * @since 3.2.0
130
+ */
131
+ interface EditionDto {
132
+ id: string;
133
+ displayName: string;
134
+ concurrencyStamp?: string;
135
+ creationTime?: string | Date;
136
+ creatorId?: string;
137
+ extraProperties?: ABP.Dictionary<unknown>;
138
+ }
139
+ /**
140
+ * Query input for fetching editions
141
+ * @since 3.2.0
142
+ */
143
+ interface GetEditionsInput {
144
+ filter?: string;
145
+ skipCount?: number;
146
+ maxResultCount?: number;
147
+ sorting?: string;
148
+ }
149
+ /**
150
+ * Base DTO for tenant create/update operations
151
+ * @since 3.2.0
152
+ */
153
+ interface SaasTenantCreateOrUpdateDtoBase {
154
+ name: string;
155
+ editionId?: string;
156
+ extraProperties?: ABP.Dictionary<unknown>;
157
+ }
158
+ /**
159
+ * DTO for creating a new tenant
160
+ * @since 3.2.0
161
+ */
162
+ interface SaasTenantCreateDto extends SaasTenantCreateOrUpdateDtoBase {
163
+ adminEmailAddress: string;
164
+ adminPassword: string;
165
+ }
166
+ /**
167
+ * DTO for updating a tenant
168
+ * @since 3.2.0
169
+ */
170
+ type SaasTenantUpdateDto = SaasTenantCreateOrUpdateDtoBase;
171
+ /**
172
+ * DTO for tenant entity response
173
+ * @since 3.2.0
174
+ */
175
+ interface SaasTenantDto {
176
+ id: string;
177
+ name: string;
178
+ editionId?: string;
179
+ editionName?: string;
180
+ concurrencyStamp?: string;
181
+ creationTime?: string | Date;
182
+ creatorId?: string;
183
+ extraProperties?: ABP.Dictionary<unknown>;
184
+ }
185
+ /**
186
+ * Query input for fetching tenants
187
+ * @since 3.2.0
188
+ */
189
+ interface GetTenantsInput {
190
+ filter?: string;
191
+ getEditionNames?: boolean;
192
+ skipCount?: number;
193
+ maxResultCount?: number;
194
+ sorting?: string;
195
+ }
115
196
 
116
197
  /**
117
- * SaaS Models
118
- * Translated from @volo/abp.ng.saas v2.4.0
198
+ * SaaS Proxy Host Models
199
+ * Translated from @volo/abp.ng.saas v3.2.0
119
200
  *
120
- * @updated 2.4.0 - Updated CreateTenantRequest and UpdateTenantRequest types
201
+ * Additional models for the SaaS host proxy services.
202
+ *
203
+ * @since 3.2.0
121
204
  */
205
+ /**
206
+ * Result type for edition usage statistics
207
+ * @since 3.2.0
208
+ */
209
+ interface GetEditionUsageStatisticsResult {
210
+ data: Record<string, number>;
211
+ }
122
212
 
123
213
  /**
124
- * Saas namespace containing all models for SaaS management
214
+ * Edition Proxy Service
215
+ * Translated from @volo/abp.ng.saas v3.2.0
216
+ *
217
+ * Provides typed REST API methods for managing editions.
218
+ *
219
+ * @since 3.2.0
125
220
  */
126
- declare namespace Saas {
221
+
222
+ /**
223
+ * Service for edition operations with typed DTOs.
224
+ * This is the new proxy service that replaces the edition-related
225
+ * methods in the legacy SaasService.
226
+ *
227
+ * @since 3.2.0
228
+ */
229
+ declare class EditionService {
230
+ private restService;
127
231
  /**
128
- * State interface for SaaS
232
+ * API name for multi-API configurations
233
+ * @since 3.2.0
129
234
  */
130
- interface State {
131
- tenants: ABP.PagedResponse<Tenant>;
132
- editions: ABP.PagedResponse<Edition>;
133
- usageStatistics: Record<string, number>;
134
- latestTenants: Tenant[];
135
- }
235
+ apiName: string;
236
+ constructor(restService: RestService);
136
237
  /**
137
- * Tenant interface
238
+ * Create a new edition
239
+ * @param input Edition creation DTO
240
+ * @returns Promise with created edition
138
241
  */
139
- interface Tenant {
140
- id: string;
141
- name: string;
142
- editionId?: string;
143
- editionName?: string;
144
- concurrencyStamp?: string;
145
- }
242
+ create(input: EditionCreateDto): Promise<EditionDto>;
146
243
  /**
147
- * Edition interface
244
+ * Delete an edition by ID
245
+ * @param id Edition ID
246
+ * @returns Promise that resolves when deletion is complete
148
247
  */
149
- interface Edition {
150
- id: string;
151
- displayName: string;
152
- concurrencyStamp?: string;
153
- }
248
+ delete(id: string): Promise<void>;
154
249
  /**
155
- * Query parameters for fetching tenants
250
+ * Get an edition by ID
251
+ * @param id Edition ID
252
+ * @returns Promise with edition data
156
253
  */
157
- interface TenantsQueryParams extends ABP.PageQueryParams {
158
- filter?: string;
159
- editionId?: string;
160
- getEditionNames?: boolean;
161
- }
254
+ get(id: string): Promise<EditionDto>;
162
255
  /**
163
- * Query parameters for fetching editions
256
+ * Get paginated list of editions
257
+ * @param input Query parameters for filtering and pagination
258
+ * @returns Promise with paginated editions response
164
259
  */
165
- interface EditionsQueryParams extends ABP.PageQueryParams {
166
- filter?: string;
167
- }
260
+ getList(input?: GetEditionsInput): Promise<PagedResultDto<EditionDto>>;
168
261
  /**
169
- * Create tenant request
170
- * @updated 2.4.0 - adminEmailAddress and adminPassword are now required
262
+ * Get usage statistics for editions
263
+ * @returns Promise with usage statistics data
171
264
  */
172
- interface CreateTenantRequest {
173
- adminEmailAddress: string;
174
- adminPassword: string;
175
- name: string;
176
- editionId?: string;
177
- }
265
+ getUsageStatistics(): Promise<GetEditionUsageStatisticsResult>;
178
266
  /**
179
- * Update tenant request
180
- * @updated 2.4.0 - Now uses Omit<Tenant, 'editionName'> pattern
267
+ * Update an existing edition
268
+ * @param id Edition ID
269
+ * @param input Edition update DTO
270
+ * @returns Promise with updated edition
181
271
  */
182
- type UpdateTenantRequest = Omit<Tenant, 'editionName'>;
272
+ update(id: string, input: EditionUpdateDto): Promise<EditionDto>;
273
+ }
274
+
275
+ /**
276
+ * Tenant Proxy Service
277
+ * Translated from @volo/abp.ng.saas v3.2.0
278
+ *
279
+ * Provides typed REST API methods for managing tenants.
280
+ *
281
+ * @since 3.2.0
282
+ */
283
+
284
+ /**
285
+ * Service for tenant operations with typed DTOs.
286
+ * This is the new proxy service that replaces the tenant-related
287
+ * methods in the legacy SaasService.
288
+ *
289
+ * @since 3.2.0
290
+ */
291
+ declare class TenantService {
292
+ private restService;
183
293
  /**
184
- * Create edition request
294
+ * API name for multi-API configurations
295
+ * @since 3.2.0
185
296
  */
186
- interface CreateEditionRequest {
187
- displayName: string;
188
- }
297
+ apiName: string;
298
+ constructor(restService: RestService);
189
299
  /**
190
- * Update edition request
300
+ * Create a new tenant
301
+ * @param input Tenant creation DTO
302
+ * @returns Promise with created tenant
191
303
  */
192
- interface UpdateEditionRequest {
193
- id?: string;
194
- displayName: string;
195
- concurrencyStamp?: string;
196
- }
304
+ create(input: SaasTenantCreateDto): Promise<SaasTenantDto>;
197
305
  /**
198
- * Default connection string request
306
+ * Delete a tenant by ID
307
+ * @param id Tenant ID
308
+ * @returns Promise that resolves when deletion is complete
199
309
  */
200
- interface DefaultConnectionStringRequest {
201
- id: string;
202
- defaultConnectionString: string;
203
- }
310
+ delete(id: string): Promise<void>;
204
311
  /**
205
- * Paginated response for tenants
312
+ * Delete the default connection string for a tenant
313
+ * @param id Tenant ID
314
+ * @returns Promise that resolves when deletion is complete
206
315
  */
207
- type TenantsResponse = ABP.PagedResponse<Tenant>;
316
+ deleteDefaultConnectionString(id: string): Promise<void>;
208
317
  /**
209
- * Paginated response for editions
318
+ * Get a tenant by ID
319
+ * @param id Tenant ID
320
+ * @returns Promise with tenant data
210
321
  */
211
- type EditionsResponse = ABP.PagedResponse<Edition>;
322
+ get(id: string): Promise<SaasTenantDto>;
212
323
  /**
213
- * Usage statistics response
324
+ * Get the default connection string for a tenant
325
+ * @param id Tenant ID
326
+ * @returns Promise with connection string
214
327
  */
215
- interface UsageStatisticsResponse {
216
- data: Record<string, number>;
217
- }
328
+ getDefaultConnectionString(id: string): Promise<string>;
329
+ /**
330
+ * Get paginated list of tenants
331
+ * @param input Query parameters for filtering and pagination
332
+ * @returns Promise with paginated tenants response
333
+ */
334
+ getList(input?: GetTenantsInput): Promise<PagedResultDto<SaasTenantDto>>;
335
+ /**
336
+ * Update an existing tenant
337
+ * @param id Tenant ID
338
+ * @param input Tenant update DTO
339
+ * @returns Promise with updated tenant
340
+ */
341
+ update(id: string, input: SaasTenantUpdateDto): Promise<SaasTenantDto>;
342
+ /**
343
+ * Update the default connection string for a tenant
344
+ * @param id Tenant ID
345
+ * @param defaultConnectionString The connection string
346
+ * @returns Promise that resolves when update is complete
347
+ */
348
+ updateDefaultConnectionString(id: string, defaultConnectionString: string): Promise<void>;
218
349
  }
219
350
 
351
+ /**
352
+ * SaaS Component Identifiers
353
+ * Used for component registration and routing
354
+ *
355
+ * @since 2.4.0
356
+ * @updated 2.7.0 - Changed from enum to const object
357
+ */
358
+ declare const eSaasComponents: {
359
+ readonly Editions: "Saas.EditionsComponent";
360
+ readonly Tenants: "Saas.TenantsComponent";
361
+ };
362
+ /**
363
+ * Type for SaaS component key values
364
+ */
365
+ type SaasComponentKey = (typeof eSaasComponents)[keyof typeof eSaasComponents];
366
+
220
367
  /**
221
368
  * SaaS Extension Tokens
222
- * Translated from @volo/abp.ng.saas v3.0.0
369
+ * Translated from @volo/abp.ng.saas v3.2.0
223
370
  *
224
371
  * Default entity actions, toolbar actions, entity props, and form props
225
372
  * for the SaaS module extensibility system.
226
373
  *
227
374
  * @since 3.0.0
375
+ * @updated 3.2.0 - Now uses proxy DTOs (EditionDto, SaasTenantDto) instead of Saas.Edition/Saas.Tenant
228
376
  */
229
377
 
230
378
  /**
@@ -285,92 +433,102 @@ interface FormProp<T = unknown> {
285
433
  /**
286
434
  * Default entity actions for Editions component
287
435
  * @since 3.0.0
436
+ * @updated 3.2.0 - Now uses EditionDto instead of Saas.Edition
288
437
  */
289
- declare const DEFAULT_EDITIONS_ENTITY_ACTIONS: EntityAction<Saas.Edition>[];
438
+ declare const DEFAULT_EDITIONS_ENTITY_ACTIONS: EntityAction<EditionDto>[];
290
439
  /**
291
440
  * Default entity actions for Tenants component
292
441
  * @since 3.0.0
442
+ * @updated 3.2.0 - Now uses SaasTenantDto instead of Saas.Tenant
293
443
  */
294
- declare const DEFAULT_TENANTS_ENTITY_ACTIONS: EntityAction<Saas.Tenant>[];
444
+ declare const DEFAULT_TENANTS_ENTITY_ACTIONS: EntityAction<SaasTenantDto>[];
295
445
  /**
296
446
  * Default entity actions aggregated by component
297
447
  * @since 3.0.0
298
448
  */
299
449
  declare const DEFAULT_SAAS_ENTITY_ACTIONS: {
300
- readonly "Saas.EditionsComponent": EntityAction<Saas.Edition>[];
301
- readonly "Saas.TenantsComponent": EntityAction<Saas.Tenant>[];
450
+ readonly "Saas.EditionsComponent": EntityAction<EditionDto>[];
451
+ readonly "Saas.TenantsComponent": EntityAction<SaasTenantDto>[];
302
452
  };
303
453
  /**
304
454
  * Default toolbar actions for Editions component
305
455
  * @since 3.0.0
456
+ * @updated 3.2.0 - Now uses EditionDto instead of Saas.Edition
306
457
  */
307
- declare const DEFAULT_EDITIONS_TOOLBAR_ACTIONS: ToolbarAction<Saas.Edition[]>[];
458
+ declare const DEFAULT_EDITIONS_TOOLBAR_ACTIONS: ToolbarAction<EditionDto[]>[];
308
459
  /**
309
460
  * Default toolbar actions for Tenants component
310
461
  * @since 3.0.0
462
+ * @updated 3.2.0 - Now uses SaasTenantDto instead of Saas.Tenant
311
463
  */
312
- declare const DEFAULT_TENANTS_TOOLBAR_ACTIONS: ToolbarAction<Saas.Tenant[]>[];
464
+ declare const DEFAULT_TENANTS_TOOLBAR_ACTIONS: ToolbarAction<SaasTenantDto[]>[];
313
465
  /**
314
466
  * Default toolbar actions aggregated by component
315
467
  * @since 3.0.0
316
468
  */
317
469
  declare const DEFAULT_SAAS_TOOLBAR_ACTIONS: {
318
- readonly "Saas.EditionsComponent": ToolbarAction<Saas.Edition[]>[];
319
- readonly "Saas.TenantsComponent": ToolbarAction<Saas.Tenant[]>[];
470
+ readonly "Saas.EditionsComponent": ToolbarAction<EditionDto[]>[];
471
+ readonly "Saas.TenantsComponent": ToolbarAction<SaasTenantDto[]>[];
320
472
  };
321
473
  /**
322
474
  * Default entity props for Editions component
323
475
  * @since 3.0.0
476
+ * @updated 3.2.0 - Now uses EditionDto instead of Saas.Edition
324
477
  */
325
- declare const DEFAULT_EDITIONS_ENTITY_PROPS: EntityProp<Saas.Edition>[];
478
+ declare const DEFAULT_EDITIONS_ENTITY_PROPS: EntityProp<EditionDto>[];
326
479
  /**
327
480
  * Default entity props for Tenants component
328
481
  * @since 3.0.0
482
+ * @updated 3.2.0 - Now uses SaasTenantDto instead of Saas.Tenant
329
483
  */
330
- declare const DEFAULT_TENANTS_ENTITY_PROPS: EntityProp<Saas.Tenant>[];
484
+ declare const DEFAULT_TENANTS_ENTITY_PROPS: EntityProp<SaasTenantDto>[];
331
485
  /**
332
486
  * Default entity props aggregated by component
333
487
  * @since 3.0.0
334
488
  */
335
489
  declare const DEFAULT_SAAS_ENTITY_PROPS: {
336
- readonly "Saas.EditionsComponent": EntityProp<Saas.Edition>[];
337
- readonly "Saas.TenantsComponent": EntityProp<Saas.Tenant>[];
490
+ readonly "Saas.EditionsComponent": EntityProp<EditionDto>[];
491
+ readonly "Saas.TenantsComponent": EntityProp<SaasTenantDto>[];
338
492
  };
339
493
  /**
340
494
  * Default create form props for Editions component
341
495
  * @since 3.0.0
496
+ * @updated 3.2.0 - Now uses EditionDto instead of Saas.Edition
342
497
  */
343
- declare const DEFAULT_EDITIONS_CREATE_FORM_PROPS: FormProp<Saas.Edition>[];
498
+ declare const DEFAULT_EDITIONS_CREATE_FORM_PROPS: FormProp<EditionDto>[];
344
499
  /**
345
500
  * Default create form props for Tenants component
346
501
  * @since 3.0.0
502
+ * @updated 3.2.0 - Now uses SaasTenantDto instead of Saas.Tenant
347
503
  */
348
- declare const DEFAULT_TENANTS_CREATE_FORM_PROPS: FormProp<Saas.Tenant>[];
504
+ declare const DEFAULT_TENANTS_CREATE_FORM_PROPS: FormProp<SaasTenantDto>[];
349
505
  /**
350
506
  * Default create form props aggregated by component
351
507
  * @since 3.0.0
352
508
  */
353
509
  declare const DEFAULT_SAAS_CREATE_FORM_PROPS: {
354
- readonly "Saas.EditionsComponent": FormProp<Saas.Edition>[];
355
- readonly "Saas.TenantsComponent": FormProp<Saas.Tenant>[];
510
+ readonly "Saas.EditionsComponent": FormProp<EditionDto>[];
511
+ readonly "Saas.TenantsComponent": FormProp<SaasTenantDto>[];
356
512
  };
357
513
  /**
358
514
  * Default edit form props for Editions component
359
515
  * @since 3.0.0
516
+ * @updated 3.2.0 - Now uses EditionDto instead of Saas.Edition
360
517
  */
361
- declare const DEFAULT_EDITIONS_EDIT_FORM_PROPS: FormProp<Saas.Edition>[];
518
+ declare const DEFAULT_EDITIONS_EDIT_FORM_PROPS: FormProp<EditionDto>[];
362
519
  /**
363
520
  * Default edit form props for Tenants component
364
521
  * @since 3.0.0
522
+ * @updated 3.2.0 - Now uses SaasTenantDto instead of Saas.Tenant
365
523
  */
366
- declare const DEFAULT_TENANTS_EDIT_FORM_PROPS: FormProp<Saas.Tenant>[];
524
+ declare const DEFAULT_TENANTS_EDIT_FORM_PROPS: FormProp<SaasTenantDto>[];
367
525
  /**
368
526
  * Default edit form props aggregated by component
369
527
  * @since 3.0.0
370
528
  */
371
529
  declare const DEFAULT_SAAS_EDIT_FORM_PROPS: {
372
- readonly "Saas.EditionsComponent": FormProp<Saas.Edition>[];
373
- readonly "Saas.TenantsComponent": FormProp<Saas.Tenant>[];
530
+ readonly "Saas.EditionsComponent": FormProp<EditionDto>[];
531
+ readonly "Saas.TenantsComponent": FormProp<SaasTenantDto>[];
374
532
  };
375
533
  /**
376
534
  * Entity action contributor callback type
@@ -430,57 +588,63 @@ declare const SAAS_EDIT_FORM_PROP_CONTRIBUTORS: unique symbol;
430
588
 
431
589
  /**
432
590
  * SaaS Config Options
433
- * Translated from @volo/abp.ng.saas v3.0.0
591
+ * Translated from @volo/abp.ng.saas v4.0.0
434
592
  *
435
593
  * Configuration options for SaaS module extensibility.
436
594
  *
437
595
  * @since 3.0.0
596
+ * @updated 4.0.0 - Now uses proxy DTOs (EditionDto, SaasTenantDto) instead of Saas.Edition/Saas.Tenant
438
597
  */
439
598
 
440
599
  /**
441
600
  * SaaS entity action contributors type
442
601
  * Maps component keys to their entity action contributor callbacks
443
602
  * @since 3.0.0
603
+ * @updated 4.0.0 - Now uses EditionDto/SaasTenantDto
444
604
  */
445
605
  type SaasEntityActionContributors = Partial<{
446
- [eSaasComponents.Editions]: EntityActionContributorCallback<Saas.Edition>[];
447
- [eSaasComponents.Tenants]: EntityActionContributorCallback<Saas.Tenant>[];
606
+ [eSaasComponents.Editions]: EntityActionContributorCallback<EditionDto>[];
607
+ [eSaasComponents.Tenants]: EntityActionContributorCallback<SaasTenantDto>[];
448
608
  }>;
449
609
  /**
450
610
  * SaaS toolbar action contributors type
451
611
  * Maps component keys to their toolbar action contributor callbacks
452
612
  * @since 3.0.0
613
+ * @updated 4.0.0 - Now uses EditionDto/SaasTenantDto
453
614
  */
454
615
  type SaasToolbarActionContributors = Partial<{
455
- [eSaasComponents.Editions]: ToolbarActionContributorCallback<Saas.Edition[]>[];
456
- [eSaasComponents.Tenants]: ToolbarActionContributorCallback<Saas.Tenant[]>[];
616
+ [eSaasComponents.Editions]: ToolbarActionContributorCallback<EditionDto[]>[];
617
+ [eSaasComponents.Tenants]: ToolbarActionContributorCallback<SaasTenantDto[]>[];
457
618
  }>;
458
619
  /**
459
620
  * SaaS entity prop contributors type
460
621
  * Maps component keys to their entity prop contributor callbacks
461
622
  * @since 3.0.0
623
+ * @updated 4.0.0 - Now uses EditionDto/SaasTenantDto
462
624
  */
463
625
  type SaasEntityPropContributors = Partial<{
464
- [eSaasComponents.Editions]: EntityPropContributorCallback<Saas.Edition>[];
465
- [eSaasComponents.Tenants]: EntityPropContributorCallback<Saas.Tenant>[];
626
+ [eSaasComponents.Editions]: EntityPropContributorCallback<EditionDto>[];
627
+ [eSaasComponents.Tenants]: EntityPropContributorCallback<SaasTenantDto>[];
466
628
  }>;
467
629
  /**
468
630
  * SaaS create form prop contributors type
469
631
  * Maps component keys to their create form prop contributor callbacks
470
632
  * @since 3.0.0
633
+ * @updated 4.0.0 - Now uses EditionDto/SaasTenantDto
471
634
  */
472
635
  type SaasCreateFormPropContributors = Partial<{
473
- [eSaasComponents.Editions]: CreateFormPropContributorCallback<Saas.Edition>[];
474
- [eSaasComponents.Tenants]: CreateFormPropContributorCallback<Saas.Tenant>[];
636
+ [eSaasComponents.Editions]: CreateFormPropContributorCallback<EditionDto>[];
637
+ [eSaasComponents.Tenants]: CreateFormPropContributorCallback<SaasTenantDto>[];
475
638
  }>;
476
639
  /**
477
640
  * SaaS edit form prop contributors type
478
641
  * Maps component keys to their edit form prop contributor callbacks
479
642
  * @since 3.0.0
643
+ * @updated 4.0.0 - Now uses EditionDto/SaasTenantDto
480
644
  */
481
645
  type SaasEditFormPropContributors = Partial<{
482
- [eSaasComponents.Editions]: EditFormPropContributorCallback<Saas.Edition>[];
483
- [eSaasComponents.Tenants]: EditFormPropContributorCallback<Saas.Tenant>[];
646
+ [eSaasComponents.Editions]: EditFormPropContributorCallback<EditionDto>[];
647
+ [eSaasComponents.Tenants]: EditFormPropContributorCallback<SaasTenantDto>[];
484
648
  }>;
485
649
  /**
486
650
  * SaaS module configuration options
@@ -526,6 +690,152 @@ interface SaasConfigOptions {
526
690
  editFormPropContributors?: SaasEditFormPropContributors;
527
691
  }
528
692
 
693
+ /**
694
+ * SaaS Models
695
+ * Translated from @volo/abp.ng.saas v4.0.0
696
+ *
697
+ * @updated 2.4.0 - Updated CreateTenantRequest and UpdateTenantRequest types
698
+ * @updated 3.2.0 - Added deprecation notices for legacy types, state now uses proxy DTOs
699
+ * @updated 4.0.0 - Deprecated types kept for backward compatibility (to be deleted in v5.0)
700
+ */
701
+
702
+ /**
703
+ * Saas namespace containing all models for SaaS management
704
+ *
705
+ * @deprecated The types in this namespace are deprecated in favor of the proxy DTOs.
706
+ * Use the following instead:
707
+ * - `SaasTenantDto` instead of `Saas.Tenant`
708
+ * - `EditionDto` instead of `Saas.Edition`
709
+ * - `SaasTenantCreateDto` instead of `Saas.CreateTenantRequest`
710
+ * - `SaasTenantUpdateDto` instead of `Saas.UpdateTenantRequest`
711
+ * - `EditionCreateDto` instead of `Saas.CreateEditionRequest`
712
+ * - `EditionUpdateDto` instead of `Saas.UpdateEditionRequest`
713
+ *
714
+ * These legacy types will be removed in v5.0.
715
+ */
716
+ declare namespace Saas {
717
+ /**
718
+ * State interface for SaaS
719
+ * @updated 3.2.0 - Now uses proxy DTOs (PagedResultDto<SaasTenantDto>, PagedResultDto<EditionDto>)
720
+ */
721
+ interface State {
722
+ tenants: PagedResultDto<SaasTenantDto>;
723
+ editions: PagedResultDto<EditionDto>;
724
+ usageStatistics: Record<string, number>;
725
+ latestTenants: SaasTenantDto[];
726
+ }
727
+ /**
728
+ * Tenant response type alias
729
+ * @deprecated Use PagedResultDto<SaasTenantDto> instead. To be deleted in v5.0.
730
+ */
731
+ type TenantResponse = PagedResultDto<Tenant>;
732
+ /**
733
+ * Edition response type alias
734
+ * @deprecated Use PagedResultDto<EditionDto> instead. To be deleted in v5.0.
735
+ */
736
+ type EditionResponse = PagedResultDto<Edition>;
737
+ /**
738
+ * Tenant interface
739
+ * @deprecated Use SaasTenantDto from proxy/host/dtos instead. To be deleted in v5.0.
740
+ */
741
+ interface Tenant {
742
+ id: string;
743
+ name: string;
744
+ editionId?: string;
745
+ editionName?: string;
746
+ concurrencyStamp?: string;
747
+ }
748
+ /**
749
+ * Edition interface
750
+ * @deprecated Use EditionDto from proxy/host/dtos instead. To be deleted in v5.0.
751
+ */
752
+ interface Edition {
753
+ id: string;
754
+ displayName: string;
755
+ concurrencyStamp?: string;
756
+ }
757
+ /**
758
+ * Query parameters for fetching tenants
759
+ * @deprecated Use GetTenantsInput from proxy/host/dtos instead. To be deleted in v5.0.
760
+ */
761
+ interface TenantsQueryParams {
762
+ filter?: string;
763
+ editionId?: string;
764
+ getEditionNames?: boolean;
765
+ skipCount?: number;
766
+ maxResultCount?: number;
767
+ sorting?: string;
768
+ }
769
+ /**
770
+ * Query parameters for fetching editions
771
+ * @deprecated Use GetEditionsInput from proxy/host/dtos instead. To be deleted in v5.0.
772
+ */
773
+ interface EditionsQueryParams {
774
+ filter?: string;
775
+ skipCount?: number;
776
+ maxResultCount?: number;
777
+ sorting?: string;
778
+ }
779
+ /**
780
+ * Create tenant request
781
+ * @deprecated Use SaasTenantCreateDto from proxy/host/dtos instead. To be deleted in v5.0.
782
+ * @updated 2.4.0 - adminEmailAddress and adminPassword are now required
783
+ */
784
+ interface CreateTenantRequest {
785
+ adminEmailAddress: string;
786
+ adminPassword: string;
787
+ name: string;
788
+ editionId?: string;
789
+ }
790
+ /**
791
+ * Update tenant request
792
+ * @deprecated Use SaasTenantUpdateDto from proxy/host/dtos instead. To be deleted in v5.0.
793
+ * @updated 2.4.0 - Now uses Omit<Tenant, 'editionName'> pattern
794
+ */
795
+ type UpdateTenantRequest = Omit<Tenant, 'editionName'>;
796
+ /**
797
+ * Create edition request
798
+ * @deprecated Use EditionCreateDto from proxy/host/dtos instead. To be deleted in v5.0.
799
+ */
800
+ interface CreateEditionRequest {
801
+ displayName: string;
802
+ }
803
+ /**
804
+ * Update edition request
805
+ * @deprecated Use EditionUpdateDto from proxy/host/dtos instead. To be deleted in v5.0.
806
+ */
807
+ interface UpdateEditionRequest {
808
+ id?: string;
809
+ displayName: string;
810
+ concurrencyStamp?: string;
811
+ }
812
+ /**
813
+ * Default connection string request
814
+ * @deprecated Use TenantService.updateDefaultConnectionString(id, connectionString) instead. To be deleted in v5.0.
815
+ */
816
+ interface DefaultConnectionStringRequest {
817
+ id: string;
818
+ defaultConnectionString: string;
819
+ }
820
+ /**
821
+ * Paginated response for tenants
822
+ * @deprecated Use PagedResultDto<SaasTenantDto> instead. To be deleted in v5.0.
823
+ */
824
+ type TenantsResponse = PagedResultDto<Tenant>;
825
+ /**
826
+ * Paginated response for editions
827
+ * @deprecated Use PagedResultDto<EditionDto> instead. To be deleted in v5.0.
828
+ */
829
+ type EditionsResponse = PagedResultDto<Edition>;
830
+ /**
831
+ * Usage statistics response
832
+ * @deprecated Use GetEditionUsageStatisticsResult from proxy/host/models instead. To be deleted in v5.0.
833
+ */
834
+ interface UsageStatisticsResponse {
835
+ data: Record<string, number>;
836
+ }
837
+ }
838
+
529
839
  /**
530
840
  * SaaS Routes
531
841
  * Translated from @volo/abp.ng.saas v0.7.2
@@ -612,6 +922,9 @@ declare class SaasExtensionsGuard {
612
922
  *
613
923
  * Provides REST API methods for managing tenants, editions,
614
924
  * and connection strings in a multi-tenant SaaS application.
925
+ *
926
+ * @deprecated To be deleted in v5.0. Use proxy services (TenantService, EditionService) instead.
927
+ * This service was deleted in the Angular source at v4.0.0.
615
928
  */
616
929
 
617
930
  /**
@@ -620,6 +933,7 @@ declare class SaasExtensionsGuard {
620
933
  *
621
934
  * @since 2.0.0
622
935
  * @updated 2.4.0 - Added apiName property
936
+ * @deprecated To be deleted in v5.0. Use proxy services (TenantService, EditionService) instead.
623
937
  */
624
938
  declare class SaasService {
625
939
  private restService;
@@ -722,10 +1036,12 @@ declare class SaasService {
722
1036
 
723
1037
  /**
724
1038
  * SaaS State Service
725
- * Translated from @volo/abp.ng.saas v2.0.0
1039
+ * Translated from @volo/abp.ng.saas v3.2.0
726
1040
  *
727
1041
  * Provides a stateful facade over SaaS operations,
728
1042
  * maintaining internal state that mirrors the Angular NGXS store pattern.
1043
+ *
1044
+ * @updated 3.2.0 - Now uses EditionService and TenantService proxy services internally
729
1045
  */
730
1046
 
731
1047
  /**
@@ -734,6 +1050,7 @@ declare class SaasService {
734
1050
  * mirroring the Angular NGXS store pattern.
735
1051
  *
736
1052
  * @since 2.0.0
1053
+ * @updated 3.2.0 - Now uses EditionService and TenantService proxy services internally
737
1054
  *
738
1055
  * @example
739
1056
  * ```tsx
@@ -748,32 +1065,39 @@ declare class SaasService {
748
1065
  * ```
749
1066
  */
750
1067
  declare class SaasStateService {
751
- private service;
1068
+ private tenantService;
1069
+ private editionService;
752
1070
  private state;
753
1071
  constructor(rest: RestService);
754
1072
  /**
755
1073
  * Get the current list of tenants from state
1074
+ * @returns Array of tenants
756
1075
  */
757
- getTenants(): Saas.Tenant[];
1076
+ getTenants(): SaasTenantDto[];
758
1077
  /**
759
1078
  * Get the latest tenants from state (for dashboard widget)
760
1079
  * @since 2.0.0
1080
+ * @returns Array of latest tenants
761
1081
  */
762
- getLatestTenants(): Saas.Tenant[];
1082
+ getLatestTenants(): SaasTenantDto[];
763
1083
  /**
764
1084
  * Get the total count of tenants from state
1085
+ * @returns Total count
765
1086
  */
766
1087
  getTenantsTotalCount(): number;
767
1088
  /**
768
1089
  * Get the current list of editions from state
1090
+ * @returns Array of editions
769
1091
  */
770
- getEditions(): Saas.Edition[];
1092
+ getEditions(): EditionDto[];
771
1093
  /**
772
1094
  * Get the total count of editions from state
1095
+ * @returns Total count
773
1096
  */
774
1097
  getEditionsTotalCount(): number;
775
1098
  /**
776
1099
  * Get the usage statistics from state
1100
+ * @returns Usage statistics data
777
1101
  */
778
1102
  getUsageStatistics(): Record<string, number>;
779
1103
  /**
@@ -781,25 +1105,27 @@ declare class SaasStateService {
781
1105
  * @param params - Optional query parameters for pagination and filtering
782
1106
  * @returns Promise with the tenants response
783
1107
  */
784
- dispatchGetTenants(params?: Saas.TenantsQueryParams): Promise<Saas.TenantsResponse>;
1108
+ dispatchGetTenants(params?: GetTenantsInput): Promise<PagedResultDto<SaasTenantDto>>;
785
1109
  /**
786
1110
  * Dispatch action to fetch a tenant by ID
787
1111
  * @param id - The tenant ID
788
1112
  * @returns Promise with the tenant
789
1113
  */
790
- dispatchGetTenantById(id: string): Promise<Saas.Tenant>;
1114
+ dispatchGetTenantById(id: string): Promise<SaasTenantDto>;
791
1115
  /**
792
1116
  * Dispatch action to create a new tenant
793
1117
  * @param body - The tenant creation request
794
1118
  * @returns Promise with the created tenant
795
1119
  */
796
- dispatchCreateTenant(body: Saas.CreateTenantRequest): Promise<Saas.Tenant>;
1120
+ dispatchCreateTenant(body: SaasTenantCreateDto): Promise<SaasTenantDto>;
797
1121
  /**
798
1122
  * Dispatch action to update a tenant
799
- * @param body - The tenant update request
1123
+ * @param payload - Object containing id and update data
800
1124
  * @returns Promise with the updated tenant
801
1125
  */
802
- dispatchUpdateTenant(body: Saas.UpdateTenantRequest): Promise<Saas.Tenant>;
1126
+ dispatchUpdateTenant(payload: SaasTenantUpdateDto & {
1127
+ id: string;
1128
+ }): Promise<SaasTenantDto>;
803
1129
  /**
804
1130
  * Dispatch action to delete a tenant
805
1131
  * @param id - The tenant ID to delete
@@ -811,31 +1137,33 @@ declare class SaasStateService {
811
1137
  * @returns Promise with the latest tenants
812
1138
  * @since 2.0.0
813
1139
  */
814
- dispatchGetLatestTenants(): Promise<Saas.Tenant[]>;
1140
+ dispatchGetLatestTenants(): Promise<PagedResultDto<SaasTenantDto>>;
815
1141
  /**
816
1142
  * Dispatch action to fetch editions with optional pagination
817
1143
  * @param params - Optional query parameters for pagination and filtering
818
1144
  * @returns Promise with the editions response
819
1145
  */
820
- dispatchGetEditions(params?: Saas.EditionsQueryParams): Promise<Saas.EditionsResponse>;
1146
+ dispatchGetEditions(params?: GetEditionsInput): Promise<PagedResultDto<EditionDto>>;
821
1147
  /**
822
1148
  * Dispatch action to fetch an edition by ID
823
1149
  * @param id - The edition ID
824
1150
  * @returns Promise with the edition
825
1151
  */
826
- dispatchGetEditionById(id: string): Promise<Saas.Edition>;
1152
+ dispatchGetEditionById(id: string): Promise<EditionDto>;
827
1153
  /**
828
1154
  * Dispatch action to create a new edition
829
1155
  * @param body - The edition creation request
830
1156
  * @returns Promise with the created edition
831
1157
  */
832
- dispatchCreateEdition(body: Saas.CreateEditionRequest): Promise<Saas.Edition>;
1158
+ dispatchCreateEdition(body: EditionCreateDto): Promise<EditionDto>;
833
1159
  /**
834
1160
  * Dispatch action to update an edition
835
- * @param body - The edition update request
1161
+ * @param payload - Object containing id and update data
836
1162
  * @returns Promise with the updated edition
837
1163
  */
838
- dispatchUpdateEdition(body: Saas.UpdateEditionRequest): Promise<Saas.Edition>;
1164
+ dispatchUpdateEdition(payload: EditionUpdateDto & {
1165
+ id: string;
1166
+ }): Promise<EditionDto>;
839
1167
  /**
840
1168
  * Dispatch action to delete an edition
841
1169
  * @param id - The edition ID to delete
@@ -846,7 +1174,7 @@ declare class SaasStateService {
846
1174
  * Dispatch action to fetch usage statistics
847
1175
  * @returns Promise with the usage statistics response
848
1176
  */
849
- dispatchGetUsageStatistics(): Promise<Saas.UsageStatisticsResponse>;
1177
+ dispatchGetUsageStatistics(): Promise<GetEditionUsageStatisticsResult>;
850
1178
  }
851
1179
 
852
1180
  /**
@@ -1112,4 +1440,4 @@ interface EditionsComponentProps {
1112
1440
  */
1113
1441
  declare function EditionsComponent({ onEditionCreated, onEditionUpdated, onEditionDeleted, onManageFeatures, }: EditionsComponentProps): react_jsx_runtime.JSX.Element;
1114
1442
 
1115
- export { type CreateFormPropContributorCallback, DEFAULT_EDITIONS_CREATE_FORM_PROPS, DEFAULT_EDITIONS_EDIT_FORM_PROPS, DEFAULT_EDITIONS_ENTITY_ACTIONS, DEFAULT_EDITIONS_ENTITY_PROPS, DEFAULT_EDITIONS_TOOLBAR_ACTIONS, DEFAULT_SAAS_CREATE_FORM_PROPS, DEFAULT_SAAS_EDIT_FORM_PROPS, DEFAULT_SAAS_ENTITY_ACTIONS, DEFAULT_SAAS_ENTITY_PROPS, DEFAULT_SAAS_TOOLBAR_ACTIONS, DEFAULT_TENANTS_CREATE_FORM_PROPS, DEFAULT_TENANTS_EDIT_FORM_PROPS, DEFAULT_TENANTS_ENTITY_ACTIONS, DEFAULT_TENANTS_ENTITY_PROPS, DEFAULT_TENANTS_TOOLBAR_ACTIONS, type EditFormPropContributorCallback, type EditionOperationResult, EditionsComponent, type EditionsComponentProps, type EntityAction, type EntityActionContributorCallback, type EntityProp, type EntityPropContributorCallback, type FormProp, SAAS_CREATE_FORM_PROP_CONTRIBUTORS, SAAS_EDIT_FORM_PROP_CONTRIBUTORS, SAAS_ENTITY_ACTION_CONTRIBUTORS, SAAS_ENTITY_PROP_CONTRIBUTORS, SAAS_ROUTES, SAAS_ROUTE_CONFIG, SAAS_ROUTE_PROVIDERS, SAAS_TOOLBAR_ACTION_CONTRIBUTORS, Saas, type SaasComponentKey, type SaasConfigOptions, type SaasCreateFormPropContributors, type SaasEditFormPropContributors, type SaasEntityActionContributors, type SaasEntityPropContributors, SaasExtensionsGuard, type SaasPolicyNameKey, type SaasRouteNameKey, SaasService, SaasStateService, type SaasToolbarActionContributors, type SortOrder$1 as SortOrder, type TenantOperationResult, TenantsComponent, type TenantsComponentProps, type ToolbarAction, type ToolbarActionContributorCallback, type UseEditionsReturn, type UseTenantsReturn, configureRoutes, eSaasComponents, eSaasPolicyNames, eSaasRouteNames, initializeSaasRoutes, saasExtensionsGuard, useEditions, useSaasExtensionsGuard, useTenants };
1443
+ export { type CreateFormPropContributorCallback, DEFAULT_EDITIONS_CREATE_FORM_PROPS, DEFAULT_EDITIONS_EDIT_FORM_PROPS, DEFAULT_EDITIONS_ENTITY_ACTIONS, DEFAULT_EDITIONS_ENTITY_PROPS, DEFAULT_EDITIONS_TOOLBAR_ACTIONS, DEFAULT_SAAS_CREATE_FORM_PROPS, DEFAULT_SAAS_EDIT_FORM_PROPS, DEFAULT_SAAS_ENTITY_ACTIONS, DEFAULT_SAAS_ENTITY_PROPS, DEFAULT_SAAS_TOOLBAR_ACTIONS, DEFAULT_TENANTS_CREATE_FORM_PROPS, DEFAULT_TENANTS_EDIT_FORM_PROPS, DEFAULT_TENANTS_ENTITY_ACTIONS, DEFAULT_TENANTS_ENTITY_PROPS, DEFAULT_TENANTS_TOOLBAR_ACTIONS, type EditFormPropContributorCallback, type EditionCreateDto, type EditionCreateOrUpdateDtoBase, type EditionDto, type EditionOperationResult, EditionService, type EditionUpdateDto, EditionsComponent, type EditionsComponentProps, type EntityAction, type EntityActionContributorCallback, type EntityProp, type EntityPropContributorCallback, type FormProp, type GetEditionUsageStatisticsResult, type GetEditionsInput, type GetTenantsInput, SAAS_CREATE_FORM_PROP_CONTRIBUTORS, SAAS_EDIT_FORM_PROP_CONTRIBUTORS, SAAS_ENTITY_ACTION_CONTRIBUTORS, SAAS_ENTITY_PROP_CONTRIBUTORS, SAAS_ROUTES, SAAS_ROUTE_CONFIG, SAAS_ROUTE_PROVIDERS, SAAS_TOOLBAR_ACTION_CONTRIBUTORS, Saas, type SaasComponentKey, type SaasConfigOptions, type SaasCreateFormPropContributors, type SaasEditFormPropContributors, type SaasEntityActionContributors, type SaasEntityPropContributors, SaasExtensionsGuard, type SaasPolicyNameKey, type SaasRouteNameKey, SaasService, SaasStateService, type SaasTenantCreateDto, type SaasTenantCreateOrUpdateDtoBase, type SaasTenantDto, type SaasTenantUpdateDto, type SaasToolbarActionContributors, type SortOrder$1 as SortOrder, type TenantOperationResult, TenantService, TenantsComponent, type TenantsComponentProps, type ToolbarAction, type ToolbarActionContributorCallback, type UseEditionsReturn, type UseTenantsReturn, configureRoutes, eSaasComponents, eSaasPolicyNames, eSaasRouteNames, initializeSaasRoutes, saasExtensionsGuard, useEditions, useSaasExtensionsGuard, useTenants };