@feedmepos/mf-common 0.0.10 → 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/dist/auth.d.ts CHANGED
@@ -15,9 +15,9 @@ export declare class FeedMeAuth {
15
15
  private static _currentUser;
16
16
  private static authStateChangeCallbacks;
17
17
  private static bgIframe;
18
- static setBaseUrl(url: string): void;
18
+ static setBaseUrl(isDev: boolean): void;
19
19
  private static startBackground;
20
- static initialize(options: FeedMeAuthOptions): void;
20
+ static initialize(clientId: string): void;
21
21
  static prompt(root?: HTMLElement): void;
22
22
  static onAuthStateChanged(callback: (user: FeedMeUser | null, token: string | null) => void): void;
23
23
  static signOut(): void;
@@ -37,70 +37,3 @@ export declare class FeedMeAuth {
37
37
  customClaims: Record<string, unknown>;
38
38
  }>;
39
39
  }
40
- export declare const useAuth: import("pinia").StoreDefinition<"auth", import("pinia")._UnwrapAll<Pick<{
41
- config: (config: {
42
- clientId: string;
43
- customUrl?: string;
44
- }) => void;
45
- currentUser: import("vue").Ref<{
46
- id: string;
47
- email?: string | null | undefined;
48
- photoURL?: string | null | undefined;
49
- displayName?: string | null | undefined;
50
- phoneNumber?: string | null | undefined;
51
- } | null>;
52
- token: import("vue").Ref<string | null>;
53
- refreshToken: () => Promise<string>;
54
- signOut: () => void;
55
- prompt: (root?: HTMLElement) => void;
56
- onAuthStateChanged: (callback: (user: FeedMeUser | null, token: string | null) => void) => void;
57
- getUserClaims: () => Promise<{
58
- /** in seconds since the Unix epoch. */
59
- exp: number;
60
- customClaims: Record<string, unknown>;
61
- }>;
62
- }, "currentUser" | "token">>, Pick<{
63
- config: (config: {
64
- clientId: string;
65
- customUrl?: string;
66
- }) => void;
67
- currentUser: import("vue").Ref<{
68
- id: string;
69
- email?: string | null | undefined;
70
- photoURL?: string | null | undefined;
71
- displayName?: string | null | undefined;
72
- phoneNumber?: string | null | undefined;
73
- } | null>;
74
- token: import("vue").Ref<string | null>;
75
- refreshToken: () => Promise<string>;
76
- signOut: () => void;
77
- prompt: (root?: HTMLElement) => void;
78
- onAuthStateChanged: (callback: (user: FeedMeUser | null, token: string | null) => void) => void;
79
- getUserClaims: () => Promise<{
80
- /** in seconds since the Unix epoch. */
81
- exp: number;
82
- customClaims: Record<string, unknown>;
83
- }>;
84
- }, never>, Pick<{
85
- config: (config: {
86
- clientId: string;
87
- customUrl?: string;
88
- }) => void;
89
- currentUser: import("vue").Ref<{
90
- id: string;
91
- email?: string | null | undefined;
92
- photoURL?: string | null | undefined;
93
- displayName?: string | null | undefined;
94
- phoneNumber?: string | null | undefined;
95
- } | null>;
96
- token: import("vue").Ref<string | null>;
97
- refreshToken: () => Promise<string>;
98
- signOut: () => void;
99
- prompt: (root?: HTMLElement) => void;
100
- onAuthStateChanged: (callback: (user: FeedMeUser | null, token: string | null) => void) => void;
101
- getUserClaims: () => Promise<{
102
- /** in seconds since the Unix epoch. */
103
- exp: number;
104
- customClaims: Record<string, unknown>;
105
- }>;
106
- }, "config" | "refreshToken" | "signOut" | "prompt" | "onAuthStateChanged" | "getUserClaims">>;
package/dist/store.d.ts CHANGED
@@ -1,14 +1,64 @@
1
- import { F_COUNTRY } from '@feedmepos/core/entity';
1
+ import { F_COUNTRY, FdoPermissionRule } from '@feedmepos/core/entity';
2
+ import { type FeedMeUser } from './auth';
2
3
  export interface FmpBusiness {
3
4
  id: string;
4
5
  name: string;
5
6
  }
