@abpjs/language-management 3.0.0 → 3.2.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 { RoutesService, ABP, RestService } from '@abpjs/core';
1
+ import { RoutesService, ABP, RestService, ListResultDto, PagedResultDto } from '@abpjs/core';
2
2
  import React from 'react';
3
3
 
4
4
  /**
@@ -72,6 +72,296 @@ declare const LANGUAGE_MANAGEMENT_ROUTE_PROVIDERS: {
72
72
  configureRoutes: typeof configureRoutes;
73
73
  };
74
74
 
75
+ /**
76
+ * Language Management Proxy DTO Models
77
+ * Translated from @volo/abp.ng.language-management v3.2.0
78
+ *
79
+ * These are the new typed DTOs for the language management module.
80
+ * The legacy types in the LanguageManagement namespace are deprecated.
81
+ *
82
+ * @since 3.2.0
83
+ */
84
+
85
+ /**
86
+ * DTO for creating a new language.
87
+ */
88
+ interface CreateLanguageDto {
89
+ /** Display name for the language */
90
+ displayName: string;
91
+ /** Culture name (e.g., "en-US") */
92
+ cultureName: string;
93
+ /** UI culture name (e.g., "en-US") */
94
+ uiCultureName: string;
95
+ /** Flag icon identifier */
96
+ flagIcon: string;
97
+ /** Whether the language is enabled */
98
+ isEnabled: boolean;
99
+ /** Extra properties dictionary (optional) */
100
+ extraProperties?: ABP.Dictionary<unknown>;
101
+ }
102
+ /**
103
+ * DTO for culture information.
104
+ */
105
+ interface CultureInfoDto {
106
+ /** Display name of the culture */
107
+ displayName: string;
108
+ /** Culture name/identifier */
109
+ name: string;
110
+ }
111
+ /**
112
+ * Input parameters for querying language texts.
113
+ */
114
+ interface GetLanguagesTextsInput {
115
+ /** Filter string for searching */
116
+ filter?: string;
117
+ /** Resource name to filter by */
118
+ resourceName?: string;
119
+ /** Base culture name for comparison */
120
+ baseCultureName?: string;
121
+ /** Target culture name to translate to */
122
+ targetCultureName?: string;
123
+ /** Whether to get only empty/missing values */
124
+ getOnlyEmptyValues?: boolean;
125
+ /** Number of items to skip */
126
+ skipCount?: number;
127
+ /** Maximum number of items to return */
128
+ maxResultCount?: number;
129
+ /** Sorting string */
130
+ sorting?: string;
131
+ }
132
+ /**
133
+ * DTO for a language entity.
134
+ */
135
+ interface LanguageDto {
136
+ /** Language ID */
137
+ id: string;
138
+ /** Culture name (e.g., "en-US") */
139
+ cultureName: string;
140
+ /** UI culture name (e.g., "en-US") */
141
+ uiCultureName: string;
142
+ /** Display name for the language */
143
+ displayName: string;
144
+ /** Flag icon identifier */
145
+ flagIcon: string;
146
+ /** Whether the language is enabled */
147
+ isEnabled: boolean;
148
+ /** Whether this is the default language */
149
+ isDefaultLanguage: boolean;
150
+ /** Creation time */
151
+ creationTime?: string | Date;
152
+ /** Creator ID */
153
+ creatorId?: string;
154
+ /** Extra properties dictionary (optional) */
155
+ extraProperties?: ABP.Dictionary<unknown>;
156
+ }
157
+ /**
158
+ * DTO for a language resource.
159
+ */
160
+ interface LanguageResourceDto {
161
+ /** Resource name */
162
+ name: string;
163
+ }
164
+ /**
165
+ * DTO for a language text (localization string).
166
+ */
167
+ interface LanguageTextDto {
168
+ /** Resource name this text belongs to */
169
+ resourceName: string;
170
+ /** Culture name of this text */
171
+ cultureName: string;
172
+ /** Base culture name for comparison */
173
+ baseCultureName: string;
174
+ /** Value in the base culture */
175
+ baseValue: string;
176
+ /** Key/name of the text */
177
+ name: string;
178
+ /** Translated value */
179
+ value: string;
180
+ }
181
+ /**
182
+ * DTO for updating a language.
183
+ */
184
+ interface UpdateLanguageDto {
185
+ /** Display name for the language */
186
+ displayName: string;
187
+ /** Flag icon identifier */
188
+ flagIcon: string;
189
+ /** Whether the language is enabled */
190
+ isEnabled: boolean;
191
+ /** Extra properties dictionary (optional) */
192
+ extraProperties?: ABP.Dictionary<unknown>;
193
+ }
194
+
195
+ /**
196
+ * Language Service (Proxy)
197
+ * Translated from @volo/abp.ng.language-management v3.2.0
198
+ *
199
+ * New typed proxy service for language management operations.
200
+ * This service uses the new DTO types from proxy/dto/models.
201
+ *
202
+ * @since 3.2.0
203
+ */
204
+
205
+ /**
206
+ * Proxy service for language management operations.
207
+ * Provides strongly-typed methods for all language CRUD operations.
208
+ *
209
+ * @since 3.2.0
210
+ *
211
+ * @example
212
+ * ```tsx
213
+ * const languageService = new LanguageService(restService);
214
+ *
215
+ * // Get all languages
216
+ * const languages = await languageService.getAllList();
217
+ *
218
+ * // Create a new language
219
+ * const newLanguage = await languageService.create({
220
+ * displayName: 'French',
221
+ * cultureName: 'fr-FR',
222
+ * uiCultureName: 'fr-FR',
223
+ * flagIcon: 'fr',
224
+ * isEnabled: true,
225
+ * });
226
+ * ```
227
+ */
228
+ declare class LanguageService {
229
+ /**
230
+ * API name for multi-API configurations
231
+ */
232
+ apiName: string;
233
+ private restService;
234
+ constructor(restService: RestService);
235
+ /**
236
+ * Create a new language
237
+ * @param input - The language data to create
238
+ * @returns Promise with the created language
239
+ */
240
+ create(input: CreateLanguageDto): Promise<LanguageDto>;
241
+ /**
242
+ * Delete a language by ID
243
+ * @param id - The language ID to delete
244
+ * @returns Promise resolving when complete
245
+ */
246
+ delete(id: string): Promise<void>;
247
+ /**
248
+ * Get a language by ID
249
+ * @param id - The language ID
250
+ * @returns Promise with the language
251
+ */
252
+ get(id: string): Promise<LanguageDto>;
253
+ /**
254
+ * Get all languages without pagination
255
+ * @returns Promise with all languages
256
+ */
257
+ getAllList(): Promise<ListResultDto<LanguageDto>>;
258
+ /**
259
+ * Get available cultures for language selection
260
+ * @returns Promise with list of cultures
261
+ */
262
+ getCulturelist(): Promise<CultureInfoDto[]>;
263
+ /**
264
+ * Get languages with optional filtering
265
+ * @param input - Query parameters for filtering
266
+ * @returns Promise with list of languages
267
+ */
268
+ getList(input?: GetLanguagesTextsInput): Promise<ListResultDto<LanguageDto>>;
269
+ /**
270
+ * Get available localization resources
271
+ * @returns Promise with list of resources
272
+ */
273
+ getResources(): Promise<LanguageResourceDto[]>;
274
+ /**
275
+ * Set a language as the default language
276
+ * @param id - The language ID to set as default
277
+ * @returns Promise resolving when complete
278
+ */
279
+ setAsDefault(id: string): Promise<void>;
280
+ /**
281
+ * Update an existing language
282
+ * @param id - The language ID to update
283
+ * @param input - The updated language data
284
+ * @returns Promise with the updated language
285
+ */
286
+ update(id: string, input: UpdateLanguageDto): Promise<LanguageDto>;
287
+ }
288
+
289
+ /**
290
+ * Language Text Service (Proxy)
291
+ * Translated from @volo/abp.ng.language-management v3.2.0
292
+ *
293
+ * New typed proxy service for language text (localization) operations.
294
+ * This service uses the new DTO types from proxy/dto/models.
295
+ *
296
+ * @since 3.2.0
297
+ */
298
+
299
+ /**
300
+ * Proxy service for language text (localization) operations.
301
+ * Provides strongly-typed methods for querying and updating translations.
302
+ *
303
+ * @since 3.2.0
304
+ *
305
+ * @example
306
+ * ```tsx
307
+ * const languageTextService = new LanguageTextService(restService);
308
+ *
309
+ * // Get language texts
310
+ * const texts = await languageTextService.getList({
311
+ * filter: '',
312
+ * resourceName: 'AbpIdentity',
313
+ * baseCultureName: 'en',
314
+ * targetCultureName: 'fr',
315
+ * getOnlyEmptyValues: true,
316
+ * skipCount: 0,
317
+ * maxResultCount: 10,
318
+ * });
319
+ *
320
+ * // Update a translation
321
+ * await languageTextService.update('AbpIdentity', 'fr', 'UserName', 'Nom d\'utilisateur');
322
+ * ```
323
+ */
324
+ declare class LanguageTextService {
325
+ /**
326
+ * API name for multi-API configurations
327
+ */
328
+ apiName: string;
329
+ private restService;
330
+ constructor(restService: RestService);
331
+ /**
332
+ * Get a specific language text by resource, culture, and name
333
+ * @param resourceName - The resource name
334
+ * @param cultureName - The culture name
335
+ * @param name - The text key/name
336
+ * @param baseCultureName - The base culture for comparison
337
+ * @returns Promise with the language text
338
+ */
339
+ get(resourceName: string, cultureName: string, name: string, baseCultureName: string): Promise<LanguageTextDto>;
340
+ /**
341
+ * Get language texts with pagination and filtering
342
+ * @param input - Query parameters for filtering and pagination
343
+ * @returns Promise with paginated language texts
344
+ */
345
+ getList(input: GetLanguagesTextsInput): Promise<PagedResultDto<LanguageTextDto>>;
346
+ /**
347
+ * Restore a language text to its default value
348
+ * @param resourceName - The resource name
349
+ * @param cultureName - The culture name
350
+ * @param name - The text key/name
351
+ * @returns Promise resolving when complete
352
+ */
353
+ restoreToDefault(resourceName: string, cultureName: string, name: string): Promise<void>;
354
+ /**
355
+ * Update a language text value
356
+ * @param resourceName - The resource name
357
+ * @param cultureName - The culture name
358
+ * @param name - The text key/name
359
+ * @param value - The new translated value
360
+ * @returns Promise resolving when complete
361
+ */
362
+ update(resourceName: string, cultureName: string, name: string, value: string): Promise<void>;
363
+ }
364
+
75
365
  /**
76
366
  * Language Management Extensions Guard
77
367
  * Guard for loading language management extensions before route activation.
@@ -133,116 +423,11 @@ declare const eLanguageManagementComponents: {
133
423
  */
