@feedmepos/mf-common 1.1.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/auth.d.ts CHANGED
@@ -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>;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -1,70 +1,13 @@
1
1
  import { type PropType } from 'vue';
2
2
  import type { FeedMeUser } from '../auth';
3
3
  import type { FmpBusiness } from '../store';
4
- declare const _default: import("vue").DefineComponent<{
4
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
5
5
  user: {
6
6
  type: PropType<FeedMeUser | null>;
7
7
  default: undefined;
8
8
  };
9
9
  businesses: {
10
- type: PropType<{
11
- internal?: boolean | null | undefined;
12
- expiredAt?: string | null | undefined;
13
- url?: string | null | undefined;
14
- agentId?: string | null | undefined;
15
- pf_agent?: {
16
- clickupId?: string | null | undefined;
17
- members?: {
18
- pf_user?: {
19
- email?: string | null | undefined;
20
- photoURL?: string | null | undefined;
21
- displayName?: string | null | undefined;
22
- phoneNumber?: string | null | undefined;
23
- birthday?: Date | null | undefined;
24
- gender?: "MALE" | "FEMALE" | null | undefined;
25
- addresses?: {
26
- address: string;
27
- name: string;
28
- coordinates: number[];
29
- }[] | null | undefined;
30
- imported?: {
31
- source: "FEEDME" | "CITY_POS" | "STOREHUB" | "KERUYUn" | "QISOFT" | "WECHAT" | "TEABAR" | "NULL_MEMBER" | "UMAI_POS" | "QASHIER" | "XILNET" | "GENIUSPOS" | "YHOFOODIE";
32
- raw: Record<string, any>;
33
- } | null | undefined;
34
- _id: string;
35
- } | null | undefined;
36
- userId: string;
37
- role: "ADMIN";
38
- }[] | null | undefined;
39
- code: string;
40
- name: string;
41
- _id: string;
42
- isReseller: boolean;
43
- } | null | undefined;
44
- thumbnail?: string | null | undefined;
45
- billingInfos?: {
46
- _id?: string | undefined;
47
- address: {
48
- coordinates?: number[] | undefined;
49
- line2?: string | undefined;
50
- state: string;
51
- line1: string;
52
- city: string;
53
- postcode: string;
54
- country: string;
55
- };
56
- name: string;
57
- email: string;
58
- companyName: string;
59
- contact: string;
60
- }[] | null | undefined;
61
- name: string;
62
- _id: string;
63
- ownerId: string;
64
- restaurantQuota: number;
65
- warehouseQuota: number;
66
- menuVersion: "v2" | "v3" | "v4";
67
- }[]>;
10
+ type: PropType<FmpBusiness[]>;
68
11
  required: true;
69
12
  };
70
13
  currentBusiness: {
@@ -111,64 +54,7 @@ declare const _default: import("vue").DefineComponent<{
111
54
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
112
55
  login: () => void;
113
56
  logout: () => void;
114
- "select-business": (business: {
115
- internal?: boolean | null | undefined;
116
- expiredAt?: string | null | undefined;
117
- url?: string | null | undefined;
118
- agentId?: string | null | undefined;
119
- pf_agent?: {
120
- clickupId?: string | null | undefined;
121
- members?: {
122
- pf_user?: {
123
- email?: string | null | undefined;
124
- photoURL?: string | null | undefined;
125
- displayName?: string | null | undefined;
126
- phoneNumber?: string | null | undefined;
127
- birthday?: Date | null | undefined;
128
- gender?: "MALE" | "FEMALE" | null | undefined;
129
- addresses?: {
130
- address: string;
131
- name: string;
132
- coordinates: number[];
133
- }[] | null | undefined;
134
- imported?: {
135
- source: "FEEDME" | "CITY_POS" | "STOREHUB" | "KERUYUn" | "QISOFT" | "WECHAT" | "TEABAR" | "NULL_MEMBER" | "UMAI_POS" | "QASHIER" | "XILNET" | "GENIUSPOS" | "YHOFOODIE";
136
- raw: Record<string, any>;
137
- } | null | undefined;
138
- _id: string;
139
- } | null | undefined;
140
- userId: string;
141
- role: "ADMIN";
142
- }[] | null | undefined;
143
- code: string;
144
- name: string;
145
- _id: string;
146
- isReseller: boolean;
147
- } | null | undefined;
148
- thumbnail?: string | null | undefined;
149
- billingInfos?: {
150
- _id?: string | undefined;
151
- address: {
152
- coordinates?: number[] | undefined;
153
- line2?: string | undefined;
154
- state: string;
155
- line1: string;
156
- city: string;
157
- postcode: string;
158
- country: string;
159
- };
160
- name: string;
161
- email: string;
162
- companyName: string;
163
- contact: string;
164
- }[] | null | undefined;
165
- name: string;
166
- _id: string;
167
- ownerId: string;
168
- restaurantQuota: number;
169
- warehouseQuota: number;
170
- menuVersion: "v2" | "v3" | "v4";
171
- }) => void;
57
+ "select-business": (business: FmpBusiness) => void;
172
58
  "select-country": (country: {
173
59
  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
60
  name: string;
@@ -205,64 +91,7 @@ declare const _default: import("vue").DefineComponent<{
205
91
  default: undefined;
206
92
  };
207
93
  businesses: {
208
- type: PropType<{
209
- internal?: boolean | null | undefined;
210
- expiredAt?: string | null | undefined;
211
- url?: string | null | undefined;
212
- agentId?: string | null | undefined;
213
- pf_agent?: {
214
- clickupId?: string | null | undefined;
215
- members?: {
216
- pf_user?: {
217
- email?: string | null | undefined;
218
- photoURL?: string | null | undefined;
219
- displayName?: string | null | undefined;
220
- phoneNumber?: string | null | undefined;
221
- birthday?: Date | null | undefined;
222
- gender?: "MALE" | "FEMALE" | null | undefined;
223
- addresses?: {
224
- address: string;
225
- name: string;
226
- coordinates: number[];
227
- }[] | null | undefined;
228
- imported?: {
229
- source: "FEEDME" | "CITY_POS" | "STOREHUB" | "KERUYUn" | "QISOFT" | "WECHAT" | "TEABAR" | "NULL_MEMBER" | "UMAI_POS" | "QASHIER" | "XILNET" | "GENIUSPOS" | "YHOFOODIE";
230
- raw: Record<string, any>;
231
- } | null | undefined;
232
- _id: string;
233
- } | null | undefined;
234
- userId: string;
235
- role: "ADMIN";
236
- }[] | null | undefined;
237
- code: string;
238
- name: string;
239
- _id: string;
240
- isReseller: boolean;
241
- } | null | undefined;
242
- thumbnail?: string | null | undefined;
243
- billingInfos?: {
244
- _id?: string | undefined;
245
- address: {
246
- coordinates?: number[] | undefined;
247
- line2?: string | undefined;
248
- state: string;
249
- line1: string;
250
- city: string;
251
- postcode: string;
252
- country: string;
253
- };
254
- name: string;
255
- email: string;
256
- companyName: string;
257
- contact: string;
258
- }[] | null | undefined;
259
- name: string;
260
- _id: string;
261
- ownerId: string;
262
- restaurantQuota: number;
263
- warehouseQuota: number;
264
- menuVersion: "v2" | "v3" | "v4";
265
- }[]>;
94
+ type: PropType<FmpBusiness[]>;
266
95
  required: true;
267
96
  };
268
97
  currentBusiness: {
@@ -309,64 +138,7 @@ declare const _default: import("vue").DefineComponent<{
309
138
  }>> & {
310
139
  onLogin?: (() => any) | undefined;
311
140
  onLogout?: (() => any) | undefined;
312
- "onSelect-business"?: ((business: {
313
- internal?: boolean | null | undefined;
314
- expiredAt?: string | null | undefined;
315
- url?: string | null | undefined;
316
- agentId?: string | null | undefined;
317
- pf_agent?: {
318
- clickupId?: string | null | undefined;
319
- members?: {
320
- pf_user?: {
321
- email?: string | null | undefined;
322
- photoURL?: string | null | undefined;
323
- displayName?: string | null | undefined;
324
- phoneNumber?: string | null | undefined;
325
- birthday?: Date | null | undefined;
326
- gender?: "MALE" | "FEMALE" | null | undefined;
327
- addresses?: {
328
- address: string;
329
- name: string;
330
- coordinates: number[];
331
- }[] | null | undefined;
332
- imported?: {
333
- source: "FEEDME" | "CITY_POS" | "STOREHUB" | "KERUYUn" | "QISOFT" | "WECHAT" | "TEABAR" | "NULL_MEMBER" | "UMAI_POS" | "QASHIER" | "XILNET" | "GENIUSPOS" | "YHOFOODIE";
334
- raw: Record<string, any>;
335
- } | null | undefined;
336
- _id: string;
337
- } | null | undefined;
338
- userId: string;
339
- role: "ADMIN";
340
- }[] | null | undefined;
341
- code: string;
342
- name: string;
343
- _id: string;
344
- isReseller: boolean;
345
- } | null | undefined;
346
- thumbnail?: string | null | undefined;
347
- billingInfos?: {
348
- _id?: string | undefined;
349
- address: {
350
- coordinates?: number[] | undefined;
351
- line2?: string | undefined;
352
- state: string;
353
- line1: string;
354
- city: string;
355
- postcode: string;
356
- country: string;
357
- };
358
- name: string;
359
- email: string;
360
- companyName: string;
361
- contact: string;
362
- }[] | null | undefined;
363
- name: string;
364
- _id: string;
365
- ownerId: string;
366
- restaurantQuota: number;
367
- warehouseQuota: number;
368
- menuVersion: "v2" | "v3" | "v4";
369
- }) => any) | undefined;
141
+ "onSelect-business"?: ((business: FmpBusiness) => any) | undefined;
370
142
  "onSelect-country"?: ((country: {
371
143
  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
144
  name: string;
@@ -400,5 +172,12 @@ declare const _default: import("vue").DefineComponent<{
400
172
  }, {
401
173
  currentBusiness: FmpBusiness;
402
174
  user: FeedMeUser | null;
403
- }, {}>;
175
+ }, {}>, {
176
+ actions?(_: {}): any;
177
+ }>;
404
178
  export default _default;
179
+ type __VLS_WithTemplateSlots<T, S> = T & {
180
+ new (): {
181
+ $slots: S;
182
+ };
183
+ };