6
- export interface FmpUser {
7
- uid: string;
8
- getIdToken(): string;
7
+ export interface FmpRestaurant {
8
+ id: string;
9
+ name: string;
10
+ managable: boolean;
11
+ }
12
+ export declare class FmpUser {
13
+ constructor(user: {
14
+ id: string;
15
+ email?: string | null;
16
+ photoURL?: string | null;
17
+ displayName?: string | null;
18
+ phoneNumber?: string | null;
19
+ });
20
+ id: string;
21
+ email?: string | null;
22
+ photoURL?: string | null;
23
+ displayName?: string | null;
24
+ phoneNumber?: string | null;
25
+ private _token;
26
+ private _tokenExpiredAt;
27
+ setToken(token: string, tokenExpiredAt: Date): void;
28
+ private _adminPermissions;
29
+ setAdminPermisssions(permissions: FdoPermissionRule[]): void;
30
+ private _permissions;
31
+ setPermisssions(permissions: FdoPermissionRule[]): void;
32
+ get permissions(): FdoPermissionRule[];
33
+ getIdToken(): Promise<string>;
9
34
  }
10
35
  type FmNamespace = 'prod' | 'dev';
11
36
  export declare const useCore: import("pinia").StoreDefinition<"portal-core", import("pinia")._UnwrapAll<Pick<{
37
+ sessionUser: import("vue").Ref<{
38
+ id: string;
39
+ email?: string | null | undefined;
40
+ photoURL?: string | null | undefined;
41
+ displayName?: string | null | undefined;
42
+ phoneNumber?: string | null | undefined;
43
+ setToken: (token: string, tokenExpiredAt: Date) => void;
44
+ setAdminPermisssions: (permissions: FdoPermissionRule[]) => void;
45
+ setPermisssions: (permissions: FdoPermissionRule[]) => void;
46
+ readonly permissions: {
47
+ fields?: string[] | undefined;
48
+ conditions?: any;
49
+ inverted?: boolean | undefined;
50
+ reason?: string | undefined;
51
+ label: string;
52
+ actions: string | string[];
53
+ subject: string | string[];
54
+ }[];
55
+ getIdToken: () => Promise<string>;
56
+ } | null>;
57
+ setUser: (user: FeedMeUser | null) => Promise<void>;
58
+ signIn: () => Promise<void>;
59
+ signOut: () => void;
60
+ fetchUserAdminPermissions: () => Promise<void>;
61
+ fetchUserPermissions: () => Promise<void>;
12
62
  namespace: import("vue").Ref<FmNamespace>;
13
63
  currentCountry: import("vue").Ref<"AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KP" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW">;
14
64
  businesses: import("vue").Ref<{
@@ -20,6 +70,7 @@ export declare const useCore: import("pinia").StoreDefinition<"portal-core", imp
20
70
  clickupId?: string | null | undefined;
21
71
  members?: {
22
72
  pf_user?: {
73
+ email?: string | null | undefined;
23
74
  birthday?: {
24
75
  toString: () => string;
25
76
  toDateString: () => string;
@@ -85,11 +136,10 @@ export declare const useCore: import("pinia").StoreDefinition<"portal-core", imp
85
136
  } | null | undefined;
86
137
  gender?: "MALE" | "FEMALE" | null | undefined;
87
138
  addresses?: {
88
- name: string;
89
139
  address: string;
140
+ name: string;
90
141
  coordinates: number[];
91
142
  }[] | null | undefined;
92
- email?: string | null | undefined;
93
143
  photoURL?: string | null | undefined;
94
144
  displayName?: string | null | undefined;
95
145
  phoneNumber?: string | null | undefined;
@@ -99,46 +149,77 @@ export declare const useCore: import("pinia").StoreDefinition<"portal-core", imp
99
149
  } | null | undefined;
100
150
  _id: string;
101
151
  } | null | undefined;
102
- userId: string;
103
152
  role: "ADMIN";
153
+ userId: string;
104
154
  }[] | null | undefined;
105
- _id: string;
106
- name: string;
107
155
  code: string;
156
+ name: string;
157
+ _id: string;
108
158
  isReseller: boolean;
109
159
  } | null | undefined;
110
160
  thumbnail?: string | null | undefined;
111
161
  billingInfos?: {
112
162
  _id?: string | undefined;
113
- name: string;
114
- email: string;
115
163
  address: {
116
164
  coordinates?: number[] | undefined;
117
165
  line2?: string | undefined;
166
+ country: string;
118
167
  line1: string;
119
168
  state: string;
120
169
  city: string;
121
170
  postcode: string;
122
- country: string;
123
171
  };
172
+ name: string;
173
+ email: string;
124
174
  companyName: string;
125
175
  contact: string;
126
176
  }[] | null | undefined;
177
+ name: string;
127
178
  _id: string;
128
179
  ownerId: string;
129
- name: string;
130
180
  restaurantQuota: number;
131
181
  warehouseQuota: number;
132
182
  menuVersion: "v2" | "v3" | "v4";
133
183
  }[]>;