134
424
  type LanguageManagementComponentKey = (typeof eLanguageManagementComponents)[keyof typeof eLanguageManagementComponents];
135
425
 
136
- /**
137
- * Language Management Models
138
- * Translated from @volo/abp.ng.language-management v2.0.0
139
- */
140
-
141
- /**
142
- * Language Management namespace containing all models
143
- * for language and language text management.
144
- */
145
- declare namespace LanguageManagement {
146
- /**
147
- * State interface for language management
148
- */
149
- interface State {
150
- languageResponse: LanguageResponse;
151
- languageTextsResponse: LanguageTextResponse;
152
- selectedItem: Language | null;
153
- cultures: Culture[];
154
- resources: Resource[];
155
- }
156
- /**
157
- * Paginated response of languages
158
- */
159
- type LanguageResponse = ABP.PagedResponse<Language>;
160
- /**
161
- * Paginated response of language texts
162
- */
163
- type LanguageTextResponse = ABP.PagedResponse<LanguageText>;
164
- /**
165
- * Culture information for localization
166
- */
167
- interface Culture {
168
- displayName: string;
169
- name: string;
170
- }
171
- /**
172
- * Resource containing localization strings
173
- */
174
- interface Resource {
175
- name: string;
176
- }
177
- /**
178
- * Language entity
179
- */
180
- interface Language {
181
- id: string;
182
- cultureName: string;
183
- uiCultureName: string;
184
- displayName: string;
185
- flagIcon: string;
186
- isEnabled: boolean;
187
- isDefaultLanguage: boolean;
188
- creationTime: string;
189
- creatorId: string;
190
- }
191
- /**
192
- * Input for updating a language
193
- */
194
- interface UpdateLanguageInput {
195
- isEnabled: boolean;
196
- flagIcon: string;
197
- displayName: string;
198
- }
199
- /**
200
- * Input for creating a new language
201
- */
202
- interface CreateLanguageInput extends UpdateLanguageInput {
203
- cultureName: string;
204
- uiCultureName: string;
205
- }
206
- /**
207
- * Language text (localization string) entity
208
- */
209
- interface LanguageText {
210
- resourceName: string;
211
- cultureName: string;
212
- baseCultureName: string;
213
- baseValue: string;
214
- name: string;
215
- value: string;
216
- }
217
- /**
218
- * Query parameters for fetching language texts
219
- */
220
- interface LanguageTextQueryParams extends ABP.PageQueryParams {
221
- resourceName?: string;
222
- baseCultureName: string;
223
- targetCultureName: string;
224
- getOnlyEmptyValues: boolean;
225
- }
226
- /**
227
- * Parameters for requesting a language text by name
228
- */
229
- interface LanguageTextRequestByNameParams {
230
- resourceName: string;
231
- cultureName: string;
232
- name: string;
233
- }
234
- /**
235
- * Parameters for updating a language text by name
236
- */
237
- interface LanguageTextUpdateByNameParams extends LanguageTextRequestByNameParams {
238
- value?: string;
239
- }
240
- }
241
-
242
426
  /**
243
427
  * Language Management Extension Tokens
244
428
  * Provides extension points for customizing language management components.
245
429
  * @since 3.0.0
430
+ * @updated 3.2.0 - Now uses proxy types (LanguageDto, LanguageTextDto)
246
431
  */
