@veloceapps/api 12.0.0-13 → 12.0.0-15

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 (145) hide show
  1. package/{fesm2020 → fesm2022}/veloceapps-api-v2.mjs +124 -124
  2. package/fesm2022/veloceapps-api-v2.mjs.map +1 -0
  3. package/{fesm2020 → fesm2022}/veloceapps-api.mjs +70 -70
  4. package/fesm2022/veloceapps-api.mjs.map +1 -0
  5. package/index.d.ts +382 -1
  6. package/package.json +7 -19
  7. package/v2/index.d.ts +562 -3
  8. package/esm2020/index.mjs +0 -2
  9. package/esm2020/src/index.mjs +0 -16
  10. package/esm2020/src/lib/api.module.mjs +0 -60
  11. package/esm2020/src/lib/services/account-api.service.mjs +0 -87
  12. package/esm2020/src/lib/services/auth.service.mjs +0 -22
  13. package/esm2020/src/lib/services/contracted-price-api.service.mjs +0 -45
  14. package/esm2020/src/lib/services/flow-state-api.mjs +0 -142
  15. package/esm2020/src/lib/services/offers-api.service.mjs +0 -76
  16. package/esm2020/src/lib/services/org-info-api.service.mjs +0 -54
  17. package/esm2020/src/lib/services/portals-api.service.mjs +0 -76
  18. package/esm2020/src/lib/services/promotions-api.service.mjs +0 -68
  19. package/esm2020/src/lib/services/rebate-program-api.service.mjs +0 -68
  20. package/esm2020/src/lib/services/rebate-type-api.service.mjs +0 -68
  21. package/esm2020/src/lib/services/sandbox-manager-api.service.mjs +0 -94
  22. package/esm2020/src/lib/services/stateful-configuration-api.mjs +0 -51
  23. package/esm2020/src/lib/types/auth.types.mjs +0 -2
  24. package/esm2020/src/lib/types/clone-request.types.mjs +0 -2
  25. package/esm2020/src/lib/types/delta-request.types.mjs +0 -2
  26. package/esm2020/src/lib/types/dto/offers-dto.types.mjs +0 -2
  27. package/esm2020/src/lib/types/index.mjs +0 -6
  28. package/esm2020/src/lib/types/org-info.types.mjs +0 -2
  29. package/esm2020/src/lib/types/search-request.types.mjs +0 -2
  30. package/esm2020/src/lib/types/stateful-configuration.types.mjs +0 -2
  31. package/esm2020/src/lib/utils/canvas.utils.mjs +0 -33
  32. package/esm2020/src/lib/utils/index.mjs +0 -2
  33. package/esm2020/v2/api-v2.module.mjs +0 -70
  34. package/esm2020/v2/index.mjs +0 -4
  35. package/esm2020/v2/services/cache-api.service.mjs +0 -22
  36. package/esm2020/v2/services/catalog-admin-api.service.mjs +0 -192
  37. package/esm2020/v2/services/catalog-api.service.mjs +0 -90
  38. package/esm2020/v2/services/configuration-processors-api.service.mjs +0 -38
  39. package/esm2020/v2/services/configuration-settings-api.service.mjs +0 -89
  40. package/esm2020/v2/services/context-definition-admin-api.service.mjs +0 -78
  41. package/esm2020/v2/services/document-attachment-api.service.mjs +0 -66
  42. package/esm2020/v2/services/endpoints-admin-api.service.mjs +0 -81
  43. package/esm2020/v2/services/flows-api.service.mjs +0 -29
  44. package/esm2020/v2/services/functions-admin-api.service.mjs +0 -116
  45. package/esm2020/v2/services/guided-sellings-admin-api.service.mjs +0 -65
  46. package/esm2020/v2/services/guided-sellings-api.service.mjs +0 -37
  47. package/esm2020/v2/services/index.mjs +0 -24
  48. package/esm2020/v2/services/orchestrations-admin-api.service.mjs +0 -87
  49. package/esm2020/v2/services/orchestrations-api.service.mjs +0 -23
  50. package/esm2020/v2/services/pcm-api.service.mjs +0 -38
  51. package/esm2020/v2/services/picklists-admin-api.service.mjs +0 -41
  52. package/esm2020/v2/services/products-admin-api.service.mjs +0 -90
  53. package/esm2020/v2/services/sales-transactions-api.service.mjs +0 -52
  54. package/esm2020/v2/services/salesforce-api.service.mjs +0 -83
  55. package/esm2020/v2/services/shopping-cart-settings-api.service.mjs +0 -28
  56. package/esm2020/v2/services/ui-definitions-admin-api.service.mjs +0 -70
  57. package/esm2020/v2/services/ui-templates-admin-api.service.mjs +0 -286
  58. package/esm2020/v2/services/veloce-objects-api.service.mjs +0 -90
  59. package/esm2020/v2/types/attachment.types.mjs +0 -2
  60. package/esm2020/v2/types/clone-request.types.mjs +0 -2
  61. package/esm2020/v2/types/dto/configuration-settings-dto.types.mjs +0 -22
  62. package/esm2020/v2/types/dto/ui-definition-dto.types.mjs +0 -2
  63. package/esm2020/v2/types/dto/ui-template-dto.types.mjs +0 -2
  64. package/esm2020/v2/types/endpoint.types.mjs +0 -2
  65. package/esm2020/v2/types/event-logs.types.mjs +0 -2
  66. package/esm2020/v2/types/function.types.mjs +0 -2
  67. package/esm2020/v2/types/index.mjs +0 -9
  68. package/esm2020/v2/types/pcm.types.mjs +0 -2
  69. package/esm2020/v2/types/procedure.types.mjs +0 -2
  70. package/esm2020/v2/types/sales-transaction.types.mjs +0 -2
  71. package/esm2020/v2/types/search-request.types.mjs +0 -2
  72. package/esm2020/v2/utils/ui-definition.utils.mjs +0 -23
  73. package/esm2020/v2/utils/ui-template.utils.mjs +0 -13
  74. package/esm2020/v2/veloceapps-api-v2.mjs +0 -5
  75. package/esm2020/veloceapps-api.mjs +0 -5
  76. package/fesm2015/veloceapps-api-v2.mjs +0 -1727
  77. package/fesm2015/veloceapps-api-v2.mjs.map +0 -1
  78. package/fesm2015/veloceapps-api.mjs +0 -853
  79. package/fesm2015/veloceapps-api.mjs.map +0 -1
  80. package/fesm2020/veloceapps-api-v2.mjs.map +0 -1
  81. package/fesm2020/veloceapps-api.mjs.map +0 -1
  82. package/src/index.d.ts +0 -15
  83. package/src/lib/api.module.d.ts +0 -8
  84. package/src/lib/services/account-api.service.d.ts +0 -23
  85. package/src/lib/services/auth.service.d.ts +0 -11
  86. package/src/lib/services/contracted-price-api.service.d.ts +0 -16
  87. package/src/lib/services/flow-state-api.d.ts +0 -84
  88. package/src/lib/services/offers-api.service.d.ts +0 -19
  89. package/src/lib/services/org-info-api.service.d.ts +0 -19
  90. package/src/lib/services/portals-api.service.d.ts +0 -20
  91. package/src/lib/services/promotions-api.service.d.ts +0 -19
  92. package/src/lib/services/rebate-program-api.service.d.ts +0 -19
  93. package/src/lib/services/rebate-type-api.service.d.ts +0 -19
  94. package/src/lib/services/sandbox-manager-api.service.d.ts +0 -24
  95. package/src/lib/services/stateful-configuration-api.d.ts +0 -30
  96. package/src/lib/types/auth.types.d.ts +0 -4
  97. package/src/lib/types/clone-request.types.d.ts +0 -5
  98. package/src/lib/types/delta-request.types.d.ts +0 -5
  99. package/src/lib/types/dto/offers-dto.types.d.ts +0 -9
  100. package/src/lib/types/index.d.ts +0 -5
  101. package/src/lib/types/org-info.types.d.ts +0 -43
  102. package/src/lib/types/search-request.types.d.ts +0 -8
  103. package/src/lib/types/stateful-configuration.types.d.ts +0 -10
  104. package/src/lib/utils/canvas.utils.d.ts +0 -18
  105. package/src/lib/utils/index.d.ts +0 -1
  106. package/v2/api-v2.module.d.ts +0 -7
  107. package/v2/services/cache-api.service.d.ts +0 -11
  108. package/v2/services/catalog-admin-api.service.d.ts +0 -39
  109. package/v2/services/catalog-api.service.d.ts +0 -20
  110. package/v2/services/configuration-processors-api.service.d.ts +0 -14
  111. package/v2/services/configuration-settings-api.service.d.ts +0 -18
  112. package/v2/services/context-definition-admin-api.service.d.ts +0 -16
  113. package/v2/services/document-attachment-api.service.d.ts +0 -17
  114. package/v2/services/endpoints-admin-api.service.d.ts +0 -20
  115. package/v2/services/flows-api.service.d.ts +0 -13
  116. package/v2/services/functions-admin-api.service.d.ts +0 -25
  117. package/v2/services/guided-sellings-admin-api.service.d.ts +0 -20
  118. package/v2/services/guided-sellings-api.service.d.ts +0 -13
  119. package/v2/services/index.d.ts +0 -23
  120. package/v2/services/orchestrations-admin-api.service.d.ts +0 -21
  121. package/v2/services/orchestrations-api.service.d.ts +0 -12
  122. package/v2/services/pcm-api.service.d.ts +0 -12
  123. package/v2/services/picklists-admin-api.service.d.ts +0 -17
  124. package/v2/services/products-admin-api.service.d.ts +0 -21
  125. package/v2/services/sales-transactions-api.service.d.ts +0 -26
  126. package/v2/services/salesforce-api.service.d.ts +0 -26
  127. package/v2/services/shopping-cart-settings-api.service.d.ts +0 -14
  128. package/v2/services/ui-definitions-admin-api.service.d.ts +0 -18
  129. package/v2/services/ui-templates-admin-api.service.d.ts +0 -50
  130. package/v2/services/veloce-objects-api.service.d.ts +0 -23
  131. package/v2/types/attachment.types.d.ts +0 -4
  132. package/v2/types/clone-request.types.d.ts +0 -5
  133. package/v2/types/dto/configuration-settings-dto.types.d.ts +0 -9
  134. package/v2/types/dto/ui-definition-dto.types.d.ts +0 -7
  135. package/v2/types/dto/ui-template-dto.types.d.ts +0 -6
  136. package/v2/types/endpoint.types.d.ts +0 -15
  137. package/v2/types/event-logs.types.d.ts +0 -9
  138. package/v2/types/function.types.d.ts +0 -17
  139. package/v2/types/index.d.ts +0 -8
  140. package/v2/types/pcm.types.d.ts +0 -10
  141. package/v2/types/procedure.types.d.ts +0 -73
  142. package/v2/types/sales-transaction.types.d.ts +0 -13
  143. package/v2/types/search-request.types.d.ts +0 -8
  144. package/v2/utils/ui-definition.utils.d.ts +0 -5
  145. package/v2/utils/ui-template.utils.d.ts +0 -3