134
184
  currentBusiness: import("vue").Ref<FmpBusiness | undefined>;
185
+ restaurants: import("vue").Ref<{
186
+ id: string;
187
+ name: string;
188
+ managable: boolean;
189
+ }[]>;
190
+ readRestaurants: () => Promise<void>;
135
191
  currentApp: import("vue").Ref<string>;
136
192
  setNamespace: (ns: FmNamespace) => void;
137
- changeCountry: (country: F_COUNTRY) => void;
138
- getBusinesses: () => Promise<void>;
139
- changeBusiness: (business: FmpBusiness | undefined) => void;
193
+ changeCountry: (country: F_COUNTRY) => Promise<void>;
194
+ readBusinesses: () => Promise<FmpBusiness | undefined>;
195
+ changeBusiness: (business: FmpBusiness | undefined) => Promise<void>;
140
196
  setCurrentApp: (app: string) => void;
141
- }, "namespace" | "currentCountry" | "businesses" | "currentBusiness" | "currentApp">>, Pick<{
197
+ }, "businesses" | "sessionUser" | "namespace" | "currentCountry" | "currentBusiness" | "restaurants" | "currentApp">>, Pick<{
198
+ sessionUser: import("vue").Ref<{
199
+ id: string;
200
+ email?: string | null | undefined;
201
+ photoURL?: string | null | undefined;
202
+ displayName?: string | null | undefined;
203
+ phoneNumber?: string | null | undefined;
204
+ setToken: (token: string, tokenExpiredAt: Date) => void;
205
+ setAdminPermisssions: (permissions: FdoPermissionRule[]) => void;
206
+ setPermisssions: (permissions: FdoPermissionRule[]) => void;
207
+ readonly permissions: {
208
+ fields?: string[] | undefined;
209
+ conditions?: any;
210
+ inverted?: boolean | undefined;
211
+ reason?: string | undefined;
212
+ label: string;
213
+ actions: string | string[];
214
+ subject: string | string[];
215
+ }[];
216
+ getIdToken: () => Promise<string>;
217
+ } | null>;
218
+ setUser: (user: FeedMeUser | null) => Promise<void>;
219
+ signIn: () => Promise<void>;
220
+ signOut: () => void;
221
+ fetchUserAdminPermissions: () => Promise<void>;
222
+ fetchUserPermissions: () => Promise<void>;
142
223
  namespace: import("vue").Ref<FmNamespace>;
143
224
  currentCountry: import("vue").Ref<"AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KP" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW">;
144
225
  businesses: import("vue").Ref<{
@@ -150,6 +231,7 @@ export declare const useCore: import("pinia").StoreDefinition<"portal-core", imp
150
231
  clickupId?: string | null | undefined;
151
232
  members?: {
152
233
  pf_user?: {
234
+ email?: string | null | undefined;
153
235
  birthday?: {
154
236
  toString: () => string;
155
237
  toDateString: () => string;
@@ -215,11 +297,10 @@ export declare const useCore: import("pinia").StoreDefinition<"portal-core", imp
215
297
  } | null | undefined;
216
298
  gender?: "MALE" | "FEMALE" | null | undefined;
217
299
  addresses?: {
218
- name: string;
219
300
  address: string;
301
+ name: string;
220
302
  coordinates: number[];
221
303
  }[] | null | undefined;
222
- email?: string | null | undefined;
223
304
  photoURL?: string | null | undefined;
224
305
  displayName?: string | null | undefined;
225
306
  phoneNumber?: string | null | undefined;
@@ -229,46 +310,77 @@ export declare const useCore: import("pinia").StoreDefinition<"portal-core", imp
229
310
  } | null | undefined;
230
311
  _id: string;
231
312
  } | null | undefined;
232
- userId: string;
233
313
  role: "ADMIN";
314
+ userId: string;
234
315
  }[] | null | undefined;
235
- _id: string;
236
- name: string;
237
316
  code: string;
317
+ name: string;
318
+ _id: string;
238
319
  isReseller: boolean;
239
320
  } | null | undefined;