247
432
 
248
433
  /**
@@ -314,99 +499,99 @@ type EditFormPropContributorCallback<T> = (props: FormProp<T>[]) => FormProp<T>[
314
499
  /**
315
500
  * Default entity actions for Languages component.
316
501
  */
317
- declare const DEFAULT_LANGUAGES_ENTITY_ACTIONS: EntityAction<LanguageManagement.Language>[];
502
+ declare const DEFAULT_LANGUAGES_ENTITY_ACTIONS: EntityAction<LanguageDto>[];
318
503
  /**
319
504
  * Default entity actions for LanguageTexts component.
320
505
  */
321
- declare const DEFAULT_LANGUAGE_TEXTS_ENTITY_ACTIONS: EntityAction<LanguageManagement.LanguageText>[];
506
+ declare const DEFAULT_LANGUAGE_TEXTS_ENTITY_ACTIONS: EntityAction<LanguageTextDto>[];
322
507
  /**
323
508
  * Combined default language management entity actions.
324
509
  */
325
510
  declare const DEFAULT_LANGUAGE_MANAGEMENT_ENTITY_ACTIONS: {
326
- readonly 'LanguageManagement.LanguagesComponent': EntityAction<LanguageManagement.Language>[];
327
- readonly 'LanguageManagement.LanguageTextsComponent': EntityAction<LanguageManagement.LanguageText>[];
511
+ readonly 'LanguageManagement.LanguagesComponent': EntityAction<LanguageDto>[];
512
+ readonly 'LanguageManagement.LanguageTextsComponent': EntityAction<LanguageTextDto>[];
328
513
  };
