@veloceapps/api 1.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.
Files changed (62) hide show
  1. package/README.md +7 -0
  2. package/bundles/veloce-api.umd.js +2117 -0
  3. package/bundles/veloce-api.umd.js.map +1 -0
  4. package/esm2015/index.js +14 -0
  5. package/esm2015/lib/api.module.js +59 -0
  6. package/esm2015/lib/services/configuration-api.service.js +90 -0
  7. package/esm2015/lib/services/configuration-settings-api.service.js +69 -0
  8. package/esm2015/lib/services/context-api.service.js +26 -0
  9. package/esm2015/lib/services/document-attachment-api.service.js +65 -0
  10. package/esm2015/lib/services/document-templates-api.service.js +278 -0
  11. package/esm2015/lib/services/price-api.service.js +86 -0
  12. package/esm2015/lib/services/product-model-api.service.js +232 -0
  13. package/esm2015/lib/services/quote-api.service.js +36 -0
  14. package/esm2015/lib/services/ramp-api.service.js +42 -0
  15. package/esm2015/lib/services/salesforce-api.service.js +51 -0
  16. package/esm2015/lib/services/scripts-api.service.js +75 -0
  17. package/esm2015/lib/services/ui-templates-api.service.js +262 -0
  18. package/esm2015/lib/types/attribute-dto.types.js +21 -0
  19. package/esm2015/lib/types/charge-group-item-dto.types.js +45 -0
  20. package/esm2015/lib/types/charge-item-dto.types.js +74 -0
  21. package/esm2015/lib/types/clone-request.types.js +2 -0
  22. package/esm2015/lib/types/configuration-settings-dto.types.js +22 -0
  23. package/esm2015/lib/types/domain-type-dto.types.js +27 -0
  24. package/esm2015/lib/types/line-item-dto.types.js +93 -0
  25. package/esm2015/lib/types/port-domain-dto.types.js +22 -0
  26. package/esm2015/lib/types/price-adjustment-dto.types.js +15 -0
  27. package/esm2015/lib/types/price-dto.types.js +25 -0
  28. package/esm2015/lib/types/recommended-price-dto.types.js +23 -0
  29. package/esm2015/lib/types/ui-template-dto.types.js +2 -0
  30. package/esm2015/lib/utils/ui-template.utils.js +17 -0
  31. package/esm2015/veloce-api.js +5 -0
  32. package/fesm2015/veloce-api.js +1686 -0
  33. package/fesm2015/veloce-api.js.map +1 -0
  34. package/index.d.ts +14 -0
  35. package/lib/api.module.d.ts +7 -0
  36. package/lib/services/configuration-api.service.d.ts +18 -0
  37. package/lib/services/configuration-settings-api.service.d.ts +17 -0
  38. package/lib/services/context-api.service.d.ts +11 -0
  39. package/lib/services/document-attachment-api.service.d.ts +15 -0
  40. package/lib/services/document-templates-api.service.d.ts +39 -0
  41. package/lib/services/price-api.service.d.ts +16 -0
  42. package/lib/services/product-model-api.service.d.ts +30 -0
  43. package/lib/services/quote-api.service.d.ts +14 -0
  44. package/lib/services/ramp-api.service.d.ts +12 -0
  45. package/lib/services/salesforce-api.service.d.ts +17 -0
  46. package/lib/services/scripts-api.service.d.ts +21 -0
  47. package/lib/services/ui-templates-api.service.d.ts +47 -0
  48. package/lib/types/attribute-dto.types.d.ts +11 -0
  49. package/lib/types/charge-group-item-dto.types.d.ts +24 -0
  50. package/lib/types/charge-item-dto.types.d.ts +39 -0
  51. package/lib/types/clone-request.types.d.ts +6 -0
  52. package/lib/types/configuration-settings-dto.types.d.ts +9 -0
  53. package/lib/types/domain-type-dto.types.d.ts +15 -0
  54. package/lib/types/line-item-dto.types.d.ts +50 -0
  55. package/lib/types/port-domain-dto.types.d.ts +13 -0
  56. package/lib/types/price-adjustment-dto.types.d.ts +8 -0
  57. package/lib/types/price-dto.types.d.ts +13 -0
  58. package/lib/types/recommended-price-dto.types.d.ts +12 -0
  59. package/lib/types/ui-template-dto.types.d.ts +10 -0
  60. package/lib/utils/ui-template.utils.d.ts +3 -0
  61. package/package.json +33 -0
  62. package/veloce-api.d.ts +5 -0