240
321
  thumbnail?: string | null | undefined;
241
322
  billingInfos?: {
242
323
  _id?: string | undefined;
243
- name: string;
244
- email: string;
245
324
  address: {
246
325
  coordinates?: number[] | undefined;
247
326
  line2?: string | undefined;
327
+ country: string;
248
328
  line1: string;
249
329
  state: string;
250
330
  city: string;
251
331
  postcode: string;
252
- country: string;
253
332
  };
333
+ name: string;
334
+ email: string;
254
335
  companyName: string;
255
336
  contact: string;
256
337
  }[] | null | undefined;
338
+ name: string;
257
339
  _id: string;
258
340
  ownerId: string;
259
- name: string;
260
341
  restaurantQuota: number;
261
342
  warehouseQuota: number;
262
343
  menuVersion: "v2" | "v3" | "v4";
263
344
  }[]>;
264
345
  currentBusiness: import("vue").Ref<FmpBusiness | undefined>;
346
+ restaurants: import("vue").Ref<{
347
+ id: string;
348
+ name: string;
349
+ managable: boolean;
350
+ }[]>;
351
+ readRestaurants: () => Promise<void>;
265
352
  currentApp: import("vue").Ref<string>;
266
353
  setNamespace: (ns: FmNamespace) => void;
267
- changeCountry: (country: F_COUNTRY) => void;
268
- getBusinesses: () => Promise<void>;
269
- changeBusiness: (business: FmpBusiness | undefined) => void;
354
+ changeCountry: (country: F_COUNTRY) => Promise<void>;
355
+ readBusinesses: () => Promise<FmpBusiness | undefined>;
356
+ changeBusiness: (business: FmpBusiness | undefined) => Promise<void>;
270
357
  setCurrentApp: (app: string) => void;