329
514
  /**
330
515
  * Default toolbar actions for Languages component.
331
516
  */
332
- declare const DEFAULT_LANGUAGES_TOOLBAR_ACTIONS: ToolbarAction<LanguageManagement.Language[]>[];
517
+ declare const DEFAULT_LANGUAGES_TOOLBAR_ACTIONS: ToolbarAction<LanguageDto[]>[];
333
518
  /**
334
519
  * Default toolbar actions for LanguageTexts component.
335
520
  * Note: LanguageTexts typically doesn't have toolbar actions as texts are predefined.
336
521
  */
337
- declare const DEFAULT_LANGUAGE_TEXTS_TOOLBAR_ACTIONS: ToolbarAction<LanguageManagement.LanguageText[]>[];
522
+ declare const DEFAULT_LANGUAGE_TEXTS_TOOLBAR_ACTIONS: ToolbarAction<LanguageTextDto[]>[];
338
523
  /**
339
524
  * Combined default language management toolbar actions.
340
525
  */
341
526
  declare const DEFAULT_LANGUAGE_MANAGEMENT_TOOLBAR_ACTIONS: {
342
- readonly 'LanguageManagement.LanguagesComponent': ToolbarAction<LanguageManagement.Language[]>[];
343
- readonly 'LanguageManagement.LanguageTextsComponent': ToolbarAction<LanguageManagement.LanguageText[]>[];
527
+ readonly 'LanguageManagement.LanguagesComponent': ToolbarAction<LanguageDto[]>[];
528
+ readonly 'LanguageManagement.LanguageTextsComponent': ToolbarAction<LanguageTextDto[]>[];
344
529
  };
345
530
  /**
346
531
  * Default entity props for Languages component.
347
532
  */
348
- declare const DEFAULT_LANGUAGES_ENTITY_PROPS: EntityProp<LanguageManagement.Language>[];
533
+ declare const DEFAULT_LANGUAGES_ENTITY_PROPS: EntityProp<LanguageDto>[];
349
534
  /**
350
535
  * Combined default language management entity props.
351
536
  * Note: LanguageTexts props are not included as they use a different display pattern.
352
537
  */
353
538
  declare const DEFAULT_LANGUAGE_MANAGEMENT_ENTITY_PROPS: {
354
- readonly 'LanguageManagement.LanguagesComponent': EntityProp<LanguageManagement.Language>[];
539
+ readonly 'LanguageManagement.LanguagesComponent': EntityProp<LanguageDto>[];
355
540
  };
356
541
  /**
357
542
  * Default create form props for Languages component.
358
543
  */
359
- declare const DEFAULT_LANGUAGES_CREATE_FORM_PROPS: FormProp<LanguageManagement.Language>[];
544
+ declare const DEFAULT_LANGUAGES_CREATE_FORM_PROPS: FormProp<LanguageDto>[];
360
545
  /**
361
546
  * Default edit form props for Languages component.
362
547
  */
363
- declare const DEFAULT_LANGUAGES_EDIT_FORM_PROPS: FormProp<LanguageManagement.Language>[];
548
+ declare const DEFAULT_LANGUAGES_EDIT_FORM_PROPS: FormProp<LanguageDto>[];
364
549
  /**
365
550
  * Combined default language management create form props.
366
551
  */
367
552
  declare const DEFAULT_LANGUAGE_MANAGEMENT_CREATE_FORM_PROPS: {
368
- readonly 'LanguageManagement.LanguagesComponent': FormProp<LanguageManagement.Language>[];
553
+ readonly 'LanguageManagement.LanguagesComponent': FormProp<LanguageDto>[];
369
554
  };
370
555
  /**
371
556
  * Combined default language management edit form props.
372
557
  */
373
558
  declare const DEFAULT_LANGUAGE_MANAGEMENT_EDIT_FORM_PROPS: {
374
- readonly 'LanguageManagement.LanguagesComponent': FormProp<LanguageManagement.Language>[];
559
+ readonly 'LanguageManagement.LanguagesComponent': FormProp<LanguageDto>[];
375
560
  };
376
561
  /**
377
562
  * Entity action contributors type.
378
563
  */
379
564
  type LanguageManagementEntityActionContributors = Partial<{
380
- [eLanguageManagementComponents.Languages]: EntityActionContributorCallback<LanguageManagement.Language>[];
381
- [eLanguageManagementComponents.LanguageTexts]: EntityActionContributorCallback<LanguageManagement.LanguageText>[];
565
+ [eLanguageManagementComponents.Languages]: EntityActionContributorCallback<LanguageDto>[];
566
+ [eLanguageManagementComponents.LanguageTexts]: EntityActionContributorCallback<LanguageTextDto>[];
382
567
  }>;
