@voyant-travel/identity-react 0.119.1
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/LICENSE +201 -0
- package/README.md +39 -0
- package/dist/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +58 -0
- package/dist/components/address-dialog.d.ts +11 -0
- package/dist/components/address-dialog.d.ts.map +1 -0
- package/dist/components/address-dialog.js +130 -0
- package/dist/components/contact-point-dialog.d.ts +11 -0
- package/dist/components/contact-point-dialog.d.ts.map +1 -0
- package/dist/components/contact-point-dialog.js +78 -0
- package/dist/components/entity-ref-picker.d.ts +21 -0
- package/dist/components/entity-ref-picker.d.ts.map +1 -0
- package/dist/components/entity-ref-picker.js +38 -0
- package/dist/components/identity-page.d.ts +20 -0
- package/dist/components/identity-page.d.ts.map +1 -0
- package/dist/components/identity-page.js +230 -0
- package/dist/components/named-contact-dialog.d.ts +11 -0
- package/dist/components/named-contact-dialog.d.ts.map +1 -0
- package/dist/components/named-contact-dialog.js +101 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +6 -0
- package/dist/hooks/use-address-mutation.d.ts +72 -0
- package/dist/hooks/use-address-mutation.d.ts.map +1 -0
- package/dist/hooks/use-address-mutation.js +40 -0
- package/dist/hooks/use-addresses.d.ts +31 -0
- package/dist/hooks/use-addresses.d.ts.map +1 -0
- package/dist/hooks/use-addresses.js +12 -0
- package/dist/hooks/use-contact-point-mutation.d.ts +51 -0
- package/dist/hooks/use-contact-point-mutation.d.ts.map +1 -0
- package/dist/hooks/use-contact-point-mutation.js +40 -0
- package/dist/hooks/use-contact-points.d.ts +24 -0
- package/dist/hooks/use-contact-points.d.ts.map +1 -0
- package/dist/hooks/use-contact-points.js +12 -0
- package/dist/hooks/use-named-contact-mutation.d.ts +54 -0
- package/dist/hooks/use-named-contact-mutation.d.ts.map +1 -0
- package/dist/hooks/use-named-contact-mutation.js +40 -0
- package/dist/hooks/use-named-contacts.d.ts +25 -0
- package/dist/hooks/use-named-contacts.d.ts.map +1 -0
- package/dist/hooks/use-named-contacts.js +12 -0
- package/dist/i18n/en.d.ts +193 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +192 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/messages.d.ts +161 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +408 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro.d.ts +193 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +192 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +1 -0
- package/dist/query-keys.d.ts +40 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +12 -0
- package/dist/query-options.d.ts +489 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +63 -0
- package/dist/schemas.d.ts +278 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +52 -0
- package/dist/ui.d.ts +7 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +6 -0
- package/package.json +146 -0
- package/src/styles.css +11 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const paginatedEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
3
|
+
data: z.ZodArray<T>;
|
|
4
|
+
total: z.ZodNumber;
|
|
5
|
+
limit: z.ZodNumber;
|
|
6
|
+
offset: z.ZodNumber;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const singleEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
9
|
+
data: T;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const successEnvelope: z.ZodObject<{
|
|
12
|
+
success: z.ZodBoolean;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const contactPointRecordSchema: z.ZodObject<{
|
|
15
|
+
entityType: z.ZodString;
|
|
16
|
+
entityId: z.ZodString;
|
|
17
|
+
kind: z.ZodEnum<{
|
|
18
|
+
other: "other";
|
|
19
|
+
email: "email";
|
|
20
|
+
phone: "phone";
|
|
21
|
+
mobile: "mobile";
|
|
22
|
+
website: "website";
|
|
23
|
+
whatsapp: "whatsapp";
|
|
24
|
+
sms: "sms";
|
|
25
|
+
fax: "fax";
|
|
26
|
+
social: "social";
|
|
27
|
+
}>;
|
|
28
|
+
value: z.ZodString;
|
|
29
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
label: z.ZodNullable<z.ZodString>;
|
|
32
|
+
normalizedValue: z.ZodNullable<z.ZodString>;
|
|
33
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
34
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
35
|
+
createdAt: z.ZodString;
|
|
36
|
+
updatedAt: z.ZodString;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type ContactPointRecord = z.infer<typeof contactPointRecordSchema>;
|
|
39
|
+
export declare const addressRecordSchema: z.ZodObject<{
|
|
40
|
+
entityType: z.ZodString;
|
|
41
|
+
entityId: z.ZodString;
|
|
42
|
+
label: z.ZodDefault<z.ZodEnum<{
|
|
43
|
+
service: "service";
|
|
44
|
+
other: "other";
|
|
45
|
+
primary: "primary";
|
|
46
|
+
legal: "legal";
|
|
47
|
+
billing: "billing";
|
|
48
|
+
shipping: "shipping";
|
|
49
|
+
mailing: "mailing";
|
|
50
|
+
meeting: "meeting";
|
|
51
|
+
}>>;
|
|
52
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
fullText: z.ZodNullable<z.ZodString>;
|
|
55
|
+
line1: z.ZodNullable<z.ZodString>;
|
|
56
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
57
|
+
city: z.ZodNullable<z.ZodString>;
|
|
58
|
+
region: z.ZodNullable<z.ZodString>;
|
|
59
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
60
|
+
country: z.ZodNullable<z.ZodString>;
|
|
61
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
62
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
63
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
64
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
65
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
66
|
+
createdAt: z.ZodString;
|
|
67
|
+
updatedAt: z.ZodString;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type AddressRecord = z.infer<typeof addressRecordSchema>;
|
|
70
|
+
export declare const namedContactRecordSchema: z.ZodObject<{
|
|
71
|
+
entityType: z.ZodString;
|
|
72
|
+
entityId: z.ZodString;
|
|
73
|
+
role: z.ZodDefault<z.ZodEnum<{
|
|
74
|
+
other: "other";
|
|
75
|
+
primary: "primary";
|
|
76
|
+
legal: "legal";
|
|
77
|
+
operations: "operations";
|
|
78
|
+
general: "general";
|
|
79
|
+
reservations: "reservations";
|
|
80
|
+
front_desk: "front_desk";
|
|
81
|
+
sales: "sales";
|
|
82
|
+
emergency: "emergency";
|
|
83
|
+
accounting: "accounting";
|
|
84
|
+
}>>;
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
title: z.ZodNullable<z.ZodString>;
|
|
89
|
+
email: z.ZodNullable<z.ZodString>;
|
|
90
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
91
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
92
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
93
|
+
createdAt: z.ZodString;
|
|
94
|
+
updatedAt: z.ZodString;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
export type NamedContactRecord = z.infer<typeof namedContactRecordSchema>;
|
|
97
|
+
export declare const contactPointListResponse: z.ZodObject<{
|
|
98
|
+
data: z.ZodArray<z.ZodObject<{
|
|
99
|
+
entityType: z.ZodString;
|
|
100
|
+
entityId: z.ZodString;
|
|
101
|
+
kind: z.ZodEnum<{
|
|
102
|
+
other: "other";
|
|
103
|
+
email: "email";
|
|
104
|
+
phone: "phone";
|
|
105
|
+
mobile: "mobile";
|
|
106
|
+
website: "website";
|
|
107
|
+
whatsapp: "whatsapp";
|
|
108
|
+
sms: "sms";
|
|
109
|
+
fax: "fax";
|
|
110
|
+
social: "social";
|
|
111
|
+
}>;
|
|
112
|
+
value: z.ZodString;
|
|
113
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
label: z.ZodNullable<z.ZodString>;
|
|
116
|
+
normalizedValue: z.ZodNullable<z.ZodString>;
|
|
117
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
118
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
119
|
+
createdAt: z.ZodString;
|
|
120
|
+
updatedAt: z.ZodString;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
total: z.ZodNumber;
|
|
123
|
+
limit: z.ZodNumber;
|
|
124
|
+
offset: z.ZodNumber;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
export declare const contactPointSingleResponse: z.ZodObject<{
|
|
127
|
+
data: z.ZodObject<{
|
|
128
|
+
entityType: z.ZodString;
|
|
129
|
+
entityId: z.ZodString;
|
|
130
|
+
kind: z.ZodEnum<{
|
|
131
|
+
other: "other";
|
|
132
|
+
email: "email";
|
|
133
|
+
phone: "phone";
|
|
134
|
+
mobile: "mobile";
|
|
135
|
+
website: "website";
|
|
136
|
+
whatsapp: "whatsapp";
|
|
137
|
+
sms: "sms";
|
|
138
|
+
fax: "fax";
|
|
139
|
+
social: "social";
|
|
140
|
+
}>;
|
|
141
|
+
value: z.ZodString;
|
|
142
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
143
|
+
id: z.ZodString;
|
|
144
|
+
label: z.ZodNullable<z.ZodString>;
|
|
145
|
+
normalizedValue: z.ZodNullable<z.ZodString>;
|
|
146
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
147
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
148
|
+
createdAt: z.ZodString;
|
|
149
|
+
updatedAt: z.ZodString;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
export declare const addressListResponse: z.ZodObject<{
|
|
153
|
+
data: z.ZodArray<z.ZodObject<{
|
|
154
|
+
entityType: z.ZodString;
|
|
155
|
+
entityId: z.ZodString;
|
|
156
|
+
label: z.ZodDefault<z.ZodEnum<{
|
|
157
|
+
service: "service";
|
|
158
|
+
other: "other";
|
|
159
|
+
primary: "primary";
|
|
160
|
+
legal: "legal";
|
|
161
|
+
billing: "billing";
|
|
162
|
+
shipping: "shipping";
|
|
163
|
+
mailing: "mailing";
|
|
164
|
+
meeting: "meeting";
|
|
165
|
+
}>>;
|
|
166
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
167
|
+
id: z.ZodString;
|
|
168
|
+
fullText: z.ZodNullable<z.ZodString>;
|
|
169
|
+
line1: z.ZodNullable<z.ZodString>;
|
|
170
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
171
|
+
city: z.ZodNullable<z.ZodString>;
|
|
172
|
+
region: z.ZodNullable<z.ZodString>;
|
|
173
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
174
|
+
country: z.ZodNullable<z.ZodString>;
|
|
175
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
176
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
177
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
178
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
179
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
180
|
+
createdAt: z.ZodString;
|
|
181
|
+
updatedAt: z.ZodString;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
total: z.ZodNumber;
|
|
184
|
+
limit: z.ZodNumber;
|
|
185
|
+
offset: z.ZodNumber;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
export declare const addressSingleResponse: z.ZodObject<{
|
|
188
|
+
data: z.ZodObject<{
|
|
189
|
+
entityType: z.ZodString;
|
|
190
|
+
entityId: z.ZodString;
|
|
191
|
+
label: z.ZodDefault<z.ZodEnum<{
|
|
192
|
+
service: "service";
|
|
193
|
+
other: "other";
|
|
194
|
+
primary: "primary";
|
|
195
|
+
legal: "legal";
|
|
196
|
+
billing: "billing";
|
|
197
|
+
shipping: "shipping";
|
|
198
|
+
mailing: "mailing";
|
|
199
|
+
meeting: "meeting";
|
|
200
|
+
}>>;
|
|
201
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
202
|
+
id: z.ZodString;
|
|
203
|
+
fullText: z.ZodNullable<z.ZodString>;
|
|
204
|
+
line1: z.ZodNullable<z.ZodString>;
|
|
205
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
206
|
+
city: z.ZodNullable<z.ZodString>;
|
|
207
|
+
region: z.ZodNullable<z.ZodString>;
|
|
208
|
+
postalCode: z.ZodNullable<z.ZodString>;
|
|
209
|
+
country: z.ZodNullable<z.ZodString>;
|
|
210
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
211
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
212
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
213
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
214
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
215
|
+
createdAt: z.ZodString;
|
|
216
|
+
updatedAt: z.ZodString;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
export declare const namedContactListResponse: z.ZodObject<{
|
|
220
|
+
data: z.ZodArray<z.ZodObject<{
|
|
221
|
+
entityType: z.ZodString;
|
|
222
|
+
entityId: z.ZodString;
|
|
223
|
+
role: z.ZodDefault<z.ZodEnum<{
|
|
224
|
+
other: "other";
|
|
225
|
+
primary: "primary";
|
|
226
|
+
legal: "legal";
|
|
227
|
+
operations: "operations";
|
|
228
|
+
general: "general";
|
|
229
|
+
reservations: "reservations";
|
|
230
|
+
front_desk: "front_desk";
|
|
231
|
+
sales: "sales";
|
|
232
|
+
emergency: "emergency";
|
|
233
|
+
accounting: "accounting";
|
|
234
|
+
}>>;
|
|
235
|
+
name: z.ZodString;
|
|
236
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
237
|
+
id: z.ZodString;
|
|
238
|
+
title: z.ZodNullable<z.ZodString>;
|
|
239
|
+
email: z.ZodNullable<z.ZodString>;
|
|
240
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
241
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
242
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
243
|
+
createdAt: z.ZodString;
|
|
244
|
+
updatedAt: z.ZodString;
|
|
245
|
+
}, z.core.$strip>>;
|
|
246
|
+
total: z.ZodNumber;
|
|
247
|
+
limit: z.ZodNumber;
|
|
248
|
+
offset: z.ZodNumber;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
export declare const namedContactSingleResponse: z.ZodObject<{
|
|
251
|
+
data: z.ZodObject<{
|
|
252
|
+
entityType: z.ZodString;
|
|
253
|
+
entityId: z.ZodString;
|
|
254
|
+
role: z.ZodDefault<z.ZodEnum<{
|
|
255
|
+
other: "other";
|
|
256
|
+
primary: "primary";
|
|
257
|
+
legal: "legal";
|
|
258
|
+
operations: "operations";
|
|
259
|
+
general: "general";
|
|
260
|
+
reservations: "reservations";
|
|
261
|
+
front_desk: "front_desk";
|
|
262
|
+
sales: "sales";
|
|
263
|
+
emergency: "emergency";
|
|
264
|
+
accounting: "accounting";
|
|
265
|
+
}>>;
|
|
266
|
+
name: z.ZodString;
|
|
267
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
268
|
+
id: z.ZodString;
|
|
269
|
+
title: z.ZodNullable<z.ZodString>;
|
|
270
|
+
email: z.ZodNullable<z.ZodString>;
|
|
271
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
272
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
273
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
274
|
+
createdAt: z.ZodString;
|
|
275
|
+
updatedAt: z.ZodString;
|
|
276
|
+
}, z.core.$strip>;
|
|
277
|
+
}, z.core.$strip>;
|
|
278
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;;;;iBAM7D,CAAA;AAEJ,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAA6B,CAAA;AAC3F,eAAO,MAAM,eAAe;;iBAAqC,CAAA;AAEjE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;iBAQnC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgB9B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;iBASnC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA8C,CAAA;AACnF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;iBAA2C,CAAA;AAClF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAyC,CAAA;AACzE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAsC,CAAA;AACxE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA8C,CAAA;AACnF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA2C,CAAA"}
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { insertAddressSchema, insertContactPointSchema, insertNamedContactSchema, } from "@voyant-travel/identity";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const paginatedEnvelope = (item) => z.object({
|
|
4
|
+
data: z.array(item),
|
|
5
|
+
total: z.number().int(),
|
|
6
|
+
limit: z.number().int(),
|
|
7
|
+
offset: z.number().int(),
|
|
8
|
+
});
|
|
9
|
+
export const singleEnvelope = (item) => z.object({ data: item });
|
|
10
|
+
export const successEnvelope = z.object({ success: z.boolean() });
|
|
11
|
+
export const contactPointRecordSchema = insertContactPointSchema.extend({
|
|
12
|
+
id: z.string(),
|
|
13
|
+
label: z.string().nullable(),
|
|
14
|
+
normalizedValue: z.string().nullable(),
|
|
15
|
+
notes: z.string().nullable(),
|
|
16
|
+
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
17
|
+
createdAt: z.string(),
|
|
18
|
+
updatedAt: z.string(),
|
|
19
|
+
});
|
|
20
|
+
export const addressRecordSchema = insertAddressSchema.extend({
|
|
21
|
+
id: z.string(),
|
|
22
|
+
fullText: z.string().nullable(),
|
|
23
|
+
line1: z.string().nullable(),
|
|
24
|
+
line2: z.string().nullable(),
|
|
25
|
+
city: z.string().nullable(),
|
|
26
|
+
region: z.string().nullable(),
|
|
27
|
+
postalCode: z.string().nullable(),
|
|
28
|
+
country: z.string().nullable(),
|
|
29
|
+
latitude: z.number().nullable(),
|
|
30
|
+
longitude: z.number().nullable(),
|
|
31
|
+
timezone: z.string().nullable(),
|
|
32
|
+
notes: z.string().nullable(),
|
|
33
|
+
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
34
|
+
createdAt: z.string(),
|
|
35
|
+
updatedAt: z.string(),
|
|
36
|
+
});
|
|
37
|
+
export const namedContactRecordSchema = insertNamedContactSchema.extend({
|
|
38
|
+
id: z.string(),
|
|
39
|
+
title: z.string().nullable(),
|
|
40
|
+
email: z.string().nullable(),
|
|
41
|
+
phone: z.string().nullable(),
|
|
42
|
+
notes: z.string().nullable(),
|
|
43
|
+
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
44
|
+
createdAt: z.string(),
|
|
45
|
+
updatedAt: z.string(),
|
|
46
|
+
});
|
|
47
|
+
export const contactPointListResponse = paginatedEnvelope(contactPointRecordSchema);
|
|
48
|
+
export const contactPointSingleResponse = singleEnvelope(contactPointRecordSchema);
|
|
49
|
+
export const addressListResponse = paginatedEnvelope(addressRecordSchema);
|
|
50
|
+
export const addressSingleResponse = singleEnvelope(addressRecordSchema);
|
|
51
|
+
export const namedContactListResponse = paginatedEnvelope(namedContactRecordSchema);
|
|
52
|
+
export const namedContactSingleResponse = singleEnvelope(namedContactRecordSchema);
|
package/dist/ui.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { AddressDialog, type AddressDialogProps } from "./components/address-dialog.js";
|
|
2
|
+
export { ContactPointDialog, type ContactPointDialogProps, } from "./components/contact-point-dialog.js";
|
|
3
|
+
export { EntityRefPicker, type EntityRefPickerProps } from "./components/entity-ref-picker.js";
|
|
4
|
+
export { AddressesTab, ContactPointsTab, type IdentityEntityTabProps, IdentityPage, type IdentityPageProps, type IdentityTab, NamedContactsTab, } from "./components/identity-page.js";
|
|
5
|
+
export { NamedContactDialog, type NamedContactDialogProps, } from "./components/named-contact-dialog.js";
|
|
6
|
+
export { getIdentityUiI18n, type IdentityUiMessageOverrides, type IdentityUiMessages, IdentityUiMessagesProvider, identityUiEn, identityUiMessageDefinitions, identityUiRo, resolveIdentityUiMessages, useIdentityUiI18n, useIdentityUiI18nOrDefault, useIdentityUiMessages, useIdentityUiMessagesOrDefault, } from "./i18n/index.js";
|
|
7
|
+
//# sourceMappingURL=ui.d.ts.map
|
package/dist/ui.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACvF,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAC9F,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,KAAK,sBAAsB,EAC3B,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,gBAAgB,GACjB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACL,iBAAiB,EACjB,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,0BAA0B,EAC1B,YAAY,EACZ,4BAA4B,EAC5B,YAAY,EACZ,yBAAyB,EACzB,iBAAiB,EACjB,0BAA0B,EAC1B,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,iBAAiB,CAAA"}
|
package/dist/ui.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AddressDialog } from "./components/address-dialog.js";
|
|
2
|
+
export { ContactPointDialog, } from "./components/contact-point-dialog.js";
|
|
3
|
+
export { EntityRefPicker } from "./components/entity-ref-picker.js";
|
|
4
|
+
export { AddressesTab, ContactPointsTab, IdentityPage, NamedContactsTab, } from "./components/identity-page.js";
|
|
5
|
+
export { NamedContactDialog, } from "./components/named-contact-dialog.js";
|
|
6
|
+
export { getIdentityUiI18n, IdentityUiMessagesProvider, identityUiEn, identityUiMessageDefinitions, identityUiRo, resolveIdentityUiMessages, useIdentityUiI18n, useIdentityUiI18nOrDefault, useIdentityUiMessages, useIdentityUiMessagesOrDefault, } from "./i18n/index.js";
|
package/package.json
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@voyant-travel/identity-react",
|
|
3
|
+
"version": "0.119.1",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/voyant-travel/voyant.git",
|
|
8
|
+
"directory": "packages/identity-react"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./provider": {
|
|
19
|
+
"types": "./dist/provider.d.ts",
|
|
20
|
+
"import": "./dist/provider.js",
|
|
21
|
+
"default": "./dist/provider.js"
|
|
22
|
+
},
|
|
23
|
+
"./hooks": {
|
|
24
|
+
"types": "./dist/hooks/index.d.ts",
|
|
25
|
+
"import": "./dist/hooks/index.js",
|
|
26
|
+
"default": "./dist/hooks/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./client": {
|
|
29
|
+
"types": "./dist/client.d.ts",
|
|
30
|
+
"import": "./dist/client.js",
|
|
31
|
+
"default": "./dist/client.js"
|
|
32
|
+
},
|
|
33
|
+
"./query-keys": {
|
|
34
|
+
"types": "./dist/query-keys.d.ts",
|
|
35
|
+
"import": "./dist/query-keys.js",
|
|
36
|
+
"default": "./dist/query-keys.js"
|
|
37
|
+
},
|
|
38
|
+
"./ui": {
|
|
39
|
+
"types": "./dist/ui.d.ts",
|
|
40
|
+
"import": "./dist/ui.js",
|
|
41
|
+
"default": "./dist/ui.js"
|
|
42
|
+
},
|
|
43
|
+
"./styles.css": {
|
|
44
|
+
"default": "./src/styles.css"
|
|
45
|
+
},
|
|
46
|
+
"./i18n": {
|
|
47
|
+
"types": "./dist/i18n/index.d.ts",
|
|
48
|
+
"import": "./dist/i18n/index.js",
|
|
49
|
+
"default": "./dist/i18n/index.js"
|
|
50
|
+
},
|
|
51
|
+
"./i18n/en": {
|
|
52
|
+
"types": "./dist/i18n/en.d.ts",
|
|
53
|
+
"import": "./dist/i18n/en.js",
|
|
54
|
+
"default": "./dist/i18n/en.js"
|
|
55
|
+
},
|
|
56
|
+
"./i18n/ro": {
|
|
57
|
+
"types": "./dist/i18n/ro.d.ts",
|
|
58
|
+
"import": "./dist/i18n/ro.js",
|
|
59
|
+
"default": "./dist/i18n/ro.js"
|
|
60
|
+
},
|
|
61
|
+
"./components/*": {
|
|
62
|
+
"types": "./dist/components/*.d.ts",
|
|
63
|
+
"import": "./dist/components/*.js",
|
|
64
|
+
"default": "./dist/components/*.js"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"@tanstack/react-query": "^5.0.0",
|
|
69
|
+
"@tanstack/react-table": "^8.0.0",
|
|
70
|
+
"react": "^19.0.0",
|
|
71
|
+
"react-dom": "^19.0.0",
|
|
72
|
+
"react-hook-form": "^7.60.0",
|
|
73
|
+
"zod": "^4.0.0",
|
|
74
|
+
"@voyant-travel/bookings-react": "^0.119.3",
|
|
75
|
+
"@voyant-travel/relationships-react": "^0.119.2",
|
|
76
|
+
"@voyant-travel/inventory-react": "^0.1.0",
|
|
77
|
+
"@voyant-travel/identity": "^0.119.1",
|
|
78
|
+
"@voyant-travel/ui": "^0.106.1",
|
|
79
|
+
"@voyant-travel/distribution-react": "^0.109.8"
|
|
80
|
+
},
|
|
81
|
+
"peerDependenciesMeta": {
|
|
82
|
+
"@tanstack/react-table": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"@voyant-travel/bookings-react": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"@voyant-travel/relationships-react": {
|
|
89
|
+
"optional": true
|
|
90
|
+
},
|
|
91
|
+
"@voyant-travel/inventory-react": {
|
|
92
|
+
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"@voyant-travel/distribution-react": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"@voyant-travel/ui": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"react-hook-form": {
|
|
101
|
+
"optional": true
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"dependencies": {
|
|
105
|
+
"@voyant-travel/i18n": "^0.106.1",
|
|
106
|
+
"@voyant-travel/react": "^0.104.1"
|
|
107
|
+
},
|
|
108
|
+
"devDependencies": {
|
|
109
|
+
"@tanstack/react-query": "^5.100.11",
|
|
110
|
+
"@tanstack/react-table": "^8.21.3",
|
|
111
|
+
"@types/react": "^19.2.14",
|
|
112
|
+
"@types/react-dom": "^19.2.3",
|
|
113
|
+
"lucide-react": "^0.475.0",
|
|
114
|
+
"react": "^19.2.4",
|
|
115
|
+
"react-dom": "^19.2.4",
|
|
116
|
+
"react-hook-form": "^7.60.0",
|
|
117
|
+
"typescript": "^6.0.2",
|
|
118
|
+
"vitest": "^4.1.2",
|
|
119
|
+
"zod": "^4.3.6",
|
|
120
|
+
"@voyant-travel/i18n": "^0.106.1",
|
|
121
|
+
"@voyant-travel/relationships-react": "^0.119.2",
|
|
122
|
+
"@voyant-travel/react": "^0.104.1",
|
|
123
|
+
"@voyant-travel/bookings-react": "^0.119.3",
|
|
124
|
+
"@voyant-travel/identity": "^0.119.1",
|
|
125
|
+
"@voyant-travel/inventory-react": "^0.1.0",
|
|
126
|
+
"@voyant-travel/ui": "^0.106.1",
|
|
127
|
+
"@voyant-travel/distribution-react": "^0.109.8",
|
|
128
|
+
"@voyant-travel/voyant-typescript-config": "^0.1.0"
|
|
129
|
+
},
|
|
130
|
+
"files": [
|
|
131
|
+
"dist",
|
|
132
|
+
"src/styles.css"
|
|
133
|
+
],
|
|
134
|
+
"publishConfig": {
|
|
135
|
+
"access": "public"
|
|
136
|
+
},
|
|
137
|
+
"scripts": {
|
|
138
|
+
"build": "tsc -p tsconfig.build.json",
|
|
139
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo",
|
|
140
|
+
"typecheck": "tsc --noEmit",
|
|
141
|
+
"lint": "biome check src/",
|
|
142
|
+
"test": "vitest run --passWithNoTests"
|
|
143
|
+
},
|
|
144
|
+
"main": "./dist/index.js",
|
|
145
|
+
"types": "./dist/index.d.ts"
|
|
146
|
+
}
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* Tailwind v4 source-detection helper.
|
|
2
|
+
*
|
|
3
|
+
* Templates that consume this package should `@import` this CSS so Tailwind
|
|
4
|
+
* scans these component files for utility classes:
|
|
5
|
+
*
|
|
6
|
+
* @import "@voyant-travel/<domain>-ui/styles.css";
|
|
7
|
+
*
|
|
8
|
+
* Without it, classes that only appear inside this package (e.g. data-attr
|
|
9
|
+
* variants on primitives) won't be compiled into the final bundle.
|
|
10
|
+
*/
|
|
11
|
+
@source "./components/**/*.{ts,tsx}";
|