@visma-swno/customer-onboarding-wizard 1.0.8 → 1.0.10
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/dist/components/customer-onboarding-wizard/customer-onboarding-wizard.d.ts +5 -5
- package/dist/components/customer-onboarding-wizard/wizard-step1-company.d.ts +4 -3
- package/dist/core/http.service.d.ts +42 -23
- package/dist/core/i18n.service.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +380 -339
- package/package.json +1 -1
|
@@ -13,7 +13,8 @@ export declare class CustomerOnboardingWizard extends LitElement {
|
|
|
13
13
|
private currentStep;
|
|
14
14
|
private completedSteps;
|
|
15
15
|
private errorState;
|
|
16
|
-
private
|
|
16
|
+
private customer;
|
|
17
|
+
private customerSubscriptions;
|
|
17
18
|
private visible;
|
|
18
19
|
private i18n;
|
|
19
20
|
private httpService;
|
|
@@ -51,11 +52,10 @@ export declare class CustomerOnboardingWizard extends LitElement {
|
|
|
51
52
|
*/
|
|
52
53
|
private loadUserProfile;
|
|
53
54
|
/**
|
|
54
|
-
* Load customer
|
|
55
|
-
*
|
|
56
|
-
* Falls back to null if request fails or customerId is not provided
|
|
55
|
+
* Load customer data from API (details and subscriptions in parallel)
|
|
56
|
+
* Falls back gracefully if customerId is missing or requests fail
|
|
57
57
|
*/
|
|
58
|
-
private
|
|
58
|
+
private loadCustomerData;
|
|
59
59
|
/**
|
|
60
60
|
* Update authentication token
|
|
61
61
|
* Call this method from host application to update token (e.g., after refresh)
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import { Translations, SupportedLocale } from '../../core/i18n.service';
|
|
3
|
-
import {
|
|
3
|
+
import { CustomerResponse, CustomerSubscriptionResponse } from '../../core/http.service';
|
|
4
4
|
/**
|
|
5
5
|
* Company Step Component
|
|
6
|
-
* Displays customer company information including contact, subscriptions, and partner details
|
|
6
|
+
* Displays customer company information including contact, subscriptions, and partner details.
|
|
7
7
|
*/
|
|
8
8
|
export declare class WizardStep1Company extends LitElement {
|
|
9
9
|
translations: Translations;
|
|
10
10
|
locale: SupportedLocale;
|
|
11
|
-
|
|
11
|
+
customer: CustomerResponse | null;
|
|
12
|
+
subscriptions: CustomerSubscriptionResponse;
|
|
12
13
|
private editingContact;
|
|
13
14
|
private countryDropdownOpen;
|
|
14
15
|
private fieldErrors;
|
|
@@ -23,24 +23,33 @@ export interface UserProfile {
|
|
|
23
23
|
lastName: string;
|
|
24
24
|
email: string;
|
|
25
25
|
}
|
|
26
|
-
export interface
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
export interface CustomerResponse {
|
|
27
|
+
customerId: string;
|
|
28
|
+
idContextParent: string;
|
|
29
|
+
countryCode: string;
|
|
30
|
+
name: string;
|
|
31
|
+
organizationNumber: string;
|
|
32
|
+
address1: string;
|
|
33
|
+
address2: string;
|
|
34
|
+
postalCode: string;
|
|
35
|
+
city: string;
|
|
36
|
+
telephone: string;
|
|
37
|
+
emailAddress: string;
|
|
38
|
+
webAddress: string;
|
|
39
|
+
}
|
|
40
|
+
export interface SubscriptionProduct {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
}
|
|
44
|
+
export interface CustomerSubscription {
|
|
45
|
+
subscriptionId: string;
|
|
46
|
+
partnerId: string;
|
|
47
|
+
partnerName: string;
|
|
48
|
+
products: SubscriptionProduct[];
|
|
49
|
+
}
|
|
50
|
+
export interface CustomerSubscriptionResponse {
|
|
51
|
+
content: CustomerSubscription[];
|
|
52
|
+
totalNumberOfRecords: number;
|
|
44
53
|
}
|
|
45
54
|
export interface Administrator {
|
|
46
55
|
email: string;
|
|
@@ -161,11 +170,19 @@ export declare class HttpService {
|
|
|
161
170
|
delete<T>(endpoint: string, headers?: Record<string, string>): Promise<T>;
|
|
162
171
|
getUserProfile(): Promise<UserProfile>;
|
|
163
172
|
/**
|
|
164
|
-
* Get customer
|
|
173
|
+
* Get customer details by ID
|
|
174
|
+
* GET /api/v1/customers/{customerId}
|
|
165
175
|
* @param customerId - The customer ID
|
|
166
|
-
* @returns Promise with customer
|
|
176
|
+
* @returns Promise with customer details
|
|
167
177
|
*/
|
|
168
|
-
|
|
178
|
+
getCustomer(customerId: string): Promise<CustomerResponse>;
|
|
179
|
+
/**
|
|
180
|
+
* Get subscriptions for a customer
|
|
181
|
+
* GET /api/v1/customers/{customerId}/subscriptions
|
|
182
|
+
* @param customerId - The customer ID
|
|
183
|
+
* @returns Promise with customer subscriptions
|
|
184
|
+
*/
|
|
185
|
+
getCustomerSubscriptions(customerId: string): Promise<CustomerSubscriptionResponse>;
|
|
169
186
|
/**
|
|
170
187
|
* Get administrators for a customer
|
|
171
188
|
* @param customerId - The customer ID
|
|
@@ -200,7 +217,7 @@ export declare class HttpService {
|
|
|
200
217
|
getUserByEmail(email: string): Promise<UserByEmailResponse | null>;
|
|
201
218
|
/**
|
|
202
219
|
* Add administrators to a customer account
|
|
203
|
-
* POST /api/v1/
|
|
220
|
+
* POST /api/v1/customers/{customerId}/administrators
|
|
204
221
|
* @param customerId - The customer ID
|
|
205
222
|
* @param admins - Array of administrator data (email, firstName, lastName, languageCode)
|
|
206
223
|
*/
|
|
@@ -213,9 +230,11 @@ export declare class HttpService {
|
|
|
213
230
|
getPartnerConsultants(partnerId: string): Promise<ConsultantsResponse>;
|
|
214
231
|
/**
|
|
215
232
|
* Add consultants to a customer
|
|
233
|
+
* POST /api/v1/customers/{customerId}/partners/{partnerId}/consultants
|
|
216
234
|
* @param customerId - The customer ID
|
|
235
|
+
* @param partnerId - The partner ID
|
|
217
236
|
* @param consultants - Array of consultant data
|
|
218
237
|
*/
|
|
219
|
-
addCustomerConsultants(customerId: string, consultants: Consultant[]): Promise<unknown>;
|
|
238
|
+
addCustomerConsultants(customerId: string, partnerId: string, consultants: Consultant[]): Promise<unknown>;
|
|
220
239
|
patch<T>(endpoint: string, body: any, headers?: Record<string, string>): Promise<T>;
|
|
221
240
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from './components/customer-onboarding-wizard/customer-onboarding-wizard';
|
|
2
2
|
export { HttpService } from './core/http.service';
|
|
3
|
-
export type { HttpErrorDetail, ErrorMessageDetail, RequestConfig, UserProfile,
|
|
3
|
+
export type { HttpErrorDetail, ErrorMessageDetail, RequestConfig, UserProfile, CustomerResponse, CustomerSubscription, CustomerSubscriptionResponse, SubscriptionProduct, } from './core/http.service';
|