@ieeesa-npm/tenants 0.1.5 → 0.1.7

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.
@@ -1,15 +1,15 @@
1
1
  import { HttpService } from '@ieeesa-npm/utility';
2
2
  import { Observable } from 'rxjs';
3
- import { GetTenantsResponse, TenantInfo, TenantDetailsResponse } from '../models/tenants.model';
4
3
  import { GetTenantsPayload } from '../models/table-column-schema-view-tenant-list.model';
5
4
  import { TenantsPermissions, UserPermission } from '../models/tenants-permission.model';
6
5
  import { PermissionType } from '../models/permission-type.model';
7
6
  import { TenantPermissionsMapService } from './tenant-permissions-map.service';
8
- import { CreateTenantRequestPayload, CreateTenantResponse, TenantBasicInfo } from '../models/tenant.model';
7
+ import { CreateTenantRequestPayload, CreateTenantResponse, GetTenantsResponse, NewTenantInfo, TenantBasicInfo, TenantDetailsResponse } from '../models/tenant.model';
9
8
  import { CheckboxOption, RadioOption } from '@ieeesa-npm/presentation';
10
9
  import { FeatureId, Features, GetFeaturesResponse } from '../models/features.model';
11
10
  import { AppTypeConfig, GetAppTypesResponse } from '../models/app-type-config.model';
12
11
  import { TenantPermissionsService } from './tenant-permissions.service';
12
+ import { TenantFunctionType } from '../models/tenant-function-type.model';
13
13
  import { GetRolesAndPermissionsPayload, GetRolesAndPermissionsResponse, GetRolesResponse } from '../models/roles-and-permissions.model';
14
14
  import { UpdateTenantStatusRequestPayload, UpdateTenantStatusResponse } from '../models/update-tenant-status.model';
15
15
  import * as i0 from "@angular/core";