383
568
  /**
384
569
  * Toolbar action contributors type.
385
570
  */
386
571
  type LanguageManagementToolbarActionContributors = Partial<{
387
- [eLanguageManagementComponents.Languages]: ToolbarActionContributorCallback<LanguageManagement.Language[]>[];
388
- [eLanguageManagementComponents.LanguageTexts]: ToolbarActionContributorCallback<LanguageManagement.LanguageText[]>[];
572
+ [eLanguageManagementComponents.Languages]: ToolbarActionContributorCallback<LanguageDto[]>[];
573
+ [eLanguageManagementComponents.LanguageTexts]: ToolbarActionContributorCallback<LanguageTextDto[]>[];
389
574
  }>;
390
575
  /**
391
576
  * Entity prop contributors type.
392
577
  */
393
578
  type LanguageManagementEntityPropContributors = Partial<{
394
- [eLanguageManagementComponents.Languages]: EntityPropContributorCallback<LanguageManagement.Language>[];
395
- [eLanguageManagementComponents.LanguageTexts]: EntityPropContributorCallback<LanguageManagement.LanguageText>[];
579
+ [eLanguageManagementComponents.Languages]: EntityPropContributorCallback<LanguageDto>[];
580
+ [eLanguageManagementComponents.LanguageTexts]: EntityPropContributorCallback<LanguageTextDto>[];
396
581
  }>;
397
582
  /**
398
583
  * Create form prop contributors type.
399
584
  */
400
585
  type LanguageManagementCreateFormPropContributors = Partial<{
401
- [eLanguageManagementComponents.Languages]: CreateFormPropContributorCallback<LanguageManagement.Language>[];
402
- [eLanguageManagementComponents.LanguageTexts]: CreateFormPropContributorCallback<LanguageManagement.LanguageText>[];
586
+ [eLanguageManagementComponents.Languages]: CreateFormPropContributorCallback<LanguageDto>[];
587
+ [eLanguageManagementComponents.LanguageTexts]: CreateFormPropContributorCallback<LanguageTextDto>[];
403
588
  }>;
404
589
  /**
405
590
  * Edit form prop contributors type.
406
591
  */
407
592
  type LanguageManagementEditFormPropContributors = Partial<{
408
- [eLanguageManagementComponents.Languages]: EditFormPropContributorCallback<LanguageManagement.Language>[];
409
- [eLanguageManagementComponents.LanguageTexts]: EditFormPropContributorCallback<LanguageManagement.LanguageText>[];
593
+ [eLanguageManagementComponents.Languages]: EditFormPropContributorCallback<LanguageDto>[];
594
+ [eLanguageManagementComponents.LanguageTexts]: EditFormPropContributorCallback<LanguageTextDto>[];
410
595
  }>;
411
596
  /**
412
597
  * Token for language management entity action contributors.
@@ -434,6 +619,127 @@ declare const LANGUAGE_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS: unique symbol;
434
619
  */
435
620
  declare const LANGUAGE_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS: unique symbol;
436
621
 