package/index.d.ts CHANGED
@@ -1 +1,382 @@
1
- export * from './src';
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@angular/common/http';
3
+ import { HttpClient } from '@angular/common/http';
4
+ import * as i2 from '@veloceapps/api/v2';
5
+ import { LineItem, BaseHttpService, HttpRequestConfigurableOptions, Account, AccountAssetsState, Order, Quote, ContractedPrice, NewContractedPrice, Expression, GuidedSelling, FlowStateInitRequest, FlowStateInitResponse, FlowState, FlowStateExecutionRequestDTO, FlowStateExecutionResult, ConfigurationStateNewRequest, ConfigurationStateStartRequest, ConfigurationStateExecuteRequest, NewOffer, Offer, OfferProduct, NewOfferProduct, NewPortal, Portal, PortalCustomization, Promotion, NewPromotion, RebateProgram, NewRebateProgram, RebateType, NewRebateType, SalesforceOrganization, NewSalesforceOrganization, QuoteDraft, ConfigurationExecuteRequest, ConfigurationExecuteResponse } from '@veloceapps/core';
6
+ import { Observable } from 'rxjs';
7
+ import { MessageService } from 'primeng/api';
8
+ import { Dictionary } from 'lodash';
9
+
10
+ declare class ApiModule {
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiModule, never>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ApiModule, never, [typeof i1.HttpClientModule, typeof i2.ApiV2Module], never>;
13
+ static ɵinj: i0.ɵɵInjectorDeclaration<ApiModule>;
14
+ }
15
+
16
+ interface VeloceAuthResponse {
17
+ token: string;
18
+ serverUrl: string;
19
+ }
20
+
21
+ interface CloneRequest {
22
+ id: string;
23
+ propertiesToOverride: Dictionary<any>;
24
+ }
25
+
26
+ interface CalculateDeltaRequest {
27
+ initialState: LineItem[];
28
+ currentState: LineItem[];
29
+ }
30
+
31
+ interface OrgInfo {
32
+ Name: string;
33
+ EnvID: string;
34
+ Client: string;
35
+ Prefix: string;
36
+ Deleted: boolean;
37
+ OrgID: string;
38
+ BackendURL: string;
39
+ FrontendURL: string;
40
+ StudioURL: string;
41
+ IntegrationURL: string;
42
+ ShoppingCartURL: string;
43
+ CatalogURL: string;
44
+ DefaultDataURL: string;
45
+ BackendVersion: string;
46
+ FrontendVersion: string;
47
+ StudioVersion: string;
48
+ IntegrationVersion: string;
49
+ ShoppingCartVersion: string;
50
+ CatalogVersion: string;
51
+ DefaultDataVersion: string;
52
+ SelfRegistered: boolean;
53
+ SelfRegisteredExpireAt: string;
54
+ Scratch: boolean;
55
+ }
56
+ interface AvailableVersionsInfo {
57
+ orgId: string;
58
+ name: string;
59
+ envId: string;
60
+ client: string;
61
+ currentVersion: VersionInfo;
62
+ availableVersions: VersionInfo[];
63
+ }
64
+ interface VersionInfo {
65
+ release: string;
66
+ integrationVersion?: string;
67
+ componentVersions: ComponentVersionInfo[];
68
+ }
69
+ interface ComponentVersionInfo {
70
+ name: string;
71
+ displayName: string;
72
+ version: string;
73
+ }
74
+
75
+ type QuerySearchParams = {
76
+ skip?: number;
77
+ count?: number;
78
+ sort?: string;
79
+ asc?: boolean;
80
+ } & {
81
+ [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
82
+ };
83
+
84
+ declare class AccountApiService {
85
+ private httpService;
86
+ private readonly SERVICE_URL;
87
+ constructor(httpService: BaseHttpService);
88
+ getAccounts$(options?: HttpRequestConfigurableOptions): Observable<Account[]>;
89
+ searchAccounts$(searchParams?: QuerySearchParams, options?: HttpRequestConfigurableOptions): Observable<Account[]>;
90
+ getAccount$(id: string, options?: HttpRequestConfigurableOptions): Observable<Account>;
91
+ getAssetsState(accountId: string, options?: HttpRequestConfigurableOptions): Observable<AccountAssetsState>;
92
+ getAssets(accountId: string, options?: HttpRequestConfigurableOptions): Observable<LineItem[]>;
93
+ getOrders(accountId: string, options?: HttpRequestConfigurableOptions): Observable<Order[]>;
94
+ getQuotes(accountId: string, options?: HttpRequestConfigurableOptions): Observable<Quote[]>;
95
+ getAsset(accountId: string, assetId: string, options?: HttpRequestConfigurableOptions): Observable<LineItem>;
96
+ getOrder(accountId: string, orderId: string, options?: HttpRequestConfigurableOptions): Observable<LineItem[]>;
97
+ getQuote(accountId: string, quoteId: string, options?: HttpRequestConfigurableOptions): Observable<LineItem[]>;
98
+ quoteToOrder(accountId: string, quoteId: string, options?: HttpRequestConfigurableOptions): Observable<any>;
99
+ orderToAsset(accountId: string, orderId: string, options?: HttpRequestConfigurableOptions): Observable<any>;
100
+ static ɵfac: i0.ɵɵFactoryDeclaration<AccountApiService, never>;
101
+ static ɵprov: i0.ɵɵInjectableDeclaration<AccountApiService>;
102
+ }
103
+
104
+ declare class VeloceAuthService {
105
+ private http;
106
+ constructor(http: HttpClient);
107
+ auth$(instanceUrl: string, accessToken: string): Observable<VeloceAuthResponse>;
108
+ static ɵfac: i0.ɵɵFactoryDeclaration<VeloceAuthService, never>;
109
+ static ɵprov: i0.ɵɵInjectableDeclaration<VeloceAuthService>;
110
+ }
111
+
112
+ declare class ContractedPriceApiService {
113
+ private baseHttpService;
114
+ private readonly serviceUrl;
115
+ constructor(baseHttpService: BaseHttpService);
116
+ fetchContractedPrices$: () => Observable<ContractedPrice[]>;
117
+ fetchContractedPrice$: (id: string) => Observable<ContractedPrice>;
118
+ createContractedPrice$: (data: NewContractedPrice) => Observable<ContractedPrice>;
119
+ updateContractedPrice$: (data: ContractedPrice) => Observable<ContractedPrice>;
120
+ searchContractedPrices$: (searchParams?: QuerySearchParams, expression?: Expression) => Observable<GuidedSelling[]>;
121
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContractedPriceApiService, never>;
122
+ static ɵprov: i0.ɵɵInjectableDeclaration<ContractedPriceApiService>;
123
+ }
124
+
125
+ declare class FlowStateApiService {
126
+ private httpService;
127
+ private readonly SERVICE_URL;
128
+ constructor(httpService: BaseHttpService);
129
+ /**
130
+ * Initialize flow state
131
+ * @param request Request
132
+ * @returns Flow initialization response, which contains session ID and result of selectors
133
+ */
134
+ init(request: FlowStateInitRequest): Observable<FlowStateInitResponse>;
135
+ /**
136
+ * Get existing state by ID
137
+ * @param id ID
138
+ * @returns Flow State
139
+ */
140
+ get(id: string): Observable<FlowState>;
141
+ /**
142
+ * Execute actions/selectors
143
+ * @param id State ID
144
+ * @param request Request
145
+ * @returns Execute result
146
+ */
147
+ execute(id: string, request: FlowStateExecutionRequestDTO): Observable<FlowStateExecutionResult>;
148
+ /**
149
+ * Save Quote in the state
150
+ * @param id State ID
151
+ */
152
+ save(id: string): Observable<{
153
+ quoteId: string;
154
+ }>;
155
+ /**
156
+ * Submit Quote in the state
157
+ * @param id State ID
158
+ */
159
+ submit(id: string): Observable<{
160
+ quoteId: string;
161
+ }>;
162
+ /**
163
+ * Close Flow state
164
+ * @param id State ID
165
+ */
166
+ cancel(id: string): Observable<void>;
167
+ /**
168
+ * Initialize stateful configuration
169
+ * @param stateId string
170
+ * @param request Request
171
+ * @returns Flow initialization response, which contains session ID and result of selectors
172
+ */
173
+ newConfiguration(stateId: string, request: ConfigurationStateNewRequest): Observable<FlowStateExecutionResult>;
174
+ /**
175
+ * Start stateful configuration
176
+ * @param stateId string
177
+ * @param request Request
178
+ * @returns Flow initialization response, which contains session ID and result of selectors
179
+ */
180
+ startConfiguration(stateId: string, request: ConfigurationStateStartRequest): Observable<FlowStateExecutionResult>;
181
+ /**
182
+ * Execute stateful configuration
183
+ * @param stateId string
184
+ * @param configurationId string
185
+ * @param request Request
186
+ * @returns Flow initialization response, which contains session ID and result of selectors
187
+ */
188
+ executeConfiguration(stateId: string, configurationId: string, request: ConfigurationStateExecuteRequest): Observable<FlowStateExecutionResult>;
189
+ /**
190
+ * Save stateful configuration
191
+ * @param stateId string
192
+ * @param configurationId string
193
+ */
194
+ saveConfiguration(stateId: string, configurationId: string): Observable<{
195
+ quoteId: string;
196
+ }>;
197
+ /**
198
+ * Cancel stateful configuration
199
+ * @param stateId string
200
+ * @param configurationId string
201
+ */
202
+ cancelConfiguration(stateId: string, configurationId: string): Observable<void>;
203
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowStateApiService, never>;
204
+ static ɵprov: i0.ɵɵInjectableDeclaration<FlowStateApiService>;
205
+ }
206
+
207
+ declare class OffersApiService {
208
+ private baseHttpService;
209
+ static MAX_RESULTS: number;
210
+ private readonly serviceUrl;
211
+ constructor(baseHttpService: BaseHttpService);
212
+ createOffer$(body: NewOffer): Observable<Offer>;
213
+ fetchOffers$(): Observable<Offer[]>;
214
+ fetchOffer$(id: string): Observable<Offer>;
215
+ updateOffer$(offer: Offer): Observable<Offer>;
216
+ removeOffer$(id: string): Observable<void>;
217
+ searchOffers$(expression: Expression, skip: number, count: number): Observable<Offer[]>;
218
+ fetchOfferProducts$(id: string): Observable<OfferProduct[]>;
219
+ upsertOfferProducts$(id: string, products: (OfferProduct | NewOfferProduct)[]): Observable<OfferProduct[]>;
220
+ static ɵfac: i0.ɵɵFactoryDeclaration<OffersApiService, never>;
221
+ static ɵprov: i0.ɵɵInjectableDeclaration<OffersApiService>;
222
+ }
223
+
224
+ declare class OrgInfoApiService {
225
+ private messageService;
226
+ constructor(messageService: MessageService);
227
+ getOrgInfo$(): Observable<OrgInfo | undefined>;
228
+ getAvailableVersionsInfo$(): Observable<AvailableVersionsInfo | undefined>;
229
+ upgradeVersion$(targetVersion: string): Observable<OrgInfo | undefined>;
230
+ /**
231
+ * Shows an error message using the message service.
232
+ *
233
+ * @param {string} message - the error message to be published.
234
+ */
235
+ private publishErrorMessage;
236
+ static ɵfac: i0.ɵɵFactoryDeclaration<OrgInfoApiService, never>;
237
+ static ɵprov: i0.ɵɵInjectableDeclaration<OrgInfoApiService>;
238
+ }
239
+
240
+ declare class PortalsApiService {
241
+ private baseHttpService;
242
+ static MAX_RESULTS: number;
243
+ private readonly serviceUrl;
244
+ constructor(baseHttpService: BaseHttpService);
245
+ createNewPortal$(body: NewPortal): Observable<Portal>;
246
+ updatePortal$(portal: Portal, settings: PortalCustomization): Observable<Portal>;
247
+ getPortals$: (skip?: number, name?: string) => Observable<Portal[]>;
248
+ searchPortals$: (skip?: number, expression?: Expression) => Observable<Portal[]>;
249
+ removePortal$: (id: string) => Observable<string>;
250
+ restore$: (id: string) => Observable<void>;
251
+ duplicatePortal$: (cloneRequest: CloneRequest) => Observable<string>;
252
+ getPortal$: (id: string) => Observable<Portal>;
253
+ static ɵfac: i0.ɵɵFactoryDeclaration<PortalsApiService, never>;
254
+ static ɵprov: i0.ɵɵInjectableDeclaration<PortalsApiService>;
255
+ }
256
+
257
+ declare class PromotionsApiService {
258
+ private baseHttpService;
259
+ private readonly serviceUrl;
260
+ constructor(baseHttpService: BaseHttpService);
261
+ fetchAll$: () => Observable<Promotion>;
262
+ search$(expression: Expression, skip?: number, count?: number): Observable<Promotion[]>;
263
+ fetchOne$: (id: string) => Observable<Promotion>;
264
+ create$(body: NewPromotion): Observable<Promotion>;
265
+ update$(body: Promotion): Observable<Promotion>;
266
+ remove$: (id: string) => Observable<string>;
267
+ restore$: (id: string) => Observable<void>;
268
+ duplicate$: (body: CloneRequest) => Observable<string>;
269
+ static ɵfac: i0.ɵɵFactoryDeclaration<PromotionsApiService, never>;
270
+ static ɵprov: i0.ɵɵInjectableDeclaration<PromotionsApiService>;
271
+ }
272
+
273
+ declare class RebateProgramApiService {
274
+ private baseHttpService;
275
+ private readonly serviceUrl;
276
+ constructor(baseHttpService: BaseHttpService);
277
+ fetchAll$: () => Observable<RebateProgram[]>;
278
+ search$(expression: Expression, skip?: number, count?: number): Observable<RebateProgram[]>;
279
+ fetchOne$: (id: string) => Observable<RebateProgram>;
280
+ create$(body: NewRebateProgram): Observable<RebateProgram>;
281
+ update$(body: RebateProgram): Observable<RebateProgram>;
282
+ remove$: (id: string) => Observable<string>;
283
+ restore$: (id: string) => Observable<void>;
284
+ duplicate$: (body: CloneRequest) => Observable<string>;
285
+ static ɵfac: i0.ɵɵFactoryDeclaration<RebateProgramApiService, never>;
286
+ static ɵprov: i0.ɵɵInjectableDeclaration<RebateProgramApiService>;
287
+ }
288
+
289
+ declare class RebateTypeApiService {
290
+ private baseHttpService;
291
+ private readonly serviceUrl;
292
+ constructor(baseHttpService: BaseHttpService);
293
+ fetchAll$: () => Observable<RebateType>;
294
+ search$(expression: Expression, skip?: number, count?: number): Observable<RebateType[]>;
295
+ fetchOne$: (id: string) => Observable<RebateType>;
296
+ create$(body: NewRebateType): Observable<RebateType>;
297
+ update$(body: RebateType): Observable<RebateType>;
298
+ remove$: (id: string) => Observable<string>;
299
+ restore$: (id: string) => Observable<void>;
300
+ duplicate$: (body: CloneRequest) => Observable<string>;
301
+ static ɵfac: i0.ɵɵFactoryDeclaration<RebateTypeApiService, never>;
302
+ static ɵprov: i0.ɵɵInjectableDeclaration<RebateTypeApiService>;
303
+ }
304
+
305
+ declare class SandboxManagerApiService {
306
+ private messageService;
307
+ constructor(messageService: MessageService);
308
+ getSalesforceOrganizations$(): Observable<SalesforceOrganization[]>;
309
+ getAvailableSalesforceOrganizationSizes$(): Observable<Dictionary<number>>;
310
+ createSalesforceOrganization$(payload: NewSalesforceOrganization): Observable<SalesforceOrganization | undefined>;
311
+ updateSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
312
+ deleteSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
313
+ activateSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
314
+ deactivateSalesforceOrganization$(payload: SalesforceOrganization): Observable<SalesforceOrganization | undefined>;
315
+ /**
316
+ * Shows an error message using the message service.
317
+ *
318
+ * @param {string} message - the error message to be published.
319
+ */
320
+ private publishErrorMessage;
321
+ static ɵfac: i0.ɵɵFactoryDeclaration<SandboxManagerApiService, never>;
322
+ static ɵprov: i0.ɵɵInjectableDeclaration<SandboxManagerApiService>;
323
+ }
324
+
325
+ interface ConfigurationProcessorOverride {
326
+ name: string;
327
+ script: string;
328
+ }
329
+ interface StatefulConfigurationRequest {
330
+ item: unknown;
331
+ actions?: ConfigurationProcessorOverride[];
332
+ selectors?: ConfigurationProcessorOverride[];
333
+ }
334
+
335
+ declare class StatefulConfigurationApiService {
336
+ private httpService;
337
+ private readonly SERVICE_URL;
338
+ constructor(httpService: BaseHttpService);
339
+ /**
340
+ * Initialize configuration state
341
+ * @param request Request
342
+ * @returns ID of new configuration state
343
+ */
344
+ init(request: StatefulConfigurationRequest): Observable<string>;
345
+ /**
346
+ * Get existing state by ID
347
+ * @param id ID
348
+ * @returns Configuration State
349
+ */
350
+ get(id: string): Observable<QuoteDraft>;
351
+ /**
352
+ * Execute actions/selectors
353
+ * @param id State ID
354
+ * @param request Request
355
+ * @returns Execute result
356
+ */
357
+ execute(id: string, request: ConfigurationExecuteRequest): Observable<ConfigurationExecuteResponse>;
358
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatefulConfigurationApiService, never>;
359
+ static ɵprov: i0.ɵɵInjectableDeclaration<StatefulConfigurationApiService>;
360
+ }
361
+
362
+ /**
363
+ * Parses the response from Canvas and checks for errors.
364
+ * - If an error is found, publishes an error message and returns the failover value.
365
+ * - If no error is found, returns the parsed response.
366
+ *
367
+ * Note! The API call first goes to APEX before reaching the Canvas, so errors can originate from either APEX or Canvas.
368
+ *
369
+ * @param {string} response - The JSON string response from the Canvas call.
370
+ * @param {T} failover - The value to return in case of error.
371
+ * @returns {T | K} The parsed response or the failover value.
372
+ *
373
+ * @template T The expected type of the parsed response.
374
+ * @template K The type of the failover value.
375
+ *
376
+ * @remarks If there's an Apex error, the response data can be an array.
377
+ * In such cases, the function extracts the first element of the array.
378
+ */
379
+ declare const handleCanvasResponse: <T, K>(response: string, failover: K, errorPublisher: (message: string) => void) => T | K;
380
+
381
+ export { AccountApiService, ApiModule, ContractedPriceApiService, FlowStateApiService, OffersApiService, OrgInfoApiService, PortalsApiService, PromotionsApiService, RebateProgramApiService, RebateTypeApiService, SandboxManagerApiService, StatefulConfigurationApiService, VeloceAuthService, handleCanvasResponse };
382
+ export type { AvailableVersionsInfo, CalculateDeltaRequest, CloneRequest, ComponentVersionInfo, OrgInfo, QuerySearchParams, VeloceAuthResponse, VersionInfo };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@veloceapps/api",
3
- "version": "12.0.0-13",
3
+ "version": "12.0.0-15",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
- "@angular/common": "~15.2.0",
7
- "@angular/core": "~15.2.0",
8
- "@veloceapps/core": "^11.0.0-0",
6
+ "@angular/common": "~20.1.4",
7
+ "@angular/core": "~20.1.4",
8
+ "@veloceapps/core": "12.0.0-0",
9
9
  "lodash": "^4.17.21",
10
10
  "moment": "^2.29.1",
11
11
  "rxjs": "~7.8.0"
@@ -17,11 +17,7 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
- "module": "fesm2015/veloceapps-api.mjs",
21
- "es2020": "fesm2020/veloceapps-api.mjs",
22
- "esm2020": "esm2020/veloceapps-api.mjs",
23
- "fesm2020": "fesm2020/veloceapps-api.mjs",
24
- "fesm2015": "fesm2015/veloceapps-api.mjs",
20
+ "module": "fesm2022/veloceapps-api.mjs",
25
21
  "typings": "index.d.ts",
26
22
  "exports": {
27
23
  "./package.json": {
@@ -29,19 +25,11 @@
29
25
  },
30
26
  ".": {
31
27
  "types": "./index.d.ts",
32
- "esm2020": "./esm2020/veloceapps-api.mjs",
33
- "es2020": "./fesm2020/veloceapps-api.mjs",
34
- "es2015": "./fesm2015/veloceapps-api.mjs",
35
- "node": "./fesm2015/veloceapps-api.mjs",
36
- "default": "./fesm2020/veloceapps-api.mjs"
28
+ "default": "./fesm2022/veloceapps-api.mjs"
37
29
  },
38
30
  "./v2": {
39
31
  "types": "./v2/index.d.ts",
40
- "esm2020": "./esm2020/v2/veloceapps-api-v2.mjs",
41
- "es2020": "./fesm2020/veloceapps-api-v2.mjs",
42
- "es2015": "./fesm2015/veloceapps-api-v2.mjs",
43
- "node": "./fesm2015/veloceapps-api-v2.mjs",
44
- "default": "./fesm2020/veloceapps-api-v2.mjs"
32
+ "default": "./fesm2022/veloceapps-api-v2.mjs"
45
33
  }
46
34
  }
47
35
  }