@@ -19,14 +19,20 @@ export declare class TenantApplicationsService {
19
19
  private tenantPermissionsMapService;
20
20
  tenantsText: {
21
21
  "2050": string;
22
+ "2051": string; /**
23
+ * Gets list of roles from server using HttpService.
24
+ * @param {string} appId
25
+ * @return {*} {Observable<GetRolesResponse>}
26
+ * @memberof TenantApplicationsService
27
+ */
28
+ "2054": string;
22
29
  "3007": string;
23
30
  "3009": string;
24
31
  };
25
32
  apiBaseUrl: string;
26
33
  userPermission: UserPermission[];
27
- selectedTenantInfo: TenantInfo | undefined;
34
+ selectedTenantInfo: TenantBasicInfo | undefined;
28
35
  userTenantsPermissions: TenantsPermissions[];
29
- tenantsInfo: TenantInfo;
30
36
  createTenantsText: {
31
37
  "2003": string;
32
38
  "2026": string;
@@ -40,6 +46,11 @@ export declare class TenantApplicationsService {
40
46
  "2035": string;
41
47
  "2036": string;
42
48
  "2037": string;
49
+ /**
50
+ * Returns the tenants information
51
+ * @return {TenantBasicInfo}
52
+ * @memberof TenantApplicationsService
53
+ */
43
54
  "2038": string;
44
55
  "2039": string;
45
56
  "2040": string;
@@ -52,10 +63,16 @@ export declare class TenantApplicationsService {
52
63
  "2047": string;
53
64
  "2048": string;
54
65
  "2049": string;
66
+ "2050": string;
67
+ "2052": string;
68
+ "2053": string;
55
69
  };
56
- tenantBasicInfo: TenantBasicInfo;
70
+ newTenantInfo: NewTenantInfo;
71
+ tenantFunctionType: TenantFunctionType;
57
72
  radioOptions: RadioOption[];
58
73
  checkBoxOptions: CheckboxOption[];
74
+ appTypeInfo: RadioOption[];
75
+ featureList: Features[];
59
76
  constructor(httpService: HttpService, tenantPermissionsService: TenantPermissionsService, tenantPermissionsMapService: TenantPermissionsMapService);
60
77
  setAppConfig(apiBaseUrl: string, userPermission: UserPermission[]): void;
61
78
  /**
@@ -79,16 +96,28 @@ export declare class TenantApplicationsService {
79
96
  getUserTenantsPermissions(): TenantsPermissions[];
80
97
  /**
81
98
  * Sets the user tenants information
82
- * @param {TenantInfo} tenantInfo
99
+ * @param {TenantBasicInfo} tenantInfo
83
100
  * @memberof TenantApplicationsService
84
101
  */
85
- setSelectedTenantInformation(tenantInfo: TenantInfo): void;
102
+ setSelectedTenantInformation(tenantInfo: TenantBasicInfo): void;
86
103
  /**
87
104
  * Returns the tenants information
88
- * @return {TenantInfo}
105
+ * @return {TenantBasicInfo}
89
106
  * @memberof TenantApplicationsService
90
107
  */
91
- getSelectedTenantInformation(): TenantInfo | undefined;
108
+ getSelectedTenantInformation(): TenantBasicInfo | undefined;
109
+ /**
110
+ * Sets the list of application type information
111
+ * @param {RadioOption} appTypeInfo
112
+ * @memberof TenantApplicationsService
113
+ */
114
+ setApplicationType(appTypeInfo: RadioOption[]): void;
115
+ /**
116
+ * Returns the list of application type information
117
+ * @return {RadioOption}
118
+ * @memberof TenantApplicationsService
119
+ */
120
+ getApplicationType(): RadioOption[] | undefined;
92
121
  /**
93
122
  * Filter permissions
94
123
  * @param usersPermissions
@@ -162,14 +191,31 @@ export declare class TenantApplicationsService {
162
191
  */
163
192
  getFeatureIds(featureOptions: CheckboxOption[]): FeatureId[];
164
193
  /**
165
- * Sets the tenant basic information.
166
- * @param {CreateTenantRequestPayload} createTenantPayload
194
+ * Sets the newly created tenant information.
195
+ * @param {NewTenantInfo} newTenantInfo
196
+ */
197
+ setNewTenantInfo(newTenantInfo: NewTenantInfo): void;
198
+ /**
199
+ * Returns the newly created tenant information.
167
200
  */
168
- setTenantBasicInfo(createTenantPayload: CreateTenantRequestPayload): void;
201
+ get getNewTenantInfo(): NewTenantInfo;
169
202
  /**
170
- * Returns the tenant basic information.
203
+ * Sets tenant function type.
204
+ * @param {TenantFunctionType} tenantFunctionType -tenant function type.
171
205
  */
172
- get getTenantBasicInfo(): TenantBasicInfo;
206
+ setTenantFunctionType(tenantFunctionType: TenantFunctionType): void;
207
+ /**
208
+ * Returns tenant function type.
209
+ * @return {TenantFunctionType} -tenant function type.
210
+ */
211
+ getTenantFunctionType(): TenantFunctionType;
212
+ /**
213
+ * Posts the edited tenant application form data to server using HttpService for updating the tenant information.
214
+ * @param {CreateTenantPayload} editTenantPayload
215
+ * @return {Observable<CreateTenantResponse>}
216
+ * @memberof TenantApplicationsService
217
+ */
218
+ editTenant(editTenantPayload: CreateTenantRequestPayload): Observable<CreateTenantResponse>;
173
219
  /**
174
220
  * Sends update request to the server to update the tenant application status to active/inactive using HttpService and returns the success or failure response.
175
221
  * @param {UpdateTenantStatusRequestPayload} updateTenantStatusPayload
@@ -177,6 +223,13 @@ export declare class TenantApplicationsService {
177
223
  * @memberof TenantApplicationsService
178
224
  */
179
225
  updateTenantStatus(updateTenantStatusPayload: UpdateTenantStatusRequestPayload): Observable<UpdateTenantStatusResponse>;
226
+ /**
227
+ * It generates Feature list from checkbox options generated in form array.
228
+ * @param {CheckboxOption[]} features
229
+ * @return {Features[]}
230
+ * @memberof TenantApplicationsService
231
+ */
232
+ getFeaturesList(features: CheckboxOption[]): Features[];
180
233
  static ɵfac: i0.ɵɵFactoryDeclaration<TenantApplicationsService, never>;
181
234
  static ɵprov: i0.ɵɵInjectableDeclaration<TenantApplicationsService>;
182
235
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ieeesa-npm/tenants",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0"
package/public-api.d.ts CHANGED
@@ -2,10 +2,10 @@ export * from './lib/components/view-tenants-list/view-tenants-list.component';
2
2
  export * from './lib/components/view-tenant-details/view-tenant-details.component';
3
3
  export * from './lib/components/create-tenant-application/create-tenant-application.component';
4
4
  export * from './lib/tenant-applications.component';
5
+ export * from './lib/components/tenant-basic-details/tenant-basic-details.component';
5
6
  export * from './lib/models/app-type-config.model';
6
7
  export * from './lib/models/app-type.model';
7
8
  export * from './lib/models/tenant.model';
8
- export * from './lib/models/tenants.model';
9
9
  export * from './lib/models/features.model';
10
10
  export * from './lib/models/form-status.model';
11
11
  export * from './lib/models/permission-type.model';
@@ -14,6 +14,7 @@ export * from './lib/models/route-config.model';
14
14
  export * from './lib/models/table-column-schema-view-tenant-list.model';
15
15
  export * from './lib/models/roles-and-permissions.model';
16
16
  export * from './lib/models/update-tenant-status.model';
17
+ export * from './lib/models/tenant-function-type.model';
17
18
  export * from './lib/services/tenant-applications.service';
18
19
  export * from './lib/services/tenant-permissions-map.service';
19
20
  export * from './lib/services/tenant-permissions.service';
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVuYW50cy5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3RlbmFudHMvc3JjL2xpYi9tb2RlbHMvdGVuYW50cy5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBGZWF0dXJlSW5mbyB7XHJcbiAgZmVhdHVyZUlkOiBzdHJpbmc7XHJcbiAgZmVhdHVyZU5hbWU6IHN0cmluZztcclxuICBpc0RlZmF1bHQ6IGJvb2xlYW47XHJcbn1cclxuZXhwb3J0IGludGVyZmFjZSBUZW5hbnRJbmZvIHtcclxuICBhcHBJZDogc3RyaW5nO1xyXG4gIGFwcFRpdGxlOiBzdHJpbmc7XHJcbiAgYXBwTG9nbz86IHN0cmluZztcclxuICBhcHBEZXNjcmlwdGlvbjogc3RyaW5nO1xyXG4gIGFwcEhlYWRpbmc6IHN0cmluZztcclxuICBmZWF0dXJlczogRmVhdHVyZUluZm9bXSB8IG51bGw7XHJcbiAgc3RhdHVzOiBib29sZWFuIHwgbnVsbDtcclxuICBhcHBUeXBlPzogc3RyaW5nO1xyXG4gIGJhY2tncm91bmRDb2xvcj86IHN0cmluZztcclxuICBhcHBIZWxwTGluaz86IHN0cmluZztcclxuICBhcHBEb21haW5Vcmw/OiBzdHJpbmc7XHJcbn1cclxuZXhwb3J0IGludGVyZmFjZSBHZXRUZW5hbnRzUmVzcG9uc2Uge1xyXG4gIHN0YXR1czogYm9vbGVhbjtcclxuICBtZXNzYWdlOiBzdHJpbmc7XHJcbiAgYm9keT86IHtcclxuICAgIHRvdGFsUmVjb3JkczogbnVtYmVyO1xyXG4gICAgYXBwRGV0YWlsczogVGVuYW50SW5mb1tdIHwgbnVsbCB8IHsgZXJyb3JDb2Rlczogc3RyaW5nW10gfTtcclxuICB9O1xyXG59XHJcbmV4cG9ydCBpbnRlcmZhY2UgVGVuYW50RGV0YWlsc1Jlc3BvbnNlIHtcclxuICBzdGF0dXM6IGJvb2xlYW47XHJcbiAgbWVzc2FnZTogc3RyaW5nO1xyXG4gIGJvZHk/OiBUZW5hbnRJbmZvIHwgeyBlcnJvckNvZGVzOiBzdHJpbmdbXSB9O1xyXG59XHJcbiJdfQ==
@@ -1,35 +0,0 @@
1
- export interface FeatureInfo {
2
- featureId: string;
3
- featureName: string;
4
- isDefault: boolean;
5
- }
6
- export interface TenantInfo {
7
- appId: string;
8
- appTitle: string;
9
- appLogo?: string;
10
- appDescription: string;
11
- appHeading: string;
12
- features: FeatureInfo[] | null;
13
- status: boolean | null;
14
- appType?: string;
15
- backgroundColor?: string;
16
- appHelpLink?: string;
17
- appDomainUrl?: string;
18
- }
19
- export interface GetTenantsResponse {
20
- status: boolean;
21
- message: string;
22
- body?: {
23
- totalRecords: number;
24
- appDetails: TenantInfo[] | null | {
25
- errorCodes: string[];
26
- };
27
- };
28
- }
29
- export interface TenantDetailsResponse {
30
- status: boolean;
31
- message: string;
32
- body?: TenantInfo | {
33
- errorCodes: string[];
34
- };
35
- }