@tagsamurai/fats-api-services 1.0.0-alpha.180 → 1.0.0-alpha.181

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/fats-api-services",
3
- "version": "1.0.0-alpha.180",
3
+ "version": "1.0.0-alpha.181",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Fixed Asset Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -1,4 +1,5 @@
1
1
  import { FetchDetailResponse, FetchListResponse } from '../types/fetchResponse.type';
2
+ import { Group } from '../types/group.type';
2
3
  import { LicenseData } from '../types/license.type';
3
4
  import { GroupAllocation } from '../types/licenseAllocation.type';
4
5
  import { AssetListCol } from '../types/licenseAsset.type';
@@ -16,6 +17,9 @@ export type GetFixedAssetPerGroup = FetchDetailResponse<{
16
17
  awaitPendingActivation?: boolean;
17
18
  }>;
18
19
  export type GetBasicFixedAssetPerGroup = FetchListResponse<AssetListCol>;
20
+ export type GetGroupAllocation = FetchDetailResponse<Group & {
21
+ quota: GroupAllocation;
22
+ }>;
19
23
  export interface ManageLicenseBody {
20
24
  source: 'available' | 'managedAsset';
21
25
  assetsToManage: string[];
@@ -1,9 +1,9 @@
1
1
  import { AxiosResponse } from 'axios';
2
- import { AddonLicenseAction, GetFixedAssetPerGroup, GetTotalLicenseResponse, LicenseAssetAddonFilterQuery, LicenseAssetFilterQuery, LicenseQuotaAllocationFilterQuery, ManageLicenseBody, PurchasedLicenseFilterQuery, PutEditSubGroupQuotaBody } from '../dto/license.dto';
2
+ import { AddonLicenseAction, GetFixedAssetPerGroup, GetGroupAllocation, GetTotalLicenseResponse, LicenseAssetAddonFilterQuery, LicenseAssetFilterQuery, LicenseQuotaAllocationFilterQuery, ManageLicenseBody, PurchasedLicenseFilterQuery, PutEditSubGroupQuotaBody } from '../dto/license.dto';
3
3
  import { FetchDetailResponse, FetchListResponse, QueryParams } from '../types/fetchResponse.type';
4
4
  import { Company, PurchasedLicense } from '../types/licensePurchased.type';
5
5
  import { ConcurrentUser } from '../types/licenseConcurrent.type';
6
- import { GroupAllocation } from '../types/licenseAllocation.type';
6
+ import { AllocationSubGroupRawData, GroupAllocation } from '../types/licenseAllocation.type';
7
7
  import { AddonLicenseCol, LicenseAssetName } from '../types/licenseAsset.type';
8
8
  declare const LicenseServices: {
9
9
  getFixedAssetPerGroup: (groupId: string, params?: LicenseAssetFilterQuery) => Promise<AxiosResponse<GetFixedAssetPerGroup>>;
@@ -22,8 +22,8 @@ declare const LicenseServices: {
22
22
  putManageLicense: (licenseType: keyof GroupAllocation, body: ManageLicenseBody) => Promise<AxiosResponse<FetchDetailResponse<{
23
23
  pendingActivationUntil: string;
24
24
  }>>>;
25
- getGroupQuota: (groupId: string) => Promise<AxiosResponse>;
26
- getSubGroupQuota: (parentId: string, params?: LicenseQuotaAllocationFilterQuery) => Promise<AxiosResponse>;
25
+ getGroupQuota: (groupId: string) => Promise<AxiosResponse<GetGroupAllocation>>;
26
+ getSubGroupQuota: (parentId: string, params?: LicenseQuotaAllocationFilterQuery) => Promise<AxiosResponse<FetchListResponse<AllocationSubGroupRawData>>>;
27
27
  editSubGroupQuota: (subGroupId: string, body: PutEditSubGroupQuotaBody) => Promise<AxiosResponse>;
28
28
  getConcurrentUserData: () => Promise<AxiosResponse<FetchDetailResponse<{
29
29
  online: number;
@@ -14,11 +14,6 @@ export type GroupAllocation = {
14
14
  assetControl?: Quota;
15
15
  };
16
16
  export type LicenseType = keyof GroupAllocation;
17
- export type GetGroupAllocationResponse = {
18
- data: {
19
- quota: GroupAllocation;
20
- };
21
- };
22
17
  export type GroupAllocationCol = {
23
18
  license?: string;
24
19
  fixedAsset?: number;
@@ -36,26 +31,21 @@ export type GroupNode = {
36
31
  parent: string;
37
32
  _id: string;
38
33
  };
39
- export type SubGroupDataResponse = {
40
- data: {
41
- totalRecords: number;
42
- data: {
43
- _id: string;
44
- name: string;
45
- quota: {
46
- rfid: Quota;
47
- fixedAsset: Quota;
48
- repairTicketing: Quota;
49
- maintenance: Quota;
50
- audit: Quota;
51
- assetControl: Quota;
52
- tracking: Quota;
53
- repair: Quota;
54
- };
55
- parent: string;
56
- key: number;
57
- }[];
34
+ export type AllocationSubGroupRawData = {
35
+ _id: string;
36
+ name: string;
37
+ quota: {
38
+ rfid: Quota;
39
+ fixedAsset: Quota;
40
+ repairTicketing: Quota;
41
+ maintenance: Quota;
42
+ audit: Quota;
43
+ assetControl: Quota;
44
+ tracking: Quota;
45
+ repair: Quota;
58
46
  };
47
+ parent: string;
48
+ key: number;
59
49
  };
60
50
  export type AllocationSubGroupCol = {
61
51
  group?: {