@sneat/mod-assetus-core 0.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.
Files changed (53) hide show
  1. package/esm2022/index.js +2 -0
  2. package/esm2022/index.js.map +1 -0
  3. package/esm2022/lib/contexts/asset-context.js +2 -0
  4. package/esm2022/lib/contexts/asset-context.js.map +1 -0
  5. package/esm2022/lib/contexts/index.js +2 -0
  6. package/esm2022/lib/contexts/index.js.map +1 -0
  7. package/esm2022/lib/data/car-makes-with-models.js +94 -0
  8. package/esm2022/lib/data/car-makes-with-models.js.map +1 -0
  9. package/esm2022/lib/data/index.js +3 -0
  10. package/esm2022/lib/data/index.js.map +1 -0
  11. package/esm2022/lib/data/vehicles.js +7 -0
  12. package/esm2022/lib/data/vehicles.js.map +1 -0
  13. package/esm2022/lib/dto/assetus-types.js +42 -0
  14. package/esm2022/lib/dto/assetus-types.js.map +1 -0
  15. package/esm2022/lib/dto/dto-asset.js +2 -0
  16. package/esm2022/lib/dto/dto-asset.js.map +1 -0
  17. package/esm2022/lib/dto/dto-document.js +66 -0
  18. package/esm2022/lib/dto/dto-document.js.map +1 -0
  19. package/esm2022/lib/dto/dto-liability.js +2 -0
  20. package/esm2022/lib/dto/dto-liability.js.map +1 -0
  21. package/esm2022/lib/dto/dto-service-provider.js +2 -0
  22. package/esm2022/lib/dto/dto-service-provider.js.map +1 -0
  23. package/esm2022/lib/dto/index.js +6 -0
  24. package/esm2022/lib/dto/index.js.map +1 -0
  25. package/esm2022/lib/index.js +6 -0
  26. package/esm2022/lib/index.js.map +1 -0
  27. package/esm2022/lib/types.js +4 -0
  28. package/esm2022/lib/types.js.map +1 -0
  29. package/esm2022/lib/uimodels/asset-group.js +14 -0
  30. package/esm2022/lib/uimodels/asset-group.js.map +1 -0
  31. package/esm2022/lib/uimodels/index.js +2 -0
  32. package/esm2022/lib/uimodels/index.js.map +1 -0
  33. package/esm2022/sneat-mod-assetus-core.js +5 -0
  34. package/esm2022/sneat-mod-assetus-core.js.map +1 -0
  35. package/index.d.ts +1 -0
  36. package/lib/contexts/asset-context.d.ts +7 -0
  37. package/lib/contexts/index.d.ts +1 -0
  38. package/lib/data/car-makes-with-models.d.ts +13 -0
  39. package/lib/data/index.d.ts +2 -0
  40. package/lib/data/vehicles.d.ts +18 -0
  41. package/lib/dto/assetus-types.d.ts +44 -0
  42. package/lib/dto/dto-asset.d.ts +107 -0
  43. package/lib/dto/dto-document.d.ts +35 -0
  44. package/lib/dto/dto-liability.d.ts +22 -0
  45. package/lib/dto/dto-service-provider.d.ts +52 -0
  46. package/lib/dto/index.d.ts +5 -0
  47. package/lib/index.d.ts +5 -0
  48. package/lib/types.d.ts +4 -0
  49. package/lib/uimodels/asset-group.d.ts +10 -0
  50. package/lib/uimodels/index.d.ts +1 -0
  51. package/package.json +26 -0
  52. package/sneat-mod-assetus-core.d.ts +5 -0
  53. package/tsconfig.lib.prod.tsbuildinfo +1 -0