622
+ /**
623
+ * Language Management Models
624
+ * Translated from @volo/abp.ng.language-management v3.2.0
625
+ *
626
+ * @since 2.0.0
627
+ * @updated 3.2.0 - State now uses new proxy types, legacy types deprecated
628
+ */
629
+
630
+ /**
631
+ * Language Management namespace containing all models
632
+ * for language and language text management.
633
+ */
634
+ declare namespace LanguageManagement {
635
+ /**
636
+ * State interface for language management
637
+ * @updated 3.2.0 - Now uses new proxy types
638
+ */
639
+ interface State {
640
+ languageResponse: ListResultDto<LanguageDto>;
641
+ languageTextsResponse: PagedResultDto<LanguageTextDto>;
642
+ selectedItem: LanguageDto | null;
643
+ cultures: CultureInfoDto[];
644
+ resources: LanguageResourceDto[];
645
+ }
646
+ /**
647
+ * Paginated response of languages
648
+ * @deprecated To be deleted in v4.0. Use ListResultDto<LanguageDto> instead.
649
+ */
650
+ type LanguageResponse = ABP.PagedResponse<Language>;
651
+ /**
652
+ * Paginated response of language texts
653
+ * @deprecated To be deleted in v4.0. Use PagedResultDto<LanguageTextDto> instead.
654
+ */
655
+ type LanguageTextResponse = ABP.PagedResponse<LanguageText>;
656
+ /**
657
+ * Culture information for localization
658
+ * @deprecated To be deleted in v4.0. Use CultureInfoDto from proxy/dto instead.
659
+ */
660
+ interface Culture {
661
+ displayName: string;
662
+ name: string;
663
+ }
664
+ /**
665
+ * Resource containing localization strings
666
+ * @deprecated To be deleted in v4.0. Use LanguageResourceDto from proxy/dto instead.
667
+ */
668
+ interface Resource {
669
+ name: string;
670
+ }
671
+ /**
672
+ * Language entity
673
+ * @deprecated To be deleted in v4.0. Use LanguageDto from proxy/dto instead.
674
+ */
675
+ interface Language {
676
+ id: string;
677
+ cultureName: string;
678
+ uiCultureName: string;
679
+ displayName: string;
680
+ flagIcon: string;
681
+ isEnabled: boolean;
682
+ isDefaultLanguage: boolean;
683
+ creationTime: string;
684
+ creatorId: string;
685
+ }
686
+ /**
687
+ * Input for updating a language
688
+ * @deprecated To be deleted in v4.0. Use UpdateLanguageDto from proxy/dto instead.
689
+ */
690
+ interface UpdateLanguageInput {
691
+ isEnabled: boolean;
692
+ flagIcon: string;
693
+ displayName: string;
694
+ }
695
+ /**
696
+ * Input for creating a new language
697
+ * @deprecated To be deleted in v4.0. Use CreateLanguageDto from proxy/dto instead.
698
+ */
699
+ interface CreateLanguageInput extends UpdateLanguageInput {
700
+ cultureName: string;
701
+ uiCultureName: string;
702
+ }
703
+ /**
704
+ * Language text (localization string) entity
705
+ * @deprecated To be deleted in v4.0. Use LanguageTextDto from proxy/dto instead.
706
+ */
707
+ interface LanguageText {
708
+ resourceName: string;
709
+ cultureName: string;
710
+ baseCultureName: string;
711
+ baseValue: string;
712
+ name: string;
713
+ value: string;
714
+ }
715
+ /**
716
+ * Query parameters for fetching language texts
717
+ * @deprecated To be deleted in v4.0. Use GetLanguagesTextsInput from proxy/dto instead.
718
+ */
719
+ interface LanguageTextQueryParams extends ABP.PageQueryParams {
720
+ resourceName?: string;
721
+ baseCultureName: string;
722
+ targetCultureName: string;
723
+ getOnlyEmptyValues: boolean;
724
+ }
725
+ /**
726
+ * Parameters for requesting a language text by name
727
+ * @deprecated To be deleted in v4.0. Use individual parameters instead.
728
+ */
729
+ interface LanguageTextRequestByNameParams {
730
+ resourceName: string;
731
+ cultureName: string;
732
+ name: string;
733
+ }
734
+ /**
735
+ * Parameters for updating a language text by name
736
+ * @deprecated To be deleted in v4.0. Use individual parameters instead.
737
+ */
738
+ interface LanguageTextUpdateByNameParams extends LanguageTextRequestByNameParams {
739
+ value?: string;
740
+ }
741
+ }
742
+
437
743
  /**
438
744
  * Language Management Routes
439
745
  * Translated from @volo/abp.ng.language-management v0.7.2
@@ -543,13 +849,14 @@ declare class LanguageManagementService {
543
849
 
544
850
  /**
545
851
  * Language Management State Service
546
- * Translated from @volo/abp.ng.language-management v3.0.0
852
+ * Translated from @volo/abp.ng.language-management v3.2.0
547
853
  *
548
854
  * Provides a stateful facade over language management operations,
549
855
  * maintaining internal state that mirrors the Angular NGXS store pattern.
550
856
  *
551
857
  * @since 2.0.0
552
858
  * @updated 3.0.0 - Removed getLanguagesTotalCount() method
859
+ * @updated 3.2.0 - Now uses new proxy services and types
553
860
  */
554
861
 
555
862
  /**
@@ -558,67 +865,73 @@ declare class LanguageManagementService {
558
865
  * mirroring the Angular NGXS store pattern.
559
866
  *
560
867
  * @since 2.0.0
868
+ * @updated 3.2.0 - Now uses new proxy services internally
561
869
  *
562
870
  * @example
563
871
  * ```tsx
564
872
  * const stateService = new LanguageManagementStateService(restService);
565
873
  *
566
874
  * // Dispatch to fetch languages
567
- * await stateService.dispatchGetLanguages({ maxResultCount: 10 });
875
+ * await stateService.dispatchGetLanguages();
568
876
  *
569
877
  * // Access the result
570
878
  * const languages = stateService.getLanguages();
571
879
  * ```
572
880
  */
