@lystech/core 1.0.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/README.md +2 -0
- package/bin/README.md +126 -0
- package/bin/attach.cjs +277 -0
- package/bin/check-pwa.cjs +277 -0
- package/bin/setup-github-action.cjs +209 -0
- package/dist/index.d.ts +978 -0
- package/dist/lystech-core-provider.es.js +48163 -0
- package/dist/lystech-core-provider.umd.js +1719 -0
- package/dist/lystech-core-styles.css +1 -0
- package/package.json +73 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,978 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
import { default as default_2 } from 'react';
|
|
4
|
+
import { JSX } from 'react/jsx-runtime';
|
|
5
|
+
import { Location as Location_2 } from 'react-router-dom';
|
|
6
|
+
import { NavigateFunction } from 'react-router-dom';
|
|
7
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
9
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
10
|
+
|
|
11
|
+
export declare function AskPermissionsFloatingButtons({ enableInstallAppButton, enablePushNotificationButton }: Props_9): JSX.Element;
|
|
12
|
+
|
|
13
|
+
declare type AuthContextType = {
|
|
14
|
+
user: SimplifiedUser | undefined;
|
|
15
|
+
impersonatedUser?: SimplifiedUser | undefined;
|
|
16
|
+
currentUser: SimplifiedUser | undefined;
|
|
17
|
+
auth: any;
|
|
18
|
+
isLoggedIn: boolean;
|
|
19
|
+
isSuperAdmin: boolean;
|
|
20
|
+
isAdmin: boolean;
|
|
21
|
+
isUser: boolean;
|
|
22
|
+
isSuperAdminInAnyOrganization: boolean;
|
|
23
|
+
isAdminInAnyOrganization: boolean;
|
|
24
|
+
areRoleDetailsLoading: boolean;
|
|
25
|
+
homeRoute: string;
|
|
26
|
+
impersonateAuthKey?: string;
|
|
27
|
+
setLoginRedirectRouteState: (route: string) => void;
|
|
28
|
+
registerNewUser?: (user: RegisterUserType) => Promise<any>;
|
|
29
|
+
signInWithEmailAndPassword: (email: string, password: string, onLoggedIn: (response: any) => void, onAccountNotActivated?: (response: any) => void, onAccountNotFound?: (response: any) => void, updateDelay?: number) => void;
|
|
30
|
+
signInWithGoogle: () => void;
|
|
31
|
+
signInWithFacebook: () => void;
|
|
32
|
+
logout: () => void;
|
|
33
|
+
requestResetPassword: (email: string) => Promise<any>;
|
|
34
|
+
activateUser: (token: string) => Promise<any>;
|
|
35
|
+
impersonate: (authKey: string | undefined) => void;
|
|
36
|
+
getImpersonatingUser: (authKey: string) => Promise<SimplifiedUser | undefined>;
|
|
37
|
+
updateUserImage: (image: File | Blob) => Promise<boolean>;
|
|
38
|
+
updateUserImageUrl: (image: string) => Promise<boolean>;
|
|
39
|
+
updateUserFirstName: (firstName: string) => void;
|
|
40
|
+
updateUserLastName: (lastName: string) => void;
|
|
41
|
+
updateNotificationState: (notifyCoffee: number) => void;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export declare const AuthForgotPasswordForm: default_2.FC<AuthForgotPasswordFormProps>;
|
|
45
|
+
|
|
46
|
+
declare type AuthForgotPasswordFormProps = {
|
|
47
|
+
onSuccess?: (email: string) => void;
|
|
48
|
+
onError?: (error: Error) => void;
|
|
49
|
+
className?: string;
|
|
50
|
+
showTitle?: boolean;
|
|
51
|
+
title?: string;
|
|
52
|
+
showDescription?: boolean;
|
|
53
|
+
description?: string;
|
|
54
|
+
emailFieldLabel?: string;
|
|
55
|
+
emailFieldPlaceholder?: string;
|
|
56
|
+
confirmButtonText?: string;
|
|
57
|
+
confirmingButtonText?: string;
|
|
58
|
+
activationMailSentMessage?: string;
|
|
59
|
+
errorMessage?: string;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export declare const AuthLoginForm: default_2.FC<AuthLoginFormProps>;
|
|
63
|
+
|
|
64
|
+
declare type AuthLoginFormProps = {
|
|
65
|
+
onSuccess?: (response?: any) => void;
|
|
66
|
+
onAccountNotActivated?: (response?: any) => void;
|
|
67
|
+
onAccountNotFound?: (response?: any) => void;
|
|
68
|
+
onError?: (error: Error) => void;
|
|
69
|
+
className?: string;
|
|
70
|
+
showTitle?: boolean;
|
|
71
|
+
title?: string;
|
|
72
|
+
loginButtonText?: string;
|
|
73
|
+
pendingConnexionButtonText?: string;
|
|
74
|
+
passwordFieldLabel?: string;
|
|
75
|
+
emailFieldLabel?: string;
|
|
76
|
+
emailFieldPlaceholder?: string;
|
|
77
|
+
passwordFieldPlaceholder?: string;
|
|
78
|
+
loginSuccessMessage?: string;
|
|
79
|
+
unknownErrorMessage?: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export declare const AuthRegisterForm: default_2.FC<AuthRegisterFormProps>;
|
|
83
|
+
|
|
84
|
+
declare type AuthRegisterFormProps = {
|
|
85
|
+
onSuccess?: (response?: any) => void;
|
|
86
|
+
onEmailAlreadyExists?: (response?: any) => void;
|
|
87
|
+
onError?: (error: Error) => void;
|
|
88
|
+
className?: string;
|
|
89
|
+
showTitle?: boolean;
|
|
90
|
+
title?: string;
|
|
91
|
+
showBirthdayField?: boolean;
|
|
92
|
+
firstNameFieldLabel?: string;
|
|
93
|
+
firstNameFieldPlaceholder?: string;
|
|
94
|
+
lastNameFieldLabel?: string;
|
|
95
|
+
lastNameFieldPlaceholder?: string;
|
|
96
|
+
emailFieldLabel?: string;
|
|
97
|
+
emailFieldPlaceholder?: string;
|
|
98
|
+
birthdayFieldLabel?: string;
|
|
99
|
+
birthdayFieldPlaceholder?: string;
|
|
100
|
+
passwordFieldLabel?: string;
|
|
101
|
+
passwordFieldPlaceholder?: string;
|
|
102
|
+
confirmPasswordFieldLabel?: string;
|
|
103
|
+
confirmPasswordFieldPlaceholder?: string;
|
|
104
|
+
createAccountButtonText?: string;
|
|
105
|
+
creatingAccountButtonText?: string;
|
|
106
|
+
accountCreatedMessage?: string;
|
|
107
|
+
accountAlreadyExistsMessage?: string;
|
|
108
|
+
errorMessage?: string;
|
|
109
|
+
passwordNotMatchMessage?: string;
|
|
110
|
+
politiqueAndConditionsConsentTexte?: string;
|
|
111
|
+
seePolitiqueAndConditions?: string;
|
|
112
|
+
politiqueAndConditionsRoute?: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export declare const AuthTemplatePage: default_2.FC<AuthTemplatePageProps>;
|
|
116
|
+
|
|
117
|
+
declare interface AuthTemplatePageProps {
|
|
118
|
+
onSuccess?: () => void;
|
|
119
|
+
onCancel?: () => void;
|
|
120
|
+
style?: default_2.CSSProperties;
|
|
121
|
+
className?: string;
|
|
122
|
+
centered?: boolean;
|
|
123
|
+
showLogo?: boolean;
|
|
124
|
+
logoSrc?: string;
|
|
125
|
+
appName?: string;
|
|
126
|
+
defaultMode?: "login" | "register" | "forgot-password" | "activation";
|
|
127
|
+
cancelButtonText?: string;
|
|
128
|
+
returnToLoginButtonText?: string;
|
|
129
|
+
showTitle?: boolean;
|
|
130
|
+
title?: string;
|
|
131
|
+
showLoginForm?: boolean;
|
|
132
|
+
showRegisterForm?: boolean;
|
|
133
|
+
showForgotPasswordForm?: boolean;
|
|
134
|
+
loginButtonText?: string;
|
|
135
|
+
registerButtonText?: string;
|
|
136
|
+
forgotPasswordButtonText?: string;
|
|
137
|
+
loginFormProps?: AuthLoginFormProps;
|
|
138
|
+
registerFormProps?: AuthRegisterFormProps;
|
|
139
|
+
forgotPasswordFormProps?: AuthForgotPasswordFormProps;
|
|
140
|
+
politiqueAndConditionsConsentTexte?: string;
|
|
141
|
+
seePolitiqueAndConditions?: string;
|
|
142
|
+
politiqueAndConditionsRoute?: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export declare const AuthUserProfile: default_2.FC<AuthUserProfileProps>;
|
|
146
|
+
|
|
147
|
+
declare type AuthUserProfileProps = {
|
|
148
|
+
onLogout?: () => void;
|
|
149
|
+
onClose?: () => void;
|
|
150
|
+
className?: string;
|
|
151
|
+
showTitle?: boolean;
|
|
152
|
+
title?: string;
|
|
153
|
+
logoutSuccessMessage?: string;
|
|
154
|
+
logoutErrorMessage?: string;
|
|
155
|
+
disconnectedLabel?: string;
|
|
156
|
+
mustBeLoggedInMessage?: string;
|
|
157
|
+
logoutButtonText?: string;
|
|
158
|
+
showCloseButton?: boolean;
|
|
159
|
+
closeButtonText?: string;
|
|
160
|
+
emailLabel?: string;
|
|
161
|
+
nameLabel?: string;
|
|
162
|
+
idLabel?: string;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export declare const axiosInstance: AxiosInstance;
|
|
166
|
+
|
|
167
|
+
declare type BillProduct = {
|
|
168
|
+
UID: string;
|
|
169
|
+
billUID?: string;
|
|
170
|
+
itemName: string;
|
|
171
|
+
itemImage: string;
|
|
172
|
+
itemPrice: number;
|
|
173
|
+
itemCommission: number;
|
|
174
|
+
itemCost: number;
|
|
175
|
+
itemRealCost: number;
|
|
176
|
+
itemFormat: string;
|
|
177
|
+
orderedQuantity: number;
|
|
178
|
+
productType: string;
|
|
179
|
+
stackPrice: number;
|
|
180
|
+
stackCommission: number;
|
|
181
|
+
stackCost: number;
|
|
182
|
+
stackRealCost: number;
|
|
183
|
+
stackSaved: number;
|
|
184
|
+
itemSaved: number;
|
|
185
|
+
orderedByEmails: string[];
|
|
186
|
+
orderedByNames: string[];
|
|
187
|
+
orderedByAuthKeys: string[];
|
|
188
|
+
lastOrderedOn: string;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export declare type CartProduct = ShopProduct & {
|
|
192
|
+
quantity: number;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export declare function ClientOrderBill({ bill }: {
|
|
196
|
+
bill: CustomerBill;
|
|
197
|
+
}): JSX.Element;
|
|
198
|
+
|
|
199
|
+
export declare function CollectionInvitationSelector({ onCollectionSelected, currentCollectionUID, collectionsSelectorTitle, showOptions, allowAutoSelect }: Props_5): JSX.Element | null;
|
|
200
|
+
|
|
201
|
+
export declare type CollectionInvitationType = {
|
|
202
|
+
collectionName: string;
|
|
203
|
+
collectionUID: string;
|
|
204
|
+
collectionImage: string;
|
|
205
|
+
participationLink: string;
|
|
206
|
+
pathName: string;
|
|
207
|
+
organization: {
|
|
208
|
+
name: string;
|
|
209
|
+
subdomain: string;
|
|
210
|
+
image: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export declare function ContextMenu(): JSX.Element | null;
|
|
215
|
+
|
|
216
|
+
export declare function ContextMenuConfirm({ visible, title, onConfirm, onCancel, okText, cancelText, position, }: ContextMenuConfirmProps): JSX.Element | null;
|
|
217
|
+
|
|
218
|
+
declare type ContextMenuConfirmProps = {
|
|
219
|
+
visible: boolean;
|
|
220
|
+
title: string;
|
|
221
|
+
onConfirm: () => void;
|
|
222
|
+
onCancel: () => void;
|
|
223
|
+
okText?: string;
|
|
224
|
+
cancelText?: string;
|
|
225
|
+
position: {
|
|
226
|
+
x: number;
|
|
227
|
+
y: number;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
declare interface ContextMenuContextType {
|
|
232
|
+
showContextMenu: (x: number, y: number, options: ContextMenuOption[], title?: string) => void;
|
|
233
|
+
hideContextMenu: () => void;
|
|
234
|
+
contextMenuState: ContextMenuState;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export declare type ContextMenuOption = {
|
|
238
|
+
label: string;
|
|
239
|
+
onClick: () => void;
|
|
240
|
+
icon?: React.ReactNode;
|
|
241
|
+
disabled?: boolean;
|
|
242
|
+
separator?: boolean;
|
|
243
|
+
requestConfirmation?: boolean;
|
|
244
|
+
confirmationMessage?: string;
|
|
245
|
+
yesText?: string;
|
|
246
|
+
noText?: string;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export declare function ContextMenuProvider({ children }: {
|
|
250
|
+
children: ReactNode;
|
|
251
|
+
}): JSX.Element;
|
|
252
|
+
|
|
253
|
+
declare interface ContextMenuState {
|
|
254
|
+
isVisible: boolean;
|
|
255
|
+
x: number;
|
|
256
|
+
y: number;
|
|
257
|
+
options: ContextMenuOption[];
|
|
258
|
+
title?: string;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export declare function CurrentlyInvitedToOrdersSection({ onCollectionInvitationClick }: Props_4): JSX.Element;
|
|
262
|
+
|
|
263
|
+
export declare type CustomerBill = {
|
|
264
|
+
billUID: string;
|
|
265
|
+
transactionId: string;
|
|
266
|
+
itemName: string;
|
|
267
|
+
createdOn: string;
|
|
268
|
+
deliveryAddress: string;
|
|
269
|
+
itemImage: string;
|
|
270
|
+
billDiscount: number;
|
|
271
|
+
billShipping: number;
|
|
272
|
+
billHandlingFee: number;
|
|
273
|
+
billTotalPrice: number;
|
|
274
|
+
promoCode: string;
|
|
275
|
+
promoMessage: string;
|
|
276
|
+
subscriptionMessage: string;
|
|
277
|
+
subscriptions: string;
|
|
278
|
+
collectionName: string;
|
|
279
|
+
collectionUID: string;
|
|
280
|
+
orderedBy: string;
|
|
281
|
+
orderedByEmail: string;
|
|
282
|
+
orderedByName: string;
|
|
283
|
+
orderedQuantity: number;
|
|
284
|
+
organization: string;
|
|
285
|
+
paid: number;
|
|
286
|
+
readyForPickup: boolean;
|
|
287
|
+
shipped: boolean;
|
|
288
|
+
itemPrice: number;
|
|
289
|
+
itemCommission: number;
|
|
290
|
+
itemCost: number;
|
|
291
|
+
itemRealCost: number;
|
|
292
|
+
itemFormat: string;
|
|
293
|
+
itemUID: string;
|
|
294
|
+
shipping: number;
|
|
295
|
+
itemSaved: number;
|
|
296
|
+
isSandbox: boolean;
|
|
297
|
+
archivedOn: string | undefined;
|
|
298
|
+
stackPrice: number;
|
|
299
|
+
stackCommission: number;
|
|
300
|
+
stackCost: number;
|
|
301
|
+
stackRealCost: number;
|
|
302
|
+
stackSaved: number;
|
|
303
|
+
billTotalQuantity: number;
|
|
304
|
+
billTotalCost: number;
|
|
305
|
+
billTotalRealCost: number;
|
|
306
|
+
billTotalSaved?: number;
|
|
307
|
+
billTotalCommission?: number;
|
|
308
|
+
products: BillProduct[];
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
export declare function Datagrid({ columns, data, callbacks, allowAdd, allowEdit, allowDelete, selectable, loading, header, footer, useModalForAdd, useModalForEdit, mobileCardView, controls, showToggleEmptyColumns }: DataGridProps): JSX.Element;
|
|
312
|
+
|
|
313
|
+
declare interface DataGridCallbacks {
|
|
314
|
+
onRowAdd?: (row: DataGridRow) => Promise<boolean>;
|
|
315
|
+
onRowUpdate?: (row: DataGridRow) => Promise<boolean>;
|
|
316
|
+
onRowDelete?: (rowId: string) => Promise<boolean>;
|
|
317
|
+
onRowSelect?: (row: DataGridRow) => void;
|
|
318
|
+
onCellChange?: (rowId: string, key: string, value: any) => void;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
declare interface DataGridColumn {
|
|
322
|
+
key: string;
|
|
323
|
+
label: string;
|
|
324
|
+
type: 'text' | 'number' | 'checkbox' | 'select' | 'autocomplete' | 'date';
|
|
325
|
+
options?: {
|
|
326
|
+
value: string;
|
|
327
|
+
label: string;
|
|
328
|
+
}[];
|
|
329
|
+
autoCompleteData?: string[];
|
|
330
|
+
width?: string;
|
|
331
|
+
required?: boolean;
|
|
332
|
+
editable?: boolean;
|
|
333
|
+
defaultValue?: any;
|
|
334
|
+
displayFormatter?: (value: any, row: DataGridRow) => string | default_2.ReactNode;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export declare function DataGridModal({ isOpen, onClose, onSave, columns, title, initialData, mode }: DataGridModalProps): JSX.Element | null;
|
|
338
|
+
|
|
339
|
+
declare interface DataGridModalProps {
|
|
340
|
+
isOpen: boolean;
|
|
341
|
+
onClose: () => void;
|
|
342
|
+
onSave: (row: DataGridRow) => Promise<boolean>;
|
|
343
|
+
columns: DataGridColumn[];
|
|
344
|
+
title: string;
|
|
345
|
+
initialData?: DataGridRow;
|
|
346
|
+
mode: 'add' | 'edit';
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
declare interface DataGridProps {
|
|
350
|
+
columns: DataGridColumn[];
|
|
351
|
+
data: DataGridRow[];
|
|
352
|
+
callbacks?: DataGridCallbacks;
|
|
353
|
+
allowAdd?: boolean | ((row?: DataGridRow) => boolean);
|
|
354
|
+
allowEdit?: boolean | ((row: DataGridRow) => boolean);
|
|
355
|
+
allowDelete?: boolean | ((row: DataGridRow) => boolean);
|
|
356
|
+
selectable?: boolean | ((row: DataGridRow) => boolean);
|
|
357
|
+
loading?: boolean;
|
|
358
|
+
header?: default_2.ReactNode;
|
|
359
|
+
footer?: default_2.ReactNode;
|
|
360
|
+
useModalForAdd?: boolean;
|
|
361
|
+
useModalForEdit?: boolean;
|
|
362
|
+
mobileCardView?: boolean;
|
|
363
|
+
controls?: {
|
|
364
|
+
label: string;
|
|
365
|
+
onClick: () => void;
|
|
366
|
+
}[];
|
|
367
|
+
showToggleEmptyColumns?: boolean;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
declare interface DataGridRow {
|
|
371
|
+
id: string;
|
|
372
|
+
[key: string]: any;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export declare function getImpersonatingUser(authKey: string): Promise<any>;
|
|
376
|
+
|
|
377
|
+
export declare function InstallPwaButton({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }: Props_7): JSX.Element | null;
|
|
378
|
+
|
|
379
|
+
export declare function LoadingCircle(): JSX.Element;
|
|
380
|
+
|
|
381
|
+
export declare const LYSTECH_CORE_VERSION: any;
|
|
382
|
+
|
|
383
|
+
declare function LystechCoreProvider({ children, organization, shouldRedirectAfterLogin, loginRedirectRoute, queryClient, usePushNotifications, useProgressiveWebAppFeatures, useThemeProvider, quickGoogleLoginButtonStyle, enableGoogleQuickLoginButton, showGoogleQuickLoginButton, useGoogleAutoSelect, debugMode, showAskPermissionsButtons, onPackageUpdated, triggerOnFirstInstallPackageCallback, packageVersionStorageKey, }: Props): JSX.Element;
|
|
384
|
+
export default LystechCoreProvider;
|
|
385
|
+
|
|
386
|
+
declare type MessageParams = {
|
|
387
|
+
type: "error" | "success" | "warning";
|
|
388
|
+
message: string;
|
|
389
|
+
duration?: number;
|
|
390
|
+
key?: string;
|
|
391
|
+
} | {
|
|
392
|
+
type: "loading";
|
|
393
|
+
message: string;
|
|
394
|
+
duration: number;
|
|
395
|
+
key?: string;
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
export declare function ModalPopup({ title, subtitle, className, contentClassName, showSideBar, children, closeOnPressEscape, closeOnClickOutside, fitContentWidth, fullWidth, animate, centered, disableCloseButton, renderTitle, onClose, onFinishOpen, }: ModalPopupProps): JSX.Element;
|
|
399
|
+
|
|
400
|
+
declare type ModalPopupProps = {
|
|
401
|
+
title?: string;
|
|
402
|
+
subtitle?: string;
|
|
403
|
+
className?: string;
|
|
404
|
+
contentClassName?: string;
|
|
405
|
+
showSideBar?: boolean;
|
|
406
|
+
showOptionLabel?: boolean;
|
|
407
|
+
children?: default_2.ReactNode;
|
|
408
|
+
closeOnPressEscape?: boolean;
|
|
409
|
+
closeOnClickOutside?: boolean;
|
|
410
|
+
fitContentWidth?: boolean;
|
|
411
|
+
fullWidth?: boolean;
|
|
412
|
+
animate?: boolean;
|
|
413
|
+
centered?: boolean;
|
|
414
|
+
disableCloseButton?: boolean;
|
|
415
|
+
renderTitle?: () => default_2.ReactNode;
|
|
416
|
+
onClose?: () => void;
|
|
417
|
+
onFinishOpen?: () => void;
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
declare type OrganizationContext = {
|
|
421
|
+
organization: string;
|
|
422
|
+
organizationImage: string;
|
|
423
|
+
organizationDetails?: OrganizationType;
|
|
424
|
+
areOrganizationDetailsLoading: boolean;
|
|
425
|
+
paypalInfo: PaypalInfoType;
|
|
426
|
+
onLoggedIn?: (user: SimplifiedUser) => void;
|
|
427
|
+
updateOrganizationDetails: (data: UpdateOrganizationType) => Promise<boolean>;
|
|
428
|
+
updateOrganizationPaypalEnabled: (enabled: boolean) => Promise<boolean>;
|
|
429
|
+
updatePaypalConfiguration?: (paypalClientId: string, paypalAppSecret: string, sandbox: boolean) => Promise<any>;
|
|
430
|
+
toggleOrganizationMode?: () => Promise<any>;
|
|
431
|
+
refetchOrganizationDetails: () => void;
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
declare const OrganizationContext: default_2.Context<OrganizationContext>;
|
|
435
|
+
|
|
436
|
+
export declare type OrganizationSelection = {
|
|
437
|
+
organizationName: string;
|
|
438
|
+
subDomain: string;
|
|
439
|
+
UID: string;
|
|
440
|
+
isSandbox: boolean;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
export declare type OrganizationType = {
|
|
444
|
+
UID: string;
|
|
445
|
+
allowUserJoin: number;
|
|
446
|
+
createdOn: string | any;
|
|
447
|
+
image: string;
|
|
448
|
+
organizationName: string;
|
|
449
|
+
subdomain: string;
|
|
450
|
+
ownerAuthKey: string;
|
|
451
|
+
public: number;
|
|
452
|
+
primaryColor: string;
|
|
453
|
+
paypalClientId: string;
|
|
454
|
+
paypalAppSecret: string;
|
|
455
|
+
paypalClientIdSandbox: string;
|
|
456
|
+
paypalAppSecretSandbox: string;
|
|
457
|
+
paypalEnabled: boolean;
|
|
458
|
+
useAdvancedFields: boolean;
|
|
459
|
+
isSandbox: number;
|
|
460
|
+
sellerType: "boutique" | "distributor";
|
|
461
|
+
productCount: number;
|
|
462
|
+
userCount: number;
|
|
463
|
+
collectionCount: number;
|
|
464
|
+
subscriptionCount: number;
|
|
465
|
+
promoCodesCount: number;
|
|
466
|
+
propsCount: number;
|
|
467
|
+
shippingOptionsCount: number;
|
|
468
|
+
featuredImagesCount: number;
|
|
469
|
+
filesCount: number;
|
|
470
|
+
countdownsCount: number;
|
|
471
|
+
postsCount: number;
|
|
472
|
+
generatedImageCount: number;
|
|
473
|
+
invitationsCount: number;
|
|
474
|
+
} | {
|
|
475
|
+
organizationName: string;
|
|
476
|
+
subdomain: string;
|
|
477
|
+
UID?: string;
|
|
478
|
+
image: string;
|
|
479
|
+
primaryColor: string;
|
|
480
|
+
paypalClientId: "";
|
|
481
|
+
paypalAppSecret: "";
|
|
482
|
+
paypalClientIdSandbox: "";
|
|
483
|
+
paypalAppSecretSandbox: "";
|
|
484
|
+
paypalEnabled: 0;
|
|
485
|
+
useAdvancedFields: boolean;
|
|
486
|
+
isSandbox: number;
|
|
487
|
+
sellerType: "boutique" | "distributor";
|
|
488
|
+
productCount: number;
|
|
489
|
+
userCount: number;
|
|
490
|
+
collectionCount: number;
|
|
491
|
+
subscriptionCount: number;
|
|
492
|
+
promoCodesCount: number;
|
|
493
|
+
propsCount: number;
|
|
494
|
+
shippingOptionsCount: number;
|
|
495
|
+
featuredImagesCount: number;
|
|
496
|
+
filesCount: number;
|
|
497
|
+
countdownsCount: number;
|
|
498
|
+
postsCount: number;
|
|
499
|
+
generatedImageCount: number;
|
|
500
|
+
invitationsCount: number;
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
export declare type PackageUpdateEvent = {
|
|
504
|
+
packageName: string;
|
|
505
|
+
previousVersion: string | null;
|
|
506
|
+
currentVersion: string;
|
|
507
|
+
isFirstInstall: boolean;
|
|
508
|
+
hasUpdated: boolean;
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
export declare function PastOrdersPage({ billUID, onCollectionInvitationClick, }: Props_3): JSX.Element;
|
|
512
|
+
|
|
513
|
+
export declare function PaypalCheckout({ products, promoCodes, onOrderCreated, onOrderComplete, onShipppingOptionsChange: onShippingOptionsChangeEvent, onInstrumentDeclined, onError, }: Props_6): JSX.Element;
|
|
514
|
+
|
|
515
|
+
export declare type PaypalInfoType = {
|
|
516
|
+
clientId: string;
|
|
517
|
+
appSecret: string;
|
|
518
|
+
clientIdSandbox: string;
|
|
519
|
+
appSecretSandbox: string;
|
|
520
|
+
enabled: boolean;
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
export declare function PolitiqueAndConditionPage(): JSX.Element;
|
|
524
|
+
|
|
525
|
+
export declare type PolitiqueAndConditionsType = {
|
|
526
|
+
id?: number;
|
|
527
|
+
name: string;
|
|
528
|
+
content: string;
|
|
529
|
+
createdOn?: Date;
|
|
530
|
+
updatedOn?: Date;
|
|
531
|
+
fk_organizationUID?: string;
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
export declare function PopButton({ icon, text, onClick, onClose, visible, disabled, size, theme, bottom, showClose, className, onAction, onPopupClose, url, urlText, }: PopButtonProps): JSX.Element | null;
|
|
535
|
+
|
|
536
|
+
declare interface PopButtonProps {
|
|
537
|
+
icon?: default_2.ReactNode;
|
|
538
|
+
text: string;
|
|
539
|
+
onClick?: () => void;
|
|
540
|
+
onClose?: () => void;
|
|
541
|
+
visible?: boolean;
|
|
542
|
+
disabled?: boolean;
|
|
543
|
+
size?: number;
|
|
544
|
+
theme?: PopButtonTheme;
|
|
545
|
+
bottom?: number;
|
|
546
|
+
showClose?: boolean;
|
|
547
|
+
className?: string;
|
|
548
|
+
onAction?: () => void;
|
|
549
|
+
onPopupClose?: () => void;
|
|
550
|
+
url?: string;
|
|
551
|
+
urlText?: string;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
declare type PopButtonTheme = 'pwa' | 'unsubscribed' | 'subscribed';
|
|
555
|
+
|
|
556
|
+
declare interface ProductPopupProps {
|
|
557
|
+
product: CartProduct;
|
|
558
|
+
onAdd: (product: any) => void;
|
|
559
|
+
onRemove: (product: any) => void;
|
|
560
|
+
onClose: () => void;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
declare type ProductProp = {
|
|
564
|
+
prop_UID: string;
|
|
565
|
+
prop_value_UID: string;
|
|
566
|
+
prop_link_UID: string;
|
|
567
|
+
name: string;
|
|
568
|
+
description: string;
|
|
569
|
+
value: string;
|
|
570
|
+
fk_organization: string;
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
declare type ProgressiveWebAppContextType = {
|
|
574
|
+
useProgressiveWebAppFeatures?: boolean | 'mobile';
|
|
575
|
+
isProgressiveWebAppInstalled: boolean;
|
|
576
|
+
canInstallProgressiveWebApp: boolean;
|
|
577
|
+
progressiveWebAppMessage: string;
|
|
578
|
+
isMobile?: boolean;
|
|
579
|
+
installProgressiveWebApp: () => Promise<void>;
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
declare type Props = {
|
|
583
|
+
children: default_2.ReactNode;
|
|
584
|
+
organization?: string;
|
|
585
|
+
shouldRedirectAfterLogin?: boolean;
|
|
586
|
+
loginRedirectRoute: string | null;
|
|
587
|
+
queryClient?: QueryClient;
|
|
588
|
+
debugMode?: boolean;
|
|
589
|
+
usePushNotifications?: boolean;
|
|
590
|
+
useProgressiveWebAppFeatures?: boolean | "mobile";
|
|
591
|
+
useThemeProvider?: boolean;
|
|
592
|
+
quickGoogleLoginButtonStyle?: default_2.CSSProperties;
|
|
593
|
+
enableGoogleQuickLoginButton?: boolean;
|
|
594
|
+
showGoogleQuickLoginButton?: boolean;
|
|
595
|
+
useGoogleAutoSelect?: boolean;
|
|
596
|
+
showAskPermissionsButtons?: {
|
|
597
|
+
installApp?: boolean;
|
|
598
|
+
pushNotifications?: boolean;
|
|
599
|
+
};
|
|
600
|
+
onPackageUpdated?: (event: PackageUpdateEvent) => void;
|
|
601
|
+
triggerOnFirstInstallPackageCallback?: boolean;
|
|
602
|
+
packageVersionStorageKey?: string;
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
declare type Props_2 = {
|
|
606
|
+
currentCollectionUID?: string;
|
|
607
|
+
pleaseSelectACollectionToStartText?: string;
|
|
608
|
+
noShopAvailableText?: string;
|
|
609
|
+
noShopAvailableImageSrc?: string;
|
|
610
|
+
noShopOrInvitationFoundText?: string;
|
|
611
|
+
pleaseLogInText?: string;
|
|
612
|
+
returnToLocationAfterLogin?: boolean;
|
|
613
|
+
onCollectionSelected: (collectionUID: string) => void;
|
|
614
|
+
onClickReturnToLogin?: () => void;
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
declare type Props_3 = {
|
|
618
|
+
billUID?: string;
|
|
619
|
+
onCollectionInvitationClick?: (invitation: CollectionInvitationType) => void;
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
declare type Props_4 = {
|
|
623
|
+
onCollectionInvitationClick?: (invitation: CollectionInvitationType) => void;
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
declare type Props_5 = {
|
|
627
|
+
onCollectionSelected?: (collectionUID: string) => void;
|
|
628
|
+
currentCollectionUID?: string;
|
|
629
|
+
collectionsSelectorTitle?: string;
|
|
630
|
+
showOptions?: boolean;
|
|
631
|
+
allowAutoSelect?: boolean;
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
declare type Props_6 = {
|
|
635
|
+
products?: {
|
|
636
|
+
UID: string;
|
|
637
|
+
quantity: number;
|
|
638
|
+
}[];
|
|
639
|
+
promoCodes?: string[];
|
|
640
|
+
onOrderCreated?: (orderId: string) => void;
|
|
641
|
+
onOrderComplete?: (orderId: string) => void;
|
|
642
|
+
onShipppingOptionsChange?: (orderId: string, selectedShippingOption: {
|
|
643
|
+
id: string;
|
|
644
|
+
type: string;
|
|
645
|
+
label: string;
|
|
646
|
+
selected: boolean;
|
|
647
|
+
amount: {
|
|
648
|
+
currency_code: string;
|
|
649
|
+
value: string;
|
|
650
|
+
};
|
|
651
|
+
}) => void;
|
|
652
|
+
onInstrumentDeclined?: () => void;
|
|
653
|
+
onError?: (error: string) => void;
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
declare interface Props_7 {
|
|
657
|
+
forceVisible?: boolean;
|
|
658
|
+
size?: number;
|
|
659
|
+
visible?: boolean;
|
|
660
|
+
text?: string;
|
|
661
|
+
knowMoreUrl?: string;
|
|
662
|
+
knowMoreText?: string;
|
|
663
|
+
onAction?: () => void;
|
|
664
|
+
onPopupClose?: () => void;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
declare type Props_8 = {
|
|
668
|
+
forceVisible?: boolean;
|
|
669
|
+
size?: number;
|
|
670
|
+
visible?: boolean;
|
|
671
|
+
text?: string;
|
|
672
|
+
knowMoreUrl?: string;
|
|
673
|
+
knowMoreText?: string;
|
|
674
|
+
onAction?: () => void;
|
|
675
|
+
onPopupClose?: () => void;
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
declare type Props_9 = {
|
|
679
|
+
enableInstallAppButton?: boolean;
|
|
680
|
+
enablePushNotificationButton?: boolean;
|
|
681
|
+
knowMoreUrl?: string;
|
|
682
|
+
knowMoreText?: string;
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
declare type ProviderType = {
|
|
686
|
+
popupElement: default_2.ReactNode;
|
|
687
|
+
confirmPopupElement: default_2.ReactNode;
|
|
688
|
+
showPopup: (popup: default_2.ReactNode) => void;
|
|
689
|
+
showConfirmPopup: (popup: default_2.ReactNode) => void;
|
|
690
|
+
hidePopup: () => void;
|
|
691
|
+
hideConfirmPopup: () => void;
|
|
692
|
+
isPopupShowing: boolean;
|
|
693
|
+
isConfirmPopupShowing: boolean;
|
|
694
|
+
showMessage: (params: MessageParams) => void;
|
|
695
|
+
hideMessage: (key: string) => void;
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
declare type ProviderType_2 = {
|
|
699
|
+
children: default_2.ReactNode;
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
declare type PushNotificationContextType = {
|
|
703
|
+
usePushNotifications?: boolean;
|
|
704
|
+
isPushSupported: boolean;
|
|
705
|
+
isSubscribed: boolean;
|
|
706
|
+
isPushSubscriptionLoading: boolean;
|
|
707
|
+
pushMessage: string;
|
|
708
|
+
vapidPublicKey: string | null;
|
|
709
|
+
currentSubscriptionEndpoint: string | null;
|
|
710
|
+
subscribePush: () => Promise<void>;
|
|
711
|
+
unsubscribePush: () => Promise<void>;
|
|
712
|
+
sendTestPushNotification?: (title: string, body: string) => Promise<void>;
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
export { QueryClient }
|
|
716
|
+
|
|
717
|
+
export declare function registerNewUser(user: RegisterUserType): Promise<AxiosResponse<any, any>>;
|
|
718
|
+
|
|
719
|
+
declare type RegisterUserType = {
|
|
720
|
+
username: string;
|
|
721
|
+
email: string;
|
|
722
|
+
firstName: string;
|
|
723
|
+
lastName: string;
|
|
724
|
+
password: string;
|
|
725
|
+
birthday?: string;
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
export declare function ShopPage({ currentCollectionUID, pleaseSelectACollectionToStartText, noShopAvailableText, noShopAvailableImageSrc, noShopOrInvitationFoundText, pleaseLogInText, returnToLocationAfterLogin, onCollectionSelected, onClickReturnToLogin }: Props_2): JSX.Element;
|
|
729
|
+
|
|
730
|
+
export declare type ShopProduct = any & {
|
|
731
|
+
UID: string;
|
|
732
|
+
itemName: string;
|
|
733
|
+
itemImage: string;
|
|
734
|
+
itemPrice: number;
|
|
735
|
+
inStock: boolean;
|
|
736
|
+
availableStock: number;
|
|
737
|
+
orderedAmount?: number;
|
|
738
|
+
orderedAmountRank: number;
|
|
739
|
+
props: ProductProp[];
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
export declare function ShopProductCard({ product, onClick }: ShopProductCardProps): JSX.Element;
|
|
743
|
+
|
|
744
|
+
declare type ShopProductCardProps = {
|
|
745
|
+
product: {
|
|
746
|
+
itemName: string;
|
|
747
|
+
UID: default_2.Key | null | undefined;
|
|
748
|
+
itemFrom: string;
|
|
749
|
+
itemFormat: string;
|
|
750
|
+
itemPrice: number;
|
|
751
|
+
itemRealCost: number;
|
|
752
|
+
quantity: number;
|
|
753
|
+
itemImage: string;
|
|
754
|
+
orderedAmount: number;
|
|
755
|
+
};
|
|
756
|
+
onClick?: () => void;
|
|
757
|
+
};
|
|
758
|
+
|
|
759
|
+
export declare function ShopProductPopup(props: ProductPopupProps): JSX.Element;
|
|
760
|
+
|
|
761
|
+
export declare type SimplifiedUser = {
|
|
762
|
+
id: number;
|
|
763
|
+
authKey: string;
|
|
764
|
+
thirdPartyAuthUID: string;
|
|
765
|
+
displayName: string;
|
|
766
|
+
firstName?: string;
|
|
767
|
+
lastName?: string;
|
|
768
|
+
birthday?: Date | null;
|
|
769
|
+
profileImage: string;
|
|
770
|
+
defaultOrganization: string;
|
|
771
|
+
email: string;
|
|
772
|
+
roleDetails: UserRoleDetails;
|
|
773
|
+
subscriptions?: UserSubscription[];
|
|
774
|
+
type: "firebase" | "emailPassword";
|
|
775
|
+
activatedOn: string;
|
|
776
|
+
notifyCoffee: number;
|
|
777
|
+
approvedBy: string;
|
|
778
|
+
approvedByName?: string;
|
|
779
|
+
lastLogin?: string;
|
|
780
|
+
} | undefined;
|
|
781
|
+
|
|
782
|
+
export declare function SubscribeToPushNotification({ size, visible, forceVisible, text, knowMoreUrl, knowMoreText, onAction, onPopupClose }: Props_8): JSX.Element;
|
|
783
|
+
|
|
784
|
+
export declare type Subscription = {
|
|
785
|
+
UID?: string;
|
|
786
|
+
name: string;
|
|
787
|
+
description: string;
|
|
788
|
+
duration: number;
|
|
789
|
+
price: number;
|
|
790
|
+
image?: string;
|
|
791
|
+
createdOn?: string;
|
|
792
|
+
currencyAmount?: number;
|
|
793
|
+
archived?: boolean;
|
|
794
|
+
rewards?: SubscriptionReward[];
|
|
795
|
+
subscribers?: SubscriptionSubscriber[];
|
|
796
|
+
expiredSubscribers?: SubscriptionSubscriber[];
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
export declare type SubscriptionReward = {
|
|
800
|
+
UID: string;
|
|
801
|
+
fk_subscriptionUID: string;
|
|
802
|
+
rewardName: string;
|
|
803
|
+
rewardDescription: string;
|
|
804
|
+
rewardType: string;
|
|
805
|
+
rewardValue: number;
|
|
806
|
+
rewardValueUnit: string;
|
|
807
|
+
triggerType: string;
|
|
808
|
+
triggerValue: number;
|
|
809
|
+
triggerValueUnit: string;
|
|
810
|
+
promoMinPrice: number;
|
|
811
|
+
promoMaxPrice: number;
|
|
812
|
+
promoMinProducts: number;
|
|
813
|
+
promoMaxProducts: number;
|
|
814
|
+
promoMaxUses: number;
|
|
815
|
+
promoDuration?: number;
|
|
816
|
+
rewardCode?: string;
|
|
817
|
+
startDate: Date;
|
|
818
|
+
endDate: Date | null;
|
|
819
|
+
isActive: boolean;
|
|
820
|
+
createdAt: Date;
|
|
821
|
+
updatedAt: Date;
|
|
822
|
+
hasStarted?: boolean;
|
|
823
|
+
isProgress?: boolean;
|
|
824
|
+
currentPoints?: number;
|
|
825
|
+
targetPoints?: number;
|
|
826
|
+
isPassive?: boolean;
|
|
827
|
+
passiveBonus?: string;
|
|
828
|
+
passiveBonusMessage?: string;
|
|
829
|
+
currentPointsProgress?: number;
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
export declare type SubscriptionSubscriber = {
|
|
833
|
+
UID: string;
|
|
834
|
+
billUID: string;
|
|
835
|
+
paid: boolean;
|
|
836
|
+
shipped: boolean;
|
|
837
|
+
readyForPickup: boolean;
|
|
838
|
+
createdOn: string;
|
|
839
|
+
orderedByName: string;
|
|
840
|
+
orderedByEmail: string;
|
|
841
|
+
fk_orderedByUserUID: string;
|
|
842
|
+
transactionId: string;
|
|
843
|
+
expirationDate: string;
|
|
844
|
+
isExpired: boolean;
|
|
845
|
+
isActive: boolean;
|
|
846
|
+
isGifted: boolean;
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
declare interface ThemeContextType {
|
|
850
|
+
theme: "light" | "dark" | null;
|
|
851
|
+
toggleTheme: () => void;
|
|
852
|
+
currentSystemTheme: "light" | "dark";
|
|
853
|
+
primaryColor: string;
|
|
854
|
+
setPrimaryColor: (color: string) => void;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
export declare type UpdateOrganizationType = {
|
|
858
|
+
organizationName?: string;
|
|
859
|
+
isPublic?: boolean;
|
|
860
|
+
allowUserJoin?: boolean;
|
|
861
|
+
url?: string;
|
|
862
|
+
image?: string;
|
|
863
|
+
paypalClientId?: string;
|
|
864
|
+
paypalAppSecret?: string;
|
|
865
|
+
paypalClientIdSandbox?: string;
|
|
866
|
+
paypalAppSecretSandbox?: string;
|
|
867
|
+
requireRegistrationActivation?: boolean;
|
|
868
|
+
useAdvancedFields?: boolean;
|
|
869
|
+
deleted?: boolean;
|
|
870
|
+
isSandbox?: boolean;
|
|
871
|
+
email?: string;
|
|
872
|
+
emailService?: string;
|
|
873
|
+
appAccessPassword?: string;
|
|
874
|
+
primaryColor?: string;
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
export declare function updateUserImageFunction(file: File | Blob): Promise<{
|
|
878
|
+
success: boolean;
|
|
879
|
+
url: string | null;
|
|
880
|
+
}>;
|
|
881
|
+
|
|
882
|
+
export declare function updateUserImageUrlFunction(authKey: string, imageUrl: string): Promise<{
|
|
883
|
+
success: boolean;
|
|
884
|
+
url: string | null;
|
|
885
|
+
}>;
|
|
886
|
+
|
|
887
|
+
export declare function useAuth(): AuthContextType;
|
|
888
|
+
|
|
889
|
+
export declare const useAxiosMiddleware: () => ProviderType_2;
|
|
890
|
+
|
|
891
|
+
export declare const useContextMenu: () => ContextMenuContextType;
|
|
892
|
+
|
|
893
|
+
export declare const useContextMenuHandler: () => {
|
|
894
|
+
handleContextMenu: (event: default_2.MouseEvent, options: ContextMenuOption[], title?: string) => void;
|
|
895
|
+
};
|
|
896
|
+
|
|
897
|
+
export declare const useImpersonatingUser: (authKey: string) => UseQueryResult<any, unknown>;
|
|
898
|
+
|
|
899
|
+
export declare const useInvitedToOrders: (email: string, organization?: string) => UseQueryResult<CollectionInvitationType[], unknown>;
|
|
900
|
+
|
|
901
|
+
export declare const useLystechPolitiqueAndConditions: () => UseQueryResult<PolitiqueAndConditionsType[], unknown>;
|
|
902
|
+
|
|
903
|
+
export declare const useOptionalLocation: () => Location_2<any>;
|
|
904
|
+
|
|
905
|
+
export declare const useOptionalNavigate: () => NavigateFunction | ((to: string | number, options?: {
|
|
906
|
+
replace?: boolean;
|
|
907
|
+
}) => void);
|
|
908
|
+
|
|
909
|
+
export declare function useOrganization(): OrganizationContext;
|
|
910
|
+
|
|
911
|
+
export declare const useOrganizationDetails: (organizationSubdomain: string) => UseQueryResult<OrganizationType | null, unknown>;
|
|
912
|
+
|
|
913
|
+
export declare function usePackageUpdateDetector(options?: UsePackageUpdateDetectorOptions): {
|
|
914
|
+
packageName: string;
|
|
915
|
+
previousVersion: string | null;
|
|
916
|
+
currentVersion: string;
|
|
917
|
+
isFirstInstall: boolean;
|
|
918
|
+
hasUpdated: boolean;
|
|
919
|
+
checkForUpdate: () => void;
|
|
920
|
+
};
|
|
921
|
+
|
|
922
|
+
export declare type UsePackageUpdateDetectorOptions = {
|
|
923
|
+
packageName?: string;
|
|
924
|
+
storageKey?: string;
|
|
925
|
+
triggerOnFirstInstall?: boolean;
|
|
926
|
+
onPackageUpdated?: (event: PackageUpdateEvent) => void;
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
export declare const usePolitiqueAndConditions: (organization: string) => UseQueryResult<PolitiqueAndConditionsType[], unknown>;
|
|
930
|
+
|
|
931
|
+
export declare const usePopup: () => ProviderType;
|
|
932
|
+
|
|
933
|
+
export declare const useProgressiveWebApp: () => ProgressiveWebAppContextType;
|
|
934
|
+
|
|
935
|
+
export declare const usePushNotifications: () => PushNotificationContextType;
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Hook pour accéder au QueryClient depuis les composants
|
|
939
|
+
* Ce hook réexporte le useQueryClient de TanStack Query
|
|
940
|
+
*/
|
|
941
|
+
export declare const useQueryClient: () => QueryClient;
|
|
942
|
+
|
|
943
|
+
export declare type UserRoleDetails = {
|
|
944
|
+
role: string;
|
|
945
|
+
isOwner: boolean;
|
|
946
|
+
isSuperAdmin: boolean;
|
|
947
|
+
isAdmin: boolean;
|
|
948
|
+
isUser: boolean;
|
|
949
|
+
isSuperAdminOrMore: boolean;
|
|
950
|
+
isAdminOrMore: boolean;
|
|
951
|
+
isUserOrMore: boolean;
|
|
952
|
+
isAdminInAnyOrganization: boolean;
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
export declare type UserSubscription = {
|
|
956
|
+
UID: string;
|
|
957
|
+
name: string;
|
|
958
|
+
price: number;
|
|
959
|
+
description: string | null;
|
|
960
|
+
duration: string | null;
|
|
961
|
+
image: string | null;
|
|
962
|
+
paid: boolean;
|
|
963
|
+
shipped: boolean;
|
|
964
|
+
billUID: string;
|
|
965
|
+
transactionId: string;
|
|
966
|
+
archivedOn: Date | null;
|
|
967
|
+
expirationDate: string;
|
|
968
|
+
isExpired: boolean;
|
|
969
|
+
isActive: boolean;
|
|
970
|
+
isGifted: boolean;
|
|
971
|
+
rewards?: SubscriptionReward[];
|
|
972
|
+
};
|
|
973
|
+
|
|
974
|
+
export declare const useTheme: () => ThemeContextType;
|
|
975
|
+
|
|
976
|
+
export declare const useUserRoleDetails: (authKey: string, organizationSubdomain: string) => UseQueryResult<UserRoleDetails, unknown>;
|
|
977
|
+
|
|
978
|
+
export { }
|