@@ -0,0 +1,24 @@
1
+ import { ChargeGroupItem } from '@veloce/core';
2
+ import { Dictionary } from 'lodash';
3
+ import { PriceAdjustmentDTO } from './price-adjustment-dto.types';
4
+ export declare class ChargeGroupItemDTO {
5
+ chargeType: string;
6
+ chargeMethod: string;
7
+ properties: Dictionary<string>;
8
+ id?: string | undefined;
9
+ chargeTypeDisplayValue?: string | undefined;
10
+ frequencyUnit?: string | undefined;
11
+ frequencyDuration?: number | undefined;
12
+ currency?: string | undefined;
13
+ sellingTerm?: number | undefined;
14
+ netPrice?: number | undefined;
15
+ listPrice?: number | undefined;
16
+ netUnitPrice?: number | undefined;
17
+ listUnitPrice?: number | undefined;
18
+ cost?: number | undefined;
19
+ priceAdjustment?: PriceAdjustmentDTO | undefined;
20
+ priceWaterfalls?: PriceAdjustmentDTO[] | undefined;
21
+ enablePriceAdjustment?: boolean | undefined;
22
+ static fromDTO(dto: ChargeGroupItemDTO): ChargeGroupItem;
23
+ constructor(chargeType: string, chargeMethod: string, properties: Dictionary<string>, id?: string | undefined, chargeTypeDisplayValue?: string | undefined, frequencyUnit?: string | undefined, frequencyDuration?: number | undefined, currency?: string | undefined, sellingTerm?: number | undefined, netPrice?: number | undefined, listPrice?: number | undefined, netUnitPrice?: number | undefined, listUnitPrice?: number | undefined, cost?: number | undefined, priceAdjustment?: PriceAdjustmentDTO | undefined, priceWaterfalls?: PriceAdjustmentDTO[] | undefined, enablePriceAdjustment?: boolean | undefined);
24
+ }
@@ -0,0 +1,39 @@
1
+ import { ChargeItem } from '@veloce/core';
2
+ import { Dictionary } from 'lodash';
3
+ import { PriceAdjustmentDTO } from './price-adjustment-dto.types';
4
+ export declare class ChargeItemDTO {
5
+ id: string;
6
+ price: number;
7
+ unitPrice: number;
8
+ baseListPrice: number;
9
+ baseListUnitPrice: number;
10
+ listPrice: number;
11
+ listUnitPrice: number;
12
+ netPrice: number;
13
+ netUnitPrice: number;
14
+ chargeId: string;
15
+ chargeType: string;
16
+ chargeMethod: string;
17
+ priceItemId: string;
18
+ startDate: string;
19
+ priceWaterfalls: PriceAdjustmentDTO[];
20
+ quantity: number;
21
+ properties: Dictionary<string>;
22
+ chargeTypeDisplayValue?: string | undefined;
23
+ arr?: number | undefined;
24
+ frequencyUnit?: string | undefined;
25
+ frequencyDuration?: number | undefined;
26
+ endDate?: string | undefined;
27
+ sellingTerm?: number | undefined;
28
+ currency?: string | undefined;
29
+ unitCost?: number | undefined;
30
+ cost?: number | undefined;
31
+ minUnitPrice?: number | undefined;
32
+ minPrice?: number | undefined;
33
+ enablePriceAdjustment?: boolean | undefined;
34
+ enableListPriceAdjustment?: boolean | undefined;
35
+ listPriceAdjustment?: PriceAdjustmentDTO | undefined;
36
+ priceAdjustment?: PriceAdjustmentDTO | undefined;
37
+ static fromDTO(dto: ChargeItemDTO): ChargeItem;
38
+ constructor(id: string, price: number, unitPrice: number, baseListPrice: number, baseListUnitPrice: number, listPrice: number, listUnitPrice: number, netPrice: number, netUnitPrice: number, chargeId: string, chargeType: string, chargeMethod: string, priceItemId: string, startDate: string, priceWaterfalls: PriceAdjustmentDTO[], quantity: number, properties: Dictionary<string>, chargeTypeDisplayValue?: string | undefined, arr?: number | undefined, frequencyUnit?: string | undefined, frequencyDuration?: number | undefined, endDate?: string | undefined, sellingTerm?: number | undefined, currency?: string | undefined, unitCost?: number | undefined, cost?: number | undefined, minUnitPrice?: number | undefined, minPrice?: number | undefined, enablePriceAdjustment?: boolean | undefined, enableListPriceAdjustment?: boolean | undefined, listPriceAdjustment?: PriceAdjustmentDTO | undefined, priceAdjustment?: PriceAdjustmentDTO | undefined);
39
+ }
@@ -0,0 +1,6 @@
1
+ export interface CloneRequest {
2
+ id: string;
3
+ propertiesToOverride: {
4
+ [key: string]: any;
5
+ };
6
+ }
@@ -0,0 +1,9 @@
1
+ import { ConfigurationSettings } from '@veloce/core';
2
+ export declare class ConfigurationSettingsDTO {
3
+ id: string;
4
+ key: string;
5
+ value: string;
6
+ static fromDTO(dto: ConfigurationSettingsDTO, key?: string): ConfigurationSettings;
7
+ static toDTO(data: ConfigurationSettings): ConfigurationSettingsDTO;
8
+ constructor(id: string, key: string, value: string);
9
+ }
@@ -0,0 +1,15 @@
1
+ import { DomainType } from '@veloce/core';
2
+ import { Dictionary } from 'lodash';
3
+ import { RecommendedPriceDTO } from './recommended-price-dto.types';
4
+ export declare class DomainTypeDTO {
5
+ name: string;
6
+ displayName: string;
7
+ minCard: number;
8
+ maxCard: number;
9
+ recommendedPrices?: RecommendedPriceDTO[] | undefined;
10
+ properties?: Dictionary<string> | undefined;
11
+ status?: string | undefined;
12
+ cardinality?: number | undefined;
13
+ static fromDTO(dto: DomainTypeDTO): DomainType;
14
+ constructor(name: string, displayName: string, minCard: number, maxCard: number, recommendedPrices?: RecommendedPriceDTO[] | undefined, properties?: Dictionary<string> | undefined, status?: string | undefined, cardinality?: number | undefined);
15
+ }
@@ -0,0 +1,50 @@
1
+ import { LineItem } from '@veloce/core';
2
+ import { Dictionary } from 'lodash';
3
+ import { AttributeDTO } from './attribute-dto.types';
4
+ import { ChargeGroupItemDTO } from './charge-group-item-dto.types';
5
+ import { ChargeItemDTO } from './charge-item-dto.types';
6
+ import { PortDomainDTO } from './port-domain-dto.types';
7
+ import { PriceDTO } from './price-dto.types';
8
+ export declare class LineItemDTO {
9
+ id: string;
10
+ activated: boolean;
11
+ attributes: AttributeDTO[];
12
+ attributeDomains: Dictionary<any[]>;
13
+ cfgStatus: string;
14
+ chargeGroupItems: ChargeGroupItemDTO[];
15
+ chargeItems: ChargeItemDTO[];
16
+ domainComputations: Dictionary<boolean>;
17
+ lineItems: LineItem[];
18
+ messages: string[];
19
+ name: string;
20
+ optionalCharges: any[];
21
+ pending: boolean;
22
+ portDomains: Dictionary<PortDomainDTO>;
23
+ properties: Dictionary<string>;
24
+ qty: number;
25
+ totalPrices: Dictionary<PriceDTO>;
26
+ type: string;
27
+ productId?: string | undefined;
28
+ port?: string | undefined;
29
+ parentId?: string | undefined;
30
+ assetId?: string | undefined;
31
+ openOrderLineItemId?: string | undefined;
32
+ productName?: string | undefined;
33
+ rootId?: string | undefined;
34
+ actionCode?: string | undefined;
35
+ serviceStartDate?: Date | undefined;
36
+ effectiveDate?: Date | undefined;
37
+ startDate?: Date | undefined;
38
+ endDate?: Date | undefined;
39
+ planId?: string | undefined;
40
+ sellingFrequencyUnit?: string | undefined;
41
+ sellingFrequencyDuration?: string | undefined;
42
+ offeringId?: string | undefined;
43
+ offeringItemId?: string | undefined;
44
+ offeringInstanceId?: string | undefined;
45
+ rampInstanceId?: string | undefined;
46
+ enableRamp?: boolean | undefined;
47
+ configurable?: boolean | undefined;
48
+ static fromDTO(dto: LineItemDTO): LineItem;
49
+ constructor(id: string, activated: boolean, attributes: AttributeDTO[], attributeDomains: Dictionary<any[]>, cfgStatus: string, chargeGroupItems: ChargeGroupItemDTO[], chargeItems: ChargeItemDTO[], domainComputations: Dictionary<boolean>, lineItems: LineItem[], messages: string[], name: string, optionalCharges: any[], pending: boolean, portDomains: Dictionary<PortDomainDTO>, properties: Dictionary<string>, qty: number, totalPrices: Dictionary<PriceDTO>, type: string, productId?: string | undefined, port?: string | undefined, parentId?: string | undefined, assetId?: string | undefined, openOrderLineItemId?: string | undefined, productName?: string | undefined, rootId?: string | undefined, actionCode?: string | undefined, serviceStartDate?: Date | undefined, effectiveDate?: Date | undefined, startDate?: Date | undefined, endDate?: Date | undefined, planId?: string | undefined, sellingFrequencyUnit?: string | undefined, sellingFrequencyDuration?: string | undefined, offeringId?: string | undefined, offeringItemId?: string | undefined, offeringInstanceId?: string | undefined, rampInstanceId?: string | undefined, enableRamp?: boolean | undefined, configurable?: boolean | undefined);
50
+ }
@@ -0,0 +1,13 @@
1
+ import { PortDomain } from '@veloce/core';
2
+ import { Dictionary } from 'lodash';
3
+ import { DomainTypeDTO } from './domain-type-dto.types';
4
+ export declare class PortDomainDTO {
5
+ name: string;
6
+ type: string;
7
+ minCard: number;
8
+ maxCard: number;
9
+ domainTypes: DomainTypeDTO[];
10
+ properties: Dictionary<string>;
11
+ static fromDTO(dto: PortDomainDTO): PortDomain;
12
+ constructor(name: string, type: string, minCard: number, maxCard: number, domainTypes: DomainTypeDTO[], properties: Dictionary<string>);
13
+ }
@@ -0,0 +1,8 @@
1
+ import { PriceAdjustment } from '@veloce/core';
2
+ export declare class PriceAdjustmentDTO {
3
+ amount: number;
4
+ explanation: string;
5
+ type: string;
6
+ static fromDTO(dto: PriceAdjustmentDTO): PriceAdjustment;
7
+ constructor(amount: number, explanation: string, type: string);
8
+ }
@@ -0,0 +1,13 @@
1
+ import { Price } from '@veloce/core';
2
+ export declare class PriceDTO {
3
+ netPrice: number;
4
+ listPrice: number;
5
+ chargeType: string;
6
+ chargeTypeDisplayValue: string;
7
+ chargeMethod: string;
8
+ frequencyUnit: string;
9
+ frequencyDuration: number;
10
+ sellingTerm: number;
11
+ static fromDTO(dto: PriceDTO): Price;
12
+ constructor(netPrice: number, listPrice: number, chargeType: string, chargeTypeDisplayValue: string, chargeMethod: string, frequencyUnit: string, frequencyDuration: number, sellingTerm: number);
13
+ }
@@ -0,0 +1,12 @@
1
+ import { RecommendedPrice } from '@veloce/core';
2
+ export declare class RecommendedPriceDTO {
3
+ netPrice: number;
4
+ listPrice: number;
5
+ chargeType: string;
6
+ chargeMethod: string;
7
+ explanation?: string | undefined;
8
+ frequencyDuration?: number | undefined;
9
+ frequencyUnit?: string | undefined;
10
+ static fromDTO(dto: RecommendedPriceDTO): RecommendedPrice;
11
+ constructor(netPrice: number, listPrice: number, chargeType: string, chargeMethod: string, explanation?: string | undefined, frequencyDuration?: number | undefined, frequencyUnit?: string | undefined);
12
+ }
@@ -0,0 +1,10 @@
1
+ export interface UIComponentStoryDTO {
2
+ id: string;
3
+ name: string;
4
+ uiComponentId: string;
5
+ description?: string;
6
+ templateHtmlId?: string;
7
+ scriptJsId?: string;
8
+ styleCssId?: string;
9
+ sectionJsonId?: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ import { ComponentStory, ComponentStoryAttachments } from '@veloce/core';
2
+ import { UIComponentStoryDTO } from '../types/ui-template-dto.types';
3
+ export declare const fromUIComponentStoryDTO: (dto: UIComponentStoryDTO, attachments: ComponentStoryAttachments) => ComponentStory;
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@veloceapps/api",
3
+ "version": "1.0.0",
4
+ "peerDependencies": {
5
+ "@angular/common": "^12.2.0",
6
+ "@angular/core": "^12.2.0",
7
+ "@veloce/core": "1.0.0",
8
+ "lodash": "^4.17.21",
9
+ "moment": "^2.29.1",
10
+ "rxjs": "^7.3.0",
11
+ "pako": "^1.0.11",
12
+ "primeng": "^12.2.2",
13
+ "angular-expressions": "^1.1.4",
14
+ "docxtemplater": "^3.28.1",
15
+ "pizzip": "^3.1.1",
16
+ "@aws-sdk/client-xray": "^3.40.0",
17
+ "@angular/forms": "^12.2.0",
18
+ "jshashes": "^1.0.8"
19
+ },
20
+ "dependencies": {
21
+ "tslib": "^2.2.0"
22
+ },
23
+ "sideEffects": false,
24
+ "publishConfig": {
25
+
26
+ },
27
+ "main": "bundles/veloce-api.umd.js",
28
+ "module": "fesm2015/veloce-api.js",
29
+ "es2015": "fesm2015/veloce-api.js",
30
+ "esm2015": "esm2015/veloce-api.js",
31
+ "fesm2015": "fesm2015/veloce-api.js",
32
+ "typings": "veloce-api.d.ts"
33
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@veloce/api" />
5
+ export * from './index';