573
881
  declare class LanguageManagementStateService {
574
- private service;
882
+ private languageService;
883
+ private languageTextService;
575
884
  private state;
576
885
  constructor(rest: RestService);
577
886
  /**
578
887
  * Get the current list of languages from state
888
+ * @returns Array of LanguageDto
579
889
  */
580
- getLanguages(): LanguageManagement.Language[];
890
+ getLanguages(): LanguageDto[];
581
891
  /**
582
892
  * Get the current list of language texts from state
893
+ * @returns Array of LanguageTextDto
583
894
  */
584
- getLanguageTexts(): LanguageManagement.LanguageText[];
895
+ getLanguageTexts(): LanguageTextDto[];
585
896
  /**
586
897
  * Get the total count of language texts from state
587
898
  */
588
899
  getLanguageTextsTotalCount(): number;
589
900
  /**
590
901
  * Get the current list of cultures from state
902
+ * @returns Array of CultureInfoDto
591
903
  */
592
- getCultures(): LanguageManagement.Culture[];
904
+ getCultures(): CultureInfoDto[];
593
905
  /**
594
906
  * Get the current list of resources from state
907
+ * @returns Array of LanguageResourceDto
595
908
  */
596
- getResources(): LanguageManagement.Resource[];
909
+ getResources(): LanguageResourceDto[];
597
910
  /**
598
- * Dispatch action to fetch languages with optional pagination
599
- * @param params - Optional query parameters for pagination and filtering
600
- * @returns Promise with the language response
911
+ * Dispatch action to fetch languages with optional filtering
912
+ * @param params - Optional query parameters for filtering
913
+ * @returns Promise with the language list result
601
914
  */
602
- dispatchGetLanguages(params?: ABP.PageQueryParams): Promise<LanguageManagement.LanguageResponse>;
915
+ dispatchGetLanguages(params?: GetLanguagesTextsInput): Promise<LanguageManagement.State['languageResponse']>;
603
916
  /**
604
917
  * Dispatch action to fetch a language by ID
605
918
  * @param id - The language ID
606
919
  * @returns Promise with the language
607
920
  */
608
- dispatchGetLanguageById(id: string): Promise<LanguageManagement.Language>;
921
+ dispatchGetLanguageById(id: string): Promise<LanguageDto>;
609
922
  /**
610
923
  * Dispatch action to create or update a language
611
924
  * @param body - The language data
612
925
  * @param id - Optional ID for update (if not provided, creates new)
613
926
  * @returns Promise with the created/updated language
614
927
  */
615
- dispatchCreateUpdateLanguage(body: LanguageManagement.CreateLanguageInput | LanguageManagement.UpdateLanguageInput, id?: string): Promise<LanguageManagement.Language>;
928
+ dispatchCreateUpdateLanguage(body: CreateLanguageDto | UpdateLanguageDto, id?: string): Promise<LanguageDto>;
616
929
  /**
617
930
  * Dispatch action to delete a language
618
931
  * @param id - The language ID to delete
619
- * @returns Promise resolving when complete (returns null per v2.0.0 spec)
932
+ * @returns Promise resolving when complete
620
933
  */
621
- dispatchDeleteLanguage(id: string): Promise<null>;
934
+ dispatchDeleteLanguage(id: string): Promise<void>;
622
935
  /**
623
936
  * Dispatch action to set a language as the default
624
937
  * @param id - The language ID to set as default
@@ -630,29 +943,38 @@ declare class LanguageManagementStateService {
630
943
  * @param params - Query parameters including resource name, cultures, and filter options
631
944
  * @returns Promise with the language text response
632
945
  */
633
- dispatchGetLanguageTexts(params: LanguageManagement.LanguageTextQueryParams): Promise<LanguageManagement.LanguageTextResponse>;
946
+ dispatchGetLanguageTexts(params: GetLanguagesTextsInput): Promise<LanguageManagement.State['languageTextsResponse']>;
634
947
  /**
635
948
  * Dispatch action to update a language text by name
636
949
  * @param params - Parameters including the new value
637
- * @returns Promise with the updated language text
950
+ * @returns Promise resolving when complete
638
951
  */
639
- dispatchUpdateLanguageTextByName(params: LanguageManagement.LanguageTextUpdateByNameParams): Promise<LanguageManagement.LanguageText>;
952
+ dispatchUpdateLanguageTextByName(params: {
953
+ resourceName: string;
954
+ cultureName: string;
955
+ name: string;
956
+ value: string;
957
+ }): Promise<void>;
640
958
  /**
641
959
  * Dispatch action to restore a language text to its default value
642
960
  * @param params - Parameters identifying the language text
643
961
  * @returns Promise resolving when complete
644
962
  */
645
- dispatchRestoreLanguageTextByName(params: LanguageManagement.LanguageTextRequestByNameParams): Promise<void>;
963
+ dispatchRestoreLanguageTextByName(params: {
964
+ resourceName: string;
965
+ cultureName: string;
966
+ name: string;
967
+ }): Promise<void>;
646
968
  /**
647
969
  * Dispatch action to fetch available cultures
648
970
  * @returns Promise with the list of cultures
649
971
  */
650
- dispatchGetLanguageCultures(): Promise<LanguageManagement.Culture[]>;
972
+ dispatchGetLanguageCultures(): Promise<CultureInfoDto[]>;
651
973
  /**
652
974
  * Dispatch action to fetch available localization resources
653
975
  * @returns Promise with the list of resources
654
976
  */
655
- dispatchGetLanguageResources(): Promise<LanguageManagement.Resource[]>;
977
+ dispatchGetLanguageResources(): Promise<LanguageResourceDto[]>;
656
978
  }
657
979
 
658
980
  /**
@@ -920,4 +1242,4 @@ interface LanguageTextsComponentProps {
920
1242
  */
921
1243
  declare function LanguageTextsComponent({ onLanguageTextUpdated, onLanguageTextRestored, }: LanguageTextsComponentProps): React.ReactElement;
922
1244
 