@@ -0,0 +1,35 @@
1
+ import { IAssetContext } from '../contexts/asset-context';
2
+ import { IAssetExtra } from './dto-asset';
3
+ export type AssetDocumentType = 'unspecified' | 'other' | 'passport' | 'driving_license' | 'birth_certificate' | 'marriage_certificate' | 'rent_lease' | 'insurance_policy';
4
+ export interface IDocTypeField {
5
+ type?: 'str' | 'int' | 'date';
6
+ required?: boolean;
7
+ exclude?: boolean;
8
+ max?: number;
9
+ min?: number;
10
+ }
11
+ export interface IDocTypeStandardFields {
12
+ title?: IDocTypeField;
13
+ number?: IDocTypeField;
14
+ issuedBy?: IDocTypeField;
15
+ issuedOn?: IDocTypeField;
16
+ validTill?: IDocTypeField;
17
+ members?: IDocTypeField;
18
+ }
19
+ export interface DocTypeDef {
20
+ id: AssetDocumentType;
21
+ title: string;
22
+ emoji?: string;
23
+ fields?: IDocTypeStandardFields;
24
+ }
25
+ export declare const standardDocTypesByID: Record<string, DocTypeDef>;
26
+ export interface IAssetDocumentExtra extends IAssetExtra {
27
+ docType?: AssetDocumentType;
28
+ number?: string;
29
+ batchNumber?: string;
30
+ countryID?: string;
31
+ issuedOn?: string;
32
+ issuedBy?: string;
33
+ expiresOn?: string;
34
+ }
35
+ export type IAssetDocumentContext = IAssetContext<'document', IAssetDocumentExtra>;
@@ -0,0 +1,22 @@
1
+ import { ITitledRecord, IWithSpaceIDs, Period } from '@sneat/dto';
2
+ export type LiabilityType = 'salary' | 'service' | 'tax' | 'education' | 'childcare' | 'mortgage' | 'rent' | 'insurance';
3
+ export type DwellingTaxServiceType = 'lpt';
4
+ export type VehicleServiceType = 'roadtax' | 'nct';
5
+ export type EntertainmentServiceType = 'tv' | 'music';
6
+ export type EducationServiceType = 'class';
7
+ export type DwellingServiceType = 'electricity' | 'gas' | 'oil' | 'waste_removal' | 'internet' | 'phone' | 'tv' | 'tv_license';
8
+ export type SettlementType = 'rural' | 'urban';
9
+ export type LiabilityServiceType = DwellingServiceType | DwellingTaxServiceType | EntertainmentServiceType | EducationServiceType | VehicleServiceType;
10
+ export type ServiceCategory = 'service' | 'tax';
11
+ export type LiabilityDirection = 'expense' | 'income';
12
+ export interface DtoLiability extends IWithSpaceIDs, ITitledRecord {
13
+ type: LiabilityType;
14
+ direction: LiabilityDirection;
15
+ serviceTypes?: LiabilityServiceType[];
16
+ serviceProvider?: {
17
+ id: string;
18
+ title: string;
19
+ };
20
+ amount: number;
21
+ period: Period;
22
+ }
@@ -0,0 +1,52 @@
1
+ import { AssetCategory } from './assetus-types';
2
+ import { ITitledRecord } from '@sneat/dto';
3
+ import { LiabilityServiceType, ServiceCategory, SettlementType } from './dto-liability';
4
+ export interface ServiceProviderContact {
5
+ type: 'phone' | 'twitter' | 'fbm' | 'post' | 'chat';
6
+ address: string;
7
+ title?: string;
8
+ worksHours?: string;
9
+ note?: string;
10
+ }
11
+ export interface ServiceProviderContactsGroup {
12
+ type: 'sales' | 'customer_support' | 'emergencies' | 'moving_house';
13
+ title: string;
14
+ note?: string;
15
+ contacts: ServiceProviderContact[];
16
+ }
17
+ export interface ServiceProviderContacts {
18
+ usUrl: string;
19
+ groups: ServiceProviderContactsGroup[];
20
+ }
21
+ export type ServiceProviderStatus = 'active' | 'rejected' | 'suggested' | 'archived';
22
+ export interface DtoServiceProvider extends ITitledRecord {
23
+ countryId: string;
24
+ status: ServiceProviderStatus;
25
+ assetCategoryId?: AssetCategory;
26
+ serviceTypes: LiabilityServiceType[];
27
+ contact?: ServiceProviderContacts;
28
+ }
29
+ interface ServicePlanOffer {
30
+ title: string;
31
+ description: string;
32
+ }
33
+ export interface DtoServicePlan extends ITitledRecord {
34
+ settlementType?: SettlementType;
35
+ providerId: string;
36
+ eab: number;
37
+ eabWithOffers?: number;
38
+ pricePerUnit: number;
39
+ discountPercentRange?: {
40
+ from: number;
41
+ to: number;
42
+ };
43
+ offers?: ServicePlanOffer[];
44
+ unit: 'kWh';
45
+ }
46
+ export interface LinkedToAssetCategories {
47
+ assetCategoryIds: AssetCategory[];
48
+ }
49
+ export interface DtoServiceType extends ITitledRecord, LinkedToAssetCategories {
50
+ serviceCategoryId: ServiceCategory;
51
+ }
52
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './assetus-types';
2
+ export * from './dto-asset';
3
+ export * from './dto-document';
4
+ export * from './dto-liability';
5
+ export * from './dto-service-provider';
package/lib/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export * from './contexts';
2
+ export * from './data';
3
+ export * from './dto';
4
+ export * from './uimodels';
5
+ export * from './types';
package/lib/types.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export type CurrencyCode = 'USD' | 'EUR';
2
+ export declare const CurrencyUSD: CurrencyCode;
3
+ export declare const CurrencyEUR: CurrencyCode;
4
+ export declare const CurrencyList: CurrencyCode[];
@@ -0,0 +1,10 @@
1
+ import { IAssetGroupContext } from '../contexts/asset-context';
2
+ import { IAssetDtoGroupCounts } from '../dto/';
3
+ import { Totals } from '@sneat/space-models';
4
+ export declare class AssetGroup {
5
+ readonly context: IAssetGroupContext;
6
+ readonly totals: Totals;
7
+ constructor(context: IAssetGroupContext);
8
+ get id(): string;
9
+ get numberOf(): IAssetDtoGroupCounts;
10
+ }
@@ -0,0 +1 @@
1
+ export * from './asset-group';
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@sneat/mod-assetus-core",
3
+ "version": "0.2.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "peerDependencies": {
8
+ "@angular/common": ">=21.0.0",
9
+ "@angular/core": ">=21.0.0"
10
+ },
11
+ "dependencies": {
12
+ "tslib": "2.8.1"
13
+ },
14
+ "module": "esm2022/sneat-mod-assetus-core.js",
15
+ "typings": "sneat-mod-assetus-core.d.ts",
16
+ "exports": {
17
+ "./package.json": {
18
+ "default": "./package.json"
19
+ },
20
+ ".": {
21
+ "types": "./sneat-mod-assetus-core.d.ts",
22
+ "default": "./esm2022/sneat-mod-assetus-core.js"
23
+ }
24
+ },
25
+ "sideEffects": false
26
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@sneat/mod-assetus-core" />
5
+ export * from './index';