271
358
  }, never>, Pick<{
359
+ sessionUser: import("vue").Ref<{
360
+ id: string;
361
+ email?: string | null | undefined;
362
+ photoURL?: string | null | undefined;
363
+ displayName?: string | null | undefined;
364
+ phoneNumber?: string | null | undefined;
365
+ setToken: (token: string, tokenExpiredAt: Date) => void;
366
+ setAdminPermisssions: (permissions: FdoPermissionRule[]) => void;
367
+ setPermisssions: (permissions: FdoPermissionRule[]) => void;
368
+ readonly permissions: {
369
+ fields?: string[] | undefined;
370
+ conditions?: any;
371
+ inverted?: boolean | undefined;
372
+ reason?: string | undefined;
373
+ label: string;
374
+ actions: string | string[];
375
+ subject: string | string[];
376
+ }[];
377
+ getIdToken: () => Promise<string>;
378
+ } | null>;
379
+ setUser: (user: FeedMeUser | null) => Promise<void>;
380
+ signIn: () => Promise<void>;
381
+ signOut: () => void;
382
+ fetchUserAdminPermissions: () => Promise<void>;
383
+ fetchUserPermissions: () => Promise<void>;
272
384
  namespace: import("vue").Ref<FmNamespace>;
273
385
  currentCountry: import("vue").Ref<"AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KP" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW">;
274
386
  businesses: import("vue").Ref<{
@@ -280,6 +392,7 @@ export declare const useCore: import("pinia").StoreDefinition<"portal-core", imp
280
392
  clickupId?: string | null | undefined;
281
393
  members?: {
282
394
  pf_user?: {
395
+ email?: string | null | undefined;
283
396
  birthday?: {
284
397
  toString: () => string;
285
398
  toDateString: () => string;
@@ -345,11 +458,10 @@ export declare const useCore: import("pinia").StoreDefinition<"portal-core", imp
345
458
  } | null | undefined;
346
459
  gender?: "MALE" | "FEMALE" | null | undefined;
347
460
  addresses?: {
348
- name: string;
349
461
  address: string;
462
+ name: string;
350
463
  coordinates: number[];
351
464
  }[] | null | undefined;
352
- email?: string | null | undefined;
353
465
  photoURL?: string | null | undefined;
354
466
  displayName?: string | null | undefined;
355
467
  phoneNumber?: string | null | undefined;
@@ -359,44 +471,50 @@ export declare const useCore: import("pinia").StoreDefinition<"portal-core", imp
359
471
  } | null | undefined;
360
472
  _id: string;
361
473
  } | null | undefined;
362
- userId: string;
363
474
  role: "ADMIN";
475
+ userId: string;
364
476
  }[] | null | undefined;
365
- _id: string;
366
- name: string;
367
477
  code: string;
478
+ name: string;
479
+ _id: string;
368
480
  isReseller: boolean;
369
481
  } | null | undefined;
370
482
  thumbnail?: string | null | undefined;
371
483
  billingInfos?: {
372
484
  _id?: string | undefined;
373
- name: string;
374
- email: string;
375
485
  address: {
376
486
  coordinates?: number[] | undefined;
377
487
  line2?: string | undefined;
488
+ country: string;
378
489
  line1: string;
379
490
  state: string;
380
491
  city: string;
381
492
  postcode: string;
382
- country: string;
383
493
  };
494
+ name: string;
495
+ email: string;
384
496
  companyName: string;
385
497
  contact: string;
386
498
  }[] | null | undefined;
499
+ name: string;
387
500
  _id: string;
388
501
  ownerId: string;
389
- name: string;
390
502
  restaurantQuota: number;
391
503
  warehouseQuota: number;
392
504
  menuVersion: "v2" | "v3" | "v4";
393
505
  }[]>;
394
506
  currentBusiness: import("vue").Ref<FmpBusiness | undefined>;
507
+ restaurants: import("vue").Ref<{
508
+ id: string;
509
+ name: string;
510
+ managable: boolean;
511
+ }[]>;
512
+ readRestaurants: () => Promise<void>;
395
513
  currentApp: import("vue").Ref<string>;
396
514
  setNamespace: (ns: FmNamespace) => void;
397
- changeCountry: (country: F_COUNTRY) => void;
398
- getBusinesses: () => Promise<void>;
399
- changeBusiness: (business: FmpBusiness | undefined) => void;
515
+ changeCountry: (country: F_COUNTRY) => Promise<void>;
516
+ readBusinesses: () => Promise<FmpBusiness | undefined>;
517
+ changeBusiness: (business: FmpBusiness | undefined) => Promise<void>;
400
518
  setCurrentApp: (app: string) => void;
401
- }, "setNamespace" | "changeCountry" | "getBusinesses" | "changeBusiness" | "setCurrentApp">>;
519
+ }, "setUser" | "signIn" | "signOut" | "fetchUserAdminPermissions" | "fetchUserPermissions" | "readRestaurants" | "setNamespace" | "changeCountry" | "readBusinesses" | "changeBusiness" | "setCurrentApp">>;
402
520
  export {};
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .user-info-icon[data-v-9d3da917]{height:32px;min-height:32px;min-width:32px;width:32px}
1
+ .user-info-icon[data-v-76ddafe8]{height:32px;min-height:32px;min-width:32px;width:32px}