923
- export { type CreateFormPropContributorCallback, DEFAULT_LANGUAGES_CREATE_FORM_PROPS, DEFAULT_LANGUAGES_EDIT_FORM_PROPS, DEFAULT_LANGUAGES_ENTITY_ACTIONS, DEFAULT_LANGUAGES_ENTITY_PROPS, DEFAULT_LANGUAGES_TOOLBAR_ACTIONS, DEFAULT_LANGUAGE_MANAGEMENT_CREATE_FORM_PROPS, DEFAULT_LANGUAGE_MANAGEMENT_EDIT_FORM_PROPS, DEFAULT_LANGUAGE_MANAGEMENT_ENTITY_ACTIONS, DEFAULT_LANGUAGE_MANAGEMENT_ENTITY_PROPS, DEFAULT_LANGUAGE_MANAGEMENT_TOOLBAR_ACTIONS, DEFAULT_LANGUAGE_TEXTS_ENTITY_ACTIONS, DEFAULT_LANGUAGE_TEXTS_TOOLBAR_ACTIONS, type EditFormPropContributorCallback, type EntityAction, type EntityActionContributorCallback, type EntityProp, type EntityPropContributorCallback, type FormProp, LANGUAGE_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS, LANGUAGE_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS, LANGUAGE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS, LANGUAGE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS, LANGUAGE_MANAGEMENT_ROUTES, LANGUAGE_MANAGEMENT_ROUTE_PROVIDERS, LANGUAGE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS, LanguageManagement, type LanguageManagementComponentKey, type LanguageManagementCreateFormPropContributors, type LanguageManagementEditFormPropContributors, type LanguageManagementEntityActionContributors, type LanguageManagementEntityPropContributors, LanguageManagementExtensionsGuard, type LanguageManagementPolicyNameKey, type LanguageManagementRouteNameKey, LanguageManagementService, LanguageManagementStateService, type LanguageManagementToolbarActionContributors, type LanguageOperationResult, type LanguageTextOperationResult, LanguageTextsComponent, type LanguageTextsComponentProps, LanguagesComponent, type LanguagesComponentProps, type SortOrder$1 as SortOrder, type ToolbarAction, type ToolbarActionContributorCallback, type UseLanguageTextsReturn, type UseLanguagesReturn, configureRoutes, eLanguageManagementComponents, eLanguageManagementPolicyNames, eLanguageManagementRouteNames, initializeLanguageManagementRoutes, languageManagementExtensionsGuard, useLanguageManagementExtensionsGuard, useLanguageTexts, useLanguages };
1245
+ export { type CreateFormPropContributorCallback, type CreateLanguageDto, type CultureInfoDto, DEFAULT_LANGUAGES_CREATE_FORM_PROPS, DEFAULT_LANGUAGES_EDIT_FORM_PROPS, DEFAULT_LANGUAGES_ENTITY_ACTIONS, DEFAULT_LANGUAGES_ENTITY_PROPS, DEFAULT_LANGUAGES_TOOLBAR_ACTIONS, DEFAULT_LANGUAGE_MANAGEMENT_CREATE_FORM_PROPS, DEFAULT_LANGUAGE_MANAGEMENT_EDIT_FORM_PROPS, DEFAULT_LANGUAGE_MANAGEMENT_ENTITY_ACTIONS, DEFAULT_LANGUAGE_MANAGEMENT_ENTITY_PROPS, DEFAULT_LANGUAGE_MANAGEMENT_TOOLBAR_ACTIONS, DEFAULT_LANGUAGE_TEXTS_ENTITY_ACTIONS, DEFAULT_LANGUAGE_TEXTS_TOOLBAR_ACTIONS, type EditFormPropContributorCallback, type EntityAction, type EntityActionContributorCallback, type EntityProp, type EntityPropContributorCallback, type FormProp, type GetLanguagesTextsInput, LANGUAGE_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS, LANGUAGE_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS, LANGUAGE_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS, LANGUAGE_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS, LANGUAGE_MANAGEMENT_ROUTES, LANGUAGE_MANAGEMENT_ROUTE_PROVIDERS, LANGUAGE_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS, type LanguageDto, LanguageManagement, type LanguageManagementComponentKey, type LanguageManagementCreateFormPropContributors, type LanguageManagementEditFormPropContributors, type LanguageManagementEntityActionContributors, type LanguageManagementEntityPropContributors, LanguageManagementExtensionsGuard, type LanguageManagementPolicyNameKey, type LanguageManagementRouteNameKey, LanguageManagementService, LanguageManagementStateService, type LanguageManagementToolbarActionContributors, type LanguageOperationResult, type LanguageResourceDto, LanguageService, type LanguageTextDto, type LanguageTextOperationResult, LanguageTextService, LanguageTextsComponent, type LanguageTextsComponentProps, LanguagesComponent, type LanguagesComponentProps, type SortOrder$1 as SortOrder, type ToolbarAction, type ToolbarActionContributorCallback, type UpdateLanguageDto, type UseLanguageTextsReturn, type UseLanguagesReturn, configureRoutes, eLanguageManagementComponents, eLanguageManagementPolicyNames, eLanguageManagementRouteNames, initializeLanguageManagementRoutes, languageManagementExtensionsGuard, useLanguageManagementExtensionsGuard, useLanguageTexts, useLanguages };