@feedmepos/mf-common 1.1.1-alpha.2 → 1.2.0

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.
@@ -12,23 +12,16 @@ export declare class FeedMeAuth {
12
12
  static clientId: string;
13
13
  static baseUrl: string;
14
14
  private static _token;
15
- private static _currentUser;
16
15
  private static authStateChangeCallbacks;
17
16
  private static bgIframe;
18
17
  static setBaseUrl(isDev: boolean): void;
19
18
  private static startBackground;
20
19
  static initialize(clientId: string): void;
21
20
  static signIn(root?: HTMLElement): void;
22
- static onAuthStateChanged(callback: (user: FeedMeUser | null, token: string | null) => void): void;
21
+ static setToken(token: string): void;
22
+ static onAuthStateChanged(callback: (user: FeedMeUser | null, token: string | null) => void): () => void;
23
23
  static signOut(): void;
24
24
  static unmountPrompt(): void;
25
- static get currentUser(): {
26
- id: string;
27
- email?: string | null | undefined;
28
- photoURL?: string | null | undefined;
29
- displayName?: string | null | undefined;
30
- phoneNumber?: string | null | undefined;
31
- } | null;
32
25
  static get token(): string | null;
33
26
  static getCustomToken(): Promise<string>;
34
27
  static refreshToken(): Promise<string>;
@@ -1,5 +1,6 @@
1
1
  import { type PropType } from 'vue';
2
- import type { FeedMeUser } from '../plugins/auth';
2
+ import type { FeedMeUser } from '../auth';
3
+ import type { FmpBusiness } from '../store';
3
4
  declare const _default: import("vue").DefineComponent<{
4
5
  user: {
5
6
  type: PropType<FeedMeUser | null>;
@@ -46,11 +47,11 @@ declare const _default: import("vue").DefineComponent<{
46
47
  address: {
47
48
  coordinates?: number[] | undefined;
48
49
  line2?: string | undefined;
49
- country: string;
50
50
  state: string;
51
51
  line1: string;
52
52
  city: string;
53
53
  postcode: string;
54
+ country: string;
54
55
  };
55
56
  name: string;
56
57
  email: string;
@@ -66,7 +67,44 @@ declare const _default: import("vue").DefineComponent<{
66
67
  }[]>;
67
68
  required: true;
68
69
  };
69
- currentBusinessId: {
70
+ currentBusiness: {
71
+ type: PropType<FmpBusiness>;
72
+ default: undefined;
73
+ };
74
+ countries: {
75
+ type: PropType<{
76
+ code: "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";
77
+ name: string;
78
+ currency: {
79
+ symbol: string;
80
+ code: string;
81
+ precision: number;
82
+ format: string;
83
+ };
84
+ taxSystems: {
85
+ code: string;
86
+ name: string;
87
+ variants: {
88
+ default?: boolean | null | undefined;
89
+ rateByTime?: {
90
+ rate: {
91
+ amount: number;
92
+ precision: number;
93
+ };
94
+ startDate: string;
95
+ }[] | undefined;
96
+ code: string;
97
+ name: string;
98
+ rate: {
99
+ amount: number;
100
+ precision: number;
101
+ };
102
+ }[];
103
+ }[];
104
+ }[]>;
105
+ required: true;
106
+ };
107
+ currentCountry: {
70
108
  type: StringConstructor;
71
109
  required: true;
72
110
  };
@@ -113,11 +151,11 @@ declare const _default: import("vue").DefineComponent<{
113
151
  address: {
114
152
  coordinates?: number[] | undefined;
115
153
  line2?: string | undefined;
116
- country: string;
117
154
  state: string;
118
155
  line1: string;
119
156
  city: string;
120
157
  postcode: string;
158
+ country: string;
121
159
  };
122
160
  name: string;
123
161
  email: string;
@@ -131,6 +169,36 @@ declare const _default: import("vue").DefineComponent<{
131
169
  warehouseQuota: number;
132
170
  menuVersion: "v2" | "v3" | "v4";
133
171
  }) => void;
172
+ "select-country": (country: {
173
+ code: "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";
174
+ name: string;
175
+ currency: {
176
+ symbol: string;
177
+ code: string;
178
+ precision: number;
179
+ format: string;
180
+ };
181
+ taxSystems: {
182
+ code: string;
183
+ name: string;
184
+ variants: {
185
+ default?: boolean | null | undefined;
186
+ rateByTime?: {
187
+ rate: {
188
+ amount: number;
189
+ precision: number;
190
+ };
191
+ startDate: string;
192
+ }[] | undefined;
193
+ code: string;
194
+ name: string;
195
+ rate: {
196
+ amount: number;
197
+ precision: number;
198
+ };
199
+ }[];
200
+ }[];
201
+ }) => void;
134
202
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
135
203
  user: {
136
204
  type: PropType<FeedMeUser | null>;
@@ -177,11 +245,11 @@ declare const _default: import("vue").DefineComponent<{
177
245
  address: {
178
246
  coordinates?: number[] | undefined;
179
247
  line2?: string | undefined;
180
- country: string;
181
248
  state: string;
182
249
  line1: string;
183
250
  city: string;
184
251
  postcode: string;
252
+ country: string;
185
253
  };
186
254
  name: string;
187
255
  email: string;
@@ -197,7 +265,44 @@ declare const _default: import("vue").DefineComponent<{
197
265
  }[]>;
198
266
  required: true;
199
267
  };
200
- currentBusinessId: {
268
+ currentBusiness: {
269
+ type: PropType<FmpBusiness>;
270
+ default: undefined;
271
+ };
272
+ countries: {
273
+ type: PropType<{
274
+ code: "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";
275
+ name: string;
276
+ currency: {
277
+ symbol: string;
278
+ code: string;
279
+ precision: number;
280
+ format: string;
281
+ };
282
+ taxSystems: {
283
+ code: string;
284
+ name: string;
285
+ variants: {
286
+ default?: boolean | null | undefined;
287
+ rateByTime?: {
288
+ rate: {
289
+ amount: number;
290
+ precision: number;
291
+ };
292
+ startDate: string;
293
+ }[] | undefined;
294
+ code: string;
295
+ name: string;
296
+ rate: {
297
+ amount: number;
298
+ precision: number;
299
+ };
300
+ }[];
301
+ }[];
302
+ }[]>;
303
+ required: true;
304
+ };
305
+ currentCountry: {
201
306
  type: StringConstructor;
202
307
  required: true;
203
308
  };
@@ -244,11 +349,11 @@ declare const _default: import("vue").DefineComponent<{
244
349
  address: {
245
350
  coordinates?: number[] | undefined;
246
351
  line2?: string | undefined;
247
- country: string;
248
352
  state: string;
249
353
  line1: string;
250
354
  city: string;
251
355
  postcode: string;
356
+ country: string;
252
357
  };
253
358
  name: string;
254
359
  email: string;
@@ -262,7 +367,38 @@ declare const _default: import("vue").DefineComponent<{
262
367
  warehouseQuota: number;
263
368
  menuVersion: "v2" | "v3" | "v4";
264
369
  }) => any) | undefined;
370
+ "onSelect-country"?: ((country: {
371
+ code: "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";
372
+ name: string;
373
+ currency: {
374
+ symbol: string;
375
+ code: string;
376
+ precision: number;
377
+ format: string;
378
+ };
379
+ taxSystems: {
380
+ code: string;
381
+ name: string;
382
+ variants: {
383
+ default?: boolean | null | undefined;
384
+ rateByTime?: {
385
+ rate: {
386
+ amount: number;
387
+ precision: number;
388
+ };
389
+ startDate: string;
390
+ }[] | undefined;
391
+ code: string;
392
+ name: string;
393
+ rate: {
394
+ amount: number;
395
+ precision: number;
396
+ };
397
+ }[];
398
+ }[];
399
+ }) => any) | undefined;
265
400
  }, {
401
+ currentBusiness: FmpBusiness;
266
402
  user: FeedMeUser | null;
267
403
  }, {}>;
268
404
  export default _default;