@vulog/aima-user 1.2.4 → 1.2.5
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/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -2
- package/dist/index.mjs +1 -2
- package/package.json +4 -4
- package/src/types.ts +0 -1
- package/src/updateProfilePersonalInfo.ts +2 -2
- package/src/updateUserPersonalInfo.ts +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -91,7 +91,7 @@ type User = {
|
|
|
91
91
|
};
|
|
92
92
|
type UserUpdateBody = Partial<Omit<User, 'id' | 'fleetId' | 'agreements' | 'profiles' | 'surveyConsentUpdateDate' | 'shareDataConsentUpdateDate' | 'profilingConsentUpdateDate'>>;
|
|
93
93
|
declare const personalInformationUserTypes: readonly ["IDENTITY", "USERNAME", "BIRTH", "NATIONALITY", "NOTES", "GENDER", "PERSONAL_COMPANY", "FISCAL", "ADDRESS", "MEMBERSHIP"];
|
|
94
|
-
declare const personalInformationUserPaths: readonly ["/identity/firstName", "/identity/lastName", "/identity/middleName", "/identity/preferredName", "/birth/birthDate", "/birth/countryBirth", "/birth/provinceBirth", "/birth/cityBirth", "/nationality", "/notes", "/gender", "/personalCompany/companyName", "/personalCompany/companyVat", "/personalCompany/companyAddress/streetName", "/personalCompany/companyAddress/city", "/personalCompany/companyAddress/postalCode", "/personalCompany/companyAddress/region", "/personalCompany/companyAddress/country", "/personalCompany/companyAddress/number", "/personalCompany/companyAddress/addressAdditionalInformation", "/fiscalInformation/fiscal", "/fiscalInformation/personalVatNumber", "/fiscalInformation/sdi", "/fiscalInformation/pecAddress", "/fiscalInformation/marketReference", "/address/streetName", "/address/city", "/address/postalCode", "/address/region", "/address/country", "/address/number", "/address/addressAdditionalInformation", "/membership"
|
|
94
|
+
declare const personalInformationUserPaths: readonly ["/identity/firstName", "/identity/lastName", "/identity/middleName", "/identity/preferredName", "/birth/birthDate", "/birth/countryBirth", "/birth/provinceBirth", "/birth/cityBirth", "/nationality", "/notes", "/gender", "/personalCompany/companyName", "/personalCompany/companyVat", "/personalCompany/companyAddress/streetName", "/personalCompany/companyAddress/city", "/personalCompany/companyAddress/postalCode", "/personalCompany/companyAddress/region", "/personalCompany/companyAddress/country", "/personalCompany/companyAddress/number", "/personalCompany/companyAddress/addressAdditionalInformation", "/fiscalInformation/fiscal", "/fiscalInformation/personalVatNumber", "/fiscalInformation/sdi", "/fiscalInformation/pecAddress", "/fiscalInformation/marketReference", "/address/streetName", "/address/city", "/address/postalCode", "/address/region", "/address/country", "/address/number", "/address/addressAdditionalInformation", "/membership"];
|
|
95
95
|
type PersonalInformationUserType = (typeof personalInformationUserTypes)[number];
|
|
96
96
|
declare const personalInformationUserTypeSchema: z.ZodEnum<["IDENTITY", "USERNAME", "BIRTH", "NATIONALITY", "NOTES", "GENDER", "PERSONAL_COMPANY", "FISCAL", "ADDRESS", "MEMBERSHIP"]>;
|
|
97
97
|
declare const personalInformationProfileTypes: readonly ["ID_NUMBER", "PHONE_NUMBER", "EMAIL", "BILLING_ADDRESS"];
|
|
@@ -262,13 +262,13 @@ declare const setServicesStatus: (client: Client, profileId: string, servicesUpd
|
|
|
262
262
|
declare const registerUserToService: (client: Client, entityId: string, serviceId: string) => Promise<void>;
|
|
263
263
|
|
|
264
264
|
declare const paths: readonly ["/phoneNumber", "/email", "/idNumber"];
|
|
265
|
-
type
|
|
266
|
-
declare const updateProfilePersonalInfo: (client: Client, userId: string, profileId: string, actions: PatchAction<
|
|
265
|
+
type ProfilePaths = (typeof paths)[number];
|
|
266
|
+
declare const updateProfilePersonalInfo: (client: Client, userId: string, profileId: string, actions: PatchAction<ProfilePaths>[]) => Promise<void>;
|
|
267
267
|
|
|
268
268
|
declare const updateUser: (client: Client, id: string, user: UserUpdateBody) => Promise<User>;
|
|
269
269
|
|
|
270
|
-
type
|
|
271
|
-
declare const updateUserPersonalInfo: (client: Client, userId: string, actions: PatchAction<
|
|
270
|
+
type UserPaths = (typeof personalInformationUserPaths)[number];
|
|
271
|
+
declare const updateUserPersonalInfo: (client: Client, userId: string, actions: PatchAction<UserPaths>[]) => Promise<void>;
|
|
272
272
|
|
|
273
273
|
declare const getEntity: (client: Client, entityId: string) => Promise<Entity>;
|
|
274
274
|
|
|
@@ -276,4 +276,4 @@ declare const getFleetBillingGroups: (client: Client, options?: PaginableOptions
|
|
|
276
276
|
|
|
277
277
|
declare const getUsersByIds: (client: Client, ids: string[]) => Promise<User[]>;
|
|
278
278
|
|
|
279
|
-
export { type AccountStatus, type Address, type BillingGroup, type CreateBusinessProfile, type CreateUser, type CreateUserOptions, type Entity, type FiscalInformation, type IndividualBusiness, type Label, type PersonalCompany, type PersonalInformationBirth, type PersonalInformationIdentity, type PersonalInformationProfile, type PersonalInformationProfileType, type PersonalInformationUser, type PersonalInformationUserType, type Profile, type ProfileServiceRegistration, type ProfileStatus, type ProfileType, type ResponseFind, type SearchType, type ServiceRegistrationWithReason, type ServiceStatus, type ServicesRegistrationList, type ServicesUpdate, type User, type UserAgreement, type UserFull, type UserProfile, type UserServiceRegistration, type UserUpdateBody, acceptTAndC, accountStatus, addLabelForUser, assignBillingGroup, createBusinessProfile, createUser, findUser, getEntity, getFleetBillingGroups, getLabelsForUser, getProfilePersonalInfoById, getRegistrationOverview, getUserById, getUserPersonalInfoById, getUsersByIds, getUsersPIByIds, personalInformationProfileTypeSchema, personalInformationProfileTypes, personalInformationUserPaths, personalInformationUserTypeSchema, personalInformationUserTypes, registerUserToService, removeLabelForUser, setServicesStatus, updateProfilePersonalInfo, updateUser, updateUserPersonalInfo };
|
|
279
|
+
export { type AccountStatus, type Address, type BillingGroup, type CreateBusinessProfile, type CreateUser, type CreateUserOptions, type Entity, type FiscalInformation, type IndividualBusiness, type Label, type PersonalCompany, type PersonalInformationBirth, type PersonalInformationIdentity, type PersonalInformationProfile, type PersonalInformationProfileType, type PersonalInformationUser, type PersonalInformationUserType, type Profile, type ProfilePaths, type ProfileServiceRegistration, type ProfileStatus, type ProfileType, type ResponseFind, type SearchType, type ServiceRegistrationWithReason, type ServiceStatus, type ServicesRegistrationList, type ServicesUpdate, type User, type UserAgreement, type UserFull, type UserPaths, type UserProfile, type UserServiceRegistration, type UserUpdateBody, acceptTAndC, accountStatus, addLabelForUser, assignBillingGroup, createBusinessProfile, createUser, findUser, getEntity, getFleetBillingGroups, getLabelsForUser, getProfilePersonalInfoById, getRegistrationOverview, getUserById, getUserPersonalInfoById, getUsersByIds, getUsersPIByIds, personalInformationProfileTypeSchema, personalInformationProfileTypes, personalInformationUserPaths, personalInformationUserTypeSchema, personalInformationUserTypes, registerUserToService, removeLabelForUser, setServicesStatus, updateProfilePersonalInfo, updateUser, updateUserPersonalInfo };
|
package/dist/index.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ type User = {
|
|
|
91
91
|
};
|
|
92
92
|
type UserUpdateBody = Partial<Omit<User, 'id' | 'fleetId' | 'agreements' | 'profiles' | 'surveyConsentUpdateDate' | 'shareDataConsentUpdateDate' | 'profilingConsentUpdateDate'>>;
|
|
93
93
|
declare const personalInformationUserTypes: readonly ["IDENTITY", "USERNAME", "BIRTH", "NATIONALITY", "NOTES", "GENDER", "PERSONAL_COMPANY", "FISCAL", "ADDRESS", "MEMBERSHIP"];
|
|
94
|
-
declare const personalInformationUserPaths: readonly ["/identity/firstName", "/identity/lastName", "/identity/middleName", "/identity/preferredName", "/birth/birthDate", "/birth/countryBirth", "/birth/provinceBirth", "/birth/cityBirth", "/nationality", "/notes", "/gender", "/personalCompany/companyName", "/personalCompany/companyVat", "/personalCompany/companyAddress/streetName", "/personalCompany/companyAddress/city", "/personalCompany/companyAddress/postalCode", "/personalCompany/companyAddress/region", "/personalCompany/companyAddress/country", "/personalCompany/companyAddress/number", "/personalCompany/companyAddress/addressAdditionalInformation", "/fiscalInformation/fiscal", "/fiscalInformation/personalVatNumber", "/fiscalInformation/sdi", "/fiscalInformation/pecAddress", "/fiscalInformation/marketReference", "/address/streetName", "/address/city", "/address/postalCode", "/address/region", "/address/country", "/address/number", "/address/addressAdditionalInformation", "/membership"
|
|
94
|
+
declare const personalInformationUserPaths: readonly ["/identity/firstName", "/identity/lastName", "/identity/middleName", "/identity/preferredName", "/birth/birthDate", "/birth/countryBirth", "/birth/provinceBirth", "/birth/cityBirth", "/nationality", "/notes", "/gender", "/personalCompany/companyName", "/personalCompany/companyVat", "/personalCompany/companyAddress/streetName", "/personalCompany/companyAddress/city", "/personalCompany/companyAddress/postalCode", "/personalCompany/companyAddress/region", "/personalCompany/companyAddress/country", "/personalCompany/companyAddress/number", "/personalCompany/companyAddress/addressAdditionalInformation", "/fiscalInformation/fiscal", "/fiscalInformation/personalVatNumber", "/fiscalInformation/sdi", "/fiscalInformation/pecAddress", "/fiscalInformation/marketReference", "/address/streetName", "/address/city", "/address/postalCode", "/address/region", "/address/country", "/address/number", "/address/addressAdditionalInformation", "/membership"];
|
|
95
95
|
type PersonalInformationUserType = (typeof personalInformationUserTypes)[number];
|
|
96
96
|
declare const personalInformationUserTypeSchema: z.ZodEnum<["IDENTITY", "USERNAME", "BIRTH", "NATIONALITY", "NOTES", "GENDER", "PERSONAL_COMPANY", "FISCAL", "ADDRESS", "MEMBERSHIP"]>;
|
|
97
97
|
declare const personalInformationProfileTypes: readonly ["ID_NUMBER", "PHONE_NUMBER", "EMAIL", "BILLING_ADDRESS"];
|
|
@@ -262,13 +262,13 @@ declare const setServicesStatus: (client: Client, profileId: string, servicesUpd
|
|
|
262
262
|
declare const registerUserToService: (client: Client, entityId: string, serviceId: string) => Promise<void>;
|
|
263
263
|
|
|
264
264
|
declare const paths: readonly ["/phoneNumber", "/email", "/idNumber"];
|
|
265
|
-
type
|
|
266
|
-
declare const updateProfilePersonalInfo: (client: Client, userId: string, profileId: string, actions: PatchAction<
|
|
265
|
+
type ProfilePaths = (typeof paths)[number];
|
|
266
|
+
declare const updateProfilePersonalInfo: (client: Client, userId: string, profileId: string, actions: PatchAction<ProfilePaths>[]) => Promise<void>;
|
|
267
267
|
|
|
268
268
|
declare const updateUser: (client: Client, id: string, user: UserUpdateBody) => Promise<User>;
|
|
269
269
|
|
|
270
|
-
type
|
|
271
|
-
declare const updateUserPersonalInfo: (client: Client, userId: string, actions: PatchAction<
|
|
270
|
+
type UserPaths = (typeof personalInformationUserPaths)[number];
|
|
271
|
+
declare const updateUserPersonalInfo: (client: Client, userId: string, actions: PatchAction<UserPaths>[]) => Promise<void>;
|
|
272
272
|
|
|
273
273
|
declare const getEntity: (client: Client, entityId: string) => Promise<Entity>;
|
|
274
274
|
|
|
@@ -276,4 +276,4 @@ declare const getFleetBillingGroups: (client: Client, options?: PaginableOptions
|
|
|
276
276
|
|
|
277
277
|
declare const getUsersByIds: (client: Client, ids: string[]) => Promise<User[]>;
|
|
278
278
|
|
|
279
|
-
export { type AccountStatus, type Address, type BillingGroup, type CreateBusinessProfile, type CreateUser, type CreateUserOptions, type Entity, type FiscalInformation, type IndividualBusiness, type Label, type PersonalCompany, type PersonalInformationBirth, type PersonalInformationIdentity, type PersonalInformationProfile, type PersonalInformationProfileType, type PersonalInformationUser, type PersonalInformationUserType, type Profile, type ProfileServiceRegistration, type ProfileStatus, type ProfileType, type ResponseFind, type SearchType, type ServiceRegistrationWithReason, type ServiceStatus, type ServicesRegistrationList, type ServicesUpdate, type User, type UserAgreement, type UserFull, type UserProfile, type UserServiceRegistration, type UserUpdateBody, acceptTAndC, accountStatus, addLabelForUser, assignBillingGroup, createBusinessProfile, createUser, findUser, getEntity, getFleetBillingGroups, getLabelsForUser, getProfilePersonalInfoById, getRegistrationOverview, getUserById, getUserPersonalInfoById, getUsersByIds, getUsersPIByIds, personalInformationProfileTypeSchema, personalInformationProfileTypes, personalInformationUserPaths, personalInformationUserTypeSchema, personalInformationUserTypes, registerUserToService, removeLabelForUser, setServicesStatus, updateProfilePersonalInfo, updateUser, updateUserPersonalInfo };
|
|
279
|
+
export { type AccountStatus, type Address, type BillingGroup, type CreateBusinessProfile, type CreateUser, type CreateUserOptions, type Entity, type FiscalInformation, type IndividualBusiness, type Label, type PersonalCompany, type PersonalInformationBirth, type PersonalInformationIdentity, type PersonalInformationProfile, type PersonalInformationProfileType, type PersonalInformationUser, type PersonalInformationUserType, type Profile, type ProfilePaths, type ProfileServiceRegistration, type ProfileStatus, type ProfileType, type ResponseFind, type SearchType, type ServiceRegistrationWithReason, type ServiceStatus, type ServicesRegistrationList, type ServicesUpdate, type User, type UserAgreement, type UserFull, type UserPaths, type UserProfile, type UserServiceRegistration, type UserUpdateBody, acceptTAndC, accountStatus, addLabelForUser, assignBillingGroup, createBusinessProfile, createUser, findUser, getEntity, getFleetBillingGroups, getLabelsForUser, getProfilePersonalInfoById, getRegistrationOverview, getUserById, getUserPersonalInfoById, getUsersByIds, getUsersPIByIds, personalInformationProfileTypeSchema, personalInformationProfileTypes, personalInformationUserPaths, personalInformationUserTypeSchema, personalInformationUserTypes, registerUserToService, removeLabelForUser, setServicesStatus, updateProfilePersonalInfo, updateUser, updateUserPersonalInfo };
|
package/dist/index.js
CHANGED
|
@@ -207,8 +207,7 @@ var personalInformationUserPaths = [
|
|
|
207
207
|
"/address/country",
|
|
208
208
|
"/address/number",
|
|
209
209
|
"/address/addressAdditionalInformation",
|
|
210
|
-
"/membership"
|
|
211
|
-
"/idNumber"
|
|
210
|
+
"/membership"
|
|
212
211
|
];
|
|
213
212
|
var personalInformationUserTypeSchema = import_zod5.z.enum(personalInformationUserTypes);
|
|
214
213
|
var personalInformationProfileTypes = ["ID_NUMBER", "PHONE_NUMBER", "EMAIL", "BILLING_ADDRESS"];
|
package/dist/index.mjs
CHANGED
|
@@ -155,8 +155,7 @@ var personalInformationUserPaths = [
|
|
|
155
155
|
"/address/country",
|
|
156
156
|
"/address/number",
|
|
157
157
|
"/address/addressAdditionalInformation",
|
|
158
|
-
"/membership"
|
|
159
|
-
"/idNumber"
|
|
158
|
+
"/membership"
|
|
160
159
|
];
|
|
161
160
|
var personalInformationUserTypeSchema = z5.enum(personalInformationUserTypes);
|
|
162
161
|
var personalInformationProfileTypes = ["ID_NUMBER", "PHONE_NUMBER", "EMAIL", "BILLING_ADDRESS"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vulog/aima-user",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"author": "Vulog",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@vulog/aima-client": "1.2.
|
|
23
|
-
"@vulog/aima-config": "1.2.
|
|
24
|
-
"@vulog/aima-core": "1.2.
|
|
22
|
+
"@vulog/aima-client": "1.2.5",
|
|
23
|
+
"@vulog/aima-config": "1.2.5",
|
|
24
|
+
"@vulog/aima-core": "1.2.5"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"zod": "^3.25.76"
|
package/src/types.ts
CHANGED
|
@@ -162,7 +162,6 @@ export const personalInformationUserPaths = [
|
|
|
162
162
|
'/address/number',
|
|
163
163
|
'/address/addressAdditionalInformation',
|
|
164
164
|
'/membership',
|
|
165
|
-
'/idNumber',
|
|
166
165
|
] as const;
|
|
167
166
|
|
|
168
167
|
export type PersonalInformationUserType = (typeof personalInformationUserTypes)[number];
|
|
@@ -3,7 +3,7 @@ import { PatchAction } from '@vulog/aima-core';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
const paths = ['/phoneNumber', '/email', '/idNumber'] as const;
|
|
6
|
-
type
|
|
6
|
+
export type ProfilePaths = (typeof paths)[number];
|
|
7
7
|
|
|
8
8
|
const schema = z.object({
|
|
9
9
|
userId: z.string().trim().min(1).uuid(),
|
|
@@ -29,7 +29,7 @@ export const updateProfilePersonalInfo = async (
|
|
|
29
29
|
client: Client,
|
|
30
30
|
userId: string,
|
|
31
31
|
profileId: string,
|
|
32
|
-
actions: PatchAction<
|
|
32
|
+
actions: PatchAction<ProfilePaths>[]
|
|
33
33
|
): Promise<void> => {
|
|
34
34
|
const result = schema.safeParse({ userId, profileId, actions });
|
|
35
35
|
if (!result.success) {
|
|
@@ -4,7 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
|
|
5
5
|
import { personalInformationUserPaths } from './types';
|
|
6
6
|
|
|
7
|
-
type
|
|
7
|
+
export type UserPaths = (typeof personalInformationUserPaths)[number];
|
|
8
8
|
|
|
9
9
|
const schema = z.object({
|
|
10
10
|
userId: z.string().trim().min(1).uuid(),
|
|
@@ -28,7 +28,7 @@ const schema = z.object({
|
|
|
28
28
|
export const updateUserPersonalInfo = async (
|
|
29
29
|
client: Client,
|
|
30
30
|
userId: string,
|
|
31
|
-
actions: PatchAction<
|
|
31
|
+
actions: PatchAction<UserPaths>[]
|
|
32
32
|
): Promise<void> => {
|
|
33
33
|
const result = schema.safeParse({ userId, actions });
|
|
34
34
|
if (!result.success) {
|