@zaaxch/grasp-vue 0.0.0-stage → 0.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.
- package/README.md +11 -2
- package/dist/client.d.ts +95 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +222 -0
- package/dist/client.js.map +1 -0
- package/dist/components.d.ts +64 -0
- package/dist/components.d.ts.map +1 -0
- package/dist/components.js +369 -0
- package/dist/components.js.map +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -0
- package/dist/router.d.ts +19 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +132 -0
- package/dist/router.js.map +1 -0
- package/dist/stores.d.ts +605 -0
- package/dist/stores.d.ts.map +1 -0
- package/dist/stores.js +355 -0
- package/dist/stores.js.map +1 -0
- package/dist/theme.d.ts +16 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +26 -0
- package/dist/theme.js.map +1 -0
- package/package.json +71 -3
package/dist/stores.d.ts
ADDED
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
import type { AnyAppContract, BillingInterval, EffectiveEntitlement, GraspError, InferClientContract, ResolvedGraspConfig } from '@zaaxch/grasp-core';
|
|
2
|
+
import { type Auth, type GoogleAuthProvider } from 'firebase/auth';
|
|
3
|
+
import { type InjectionKey } from 'vue';
|
|
4
|
+
import type { DevPersonaInfo, ShellBillingSummary, ShellClient } from './client.js';
|
|
5
|
+
export interface GraspNotification {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly severity: 'info' | 'success' | 'warn' | 'error';
|
|
8
|
+
readonly summary: string;
|
|
9
|
+
readonly detail?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GraspNavItem {
|
|
12
|
+
readonly label: string;
|
|
13
|
+
readonly to: string;
|
|
14
|
+
readonly minPlan?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const GRASP_API_KEY: InjectionKey<unknown>;
|
|
17
|
+
export declare const GRASP_SHELL_KEY: InjectionKey<ShellClient>;
|
|
18
|
+
export declare const GRASP_CONFIG_KEY: InjectionKey<ResolvedGraspConfig>;
|
|
19
|
+
export declare const GRASP_NAV_KEY: InjectionKey<readonly GraspNavItem[]>;
|
|
20
|
+
export declare function useGraspApi<TAppContract extends AnyAppContract>(): InferClientContract<TAppContract>;
|
|
21
|
+
export declare function useGraspShell(): ShellClient;
|
|
22
|
+
export declare function useGraspConfig(): ResolvedGraspConfig;
|
|
23
|
+
export declare const useNotificationsStore: import("pinia").StoreDefinition<"grasp-notifications", Pick<{
|
|
24
|
+
items: import("vue").Ref<{
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly severity: "info" | "success" | "warn" | "error";
|
|
27
|
+
readonly summary: string;
|
|
28
|
+
readonly detail?: string;
|
|
29
|
+
}[], GraspNotification[] | {
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly severity: "info" | "success" | "warn" | "error";
|
|
32
|
+
readonly summary: string;
|
|
33
|
+
readonly detail?: string;
|
|
34
|
+
}[]>;
|
|
35
|
+
push: (input: Omit<GraspNotification, "id">) => string;
|
|
36
|
+
pushError: (error: unknown) => string;
|
|
37
|
+
dismiss: (id: string) => void;
|
|
38
|
+
clear: () => void;
|
|
39
|
+
}, "items">, Pick<{
|
|
40
|
+
items: import("vue").Ref<{
|
|
41
|
+
readonly id: string;
|
|
42
|
+
readonly severity: "info" | "success" | "warn" | "error";
|
|
43
|
+
readonly summary: string;
|
|
44
|
+
readonly detail?: string;
|
|
45
|
+
}[], GraspNotification[] | {
|
|
46
|
+
readonly id: string;
|
|
47
|
+
readonly severity: "info" | "success" | "warn" | "error";
|
|
48
|
+
readonly summary: string;
|
|
49
|
+
readonly detail?: string;
|
|
50
|
+
}[]>;
|
|
51
|
+
push: (input: Omit<GraspNotification, "id">) => string;
|
|
52
|
+
pushError: (error: unknown) => string;
|
|
53
|
+
dismiss: (id: string) => void;
|
|
54
|
+
clear: () => void;
|
|
55
|
+
}, never>, Pick<{
|
|
56
|
+
items: import("vue").Ref<{
|
|
57
|
+
readonly id: string;
|
|
58
|
+
readonly severity: "info" | "success" | "warn" | "error";
|
|
59
|
+
readonly summary: string;
|
|
60
|
+
readonly detail?: string;
|
|
61
|
+
}[], GraspNotification[] | {
|
|
62
|
+
readonly id: string;
|
|
63
|
+
readonly severity: "info" | "success" | "warn" | "error";
|
|
64
|
+
readonly summary: string;
|
|
65
|
+
readonly detail?: string;
|
|
66
|
+
}[]>;
|
|
67
|
+
push: (input: Omit<GraspNotification, "id">) => string;
|
|
68
|
+
pushError: (error: unknown) => string;
|
|
69
|
+
dismiss: (id: string) => void;
|
|
70
|
+
clear: () => void;
|
|
71
|
+
}, "push" | "pushError" | "dismiss" | "clear">>;
|
|
72
|
+
export interface AuthRuntimeBinding {
|
|
73
|
+
readonly shellClient: ShellClient;
|
|
74
|
+
readonly firebaseAuth?: Auth;
|
|
75
|
+
readonly googleProvider?: GoogleAuthProvider;
|
|
76
|
+
readonly tokenStorageKey?: string;
|
|
77
|
+
}
|
|
78
|
+
export declare const useAuthStore: import("pinia").StoreDefinition<"grasp-auth", Pick<{
|
|
79
|
+
user: import("vue").Ref<{
|
|
80
|
+
id: import("@zaaxch/grasp-core").Brand<string, "UserId">;
|
|
81
|
+
email: string | null;
|
|
82
|
+
displayName: string | null;
|
|
83
|
+
avatarUrl: string | null;
|
|
84
|
+
createdAt: string;
|
|
85
|
+
updatedAt: string;
|
|
86
|
+
emailVerified?: boolean | undefined;
|
|
87
|
+
} | null, {
|
|
88
|
+
id: import("@zaaxch/grasp-core").Brand<string, "UserId">;
|
|
89
|
+
email: string | null;
|
|
90
|
+
displayName: string | null;
|
|
91
|
+
avatarUrl: string | null;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
updatedAt: string;
|
|
94
|
+
emailVerified?: boolean | undefined;
|
|
95
|
+
} | {
|
|
96
|
+
id: import("@zaaxch/grasp-core").Brand<string, "UserId">;
|
|
97
|
+
email: string | null;
|
|
98
|
+
displayName: string | null;
|
|
99
|
+
avatarUrl: string | null;
|
|
100
|
+
createdAt: string;
|
|
101
|
+
updatedAt: string;
|
|
102
|
+
emailVerified?: boolean | undefined;
|
|
103
|
+
} | null>;
|
|
104
|
+
entitlement: import("vue").Ref<{
|
|
105
|
+
readonly planId: string;
|
|
106
|
+
readonly planName: string;
|
|
107
|
+
readonly rank: number;
|
|
108
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
109
|
+
readonly creditBalance: number;
|
|
110
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
111
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
112
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
113
|
+
readonly currentPeriodEnd?: string;
|
|
114
|
+
readonly entitledThrough?: string;
|
|
115
|
+
} | null, EffectiveEntitlement<string, Readonly<Record<string, number | boolean>>> | {
|
|
116
|
+
readonly planId: string;
|
|
117
|
+
readonly planName: string;
|
|
118
|
+
readonly rank: number;
|
|
119
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
120
|
+
readonly creditBalance: number;
|
|
121
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
122
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
123
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
124
|
+
readonly currentPeriodEnd?: string;
|
|
125
|
+
readonly entitledThrough?: string;
|
|
126
|
+
} | null>;
|
|
127
|
+
devMode: import("vue").Ref<boolean, boolean>;
|
|
128
|
+
personas: import("vue").Ref<readonly {
|
|
129
|
+
readonly uid: string;
|
|
130
|
+
readonly email: string;
|
|
131
|
+
readonly displayName: string;
|
|
132
|
+
readonly avatarUrl?: string;
|
|
133
|
+
}[], readonly DevPersonaInfo[] | readonly {
|
|
134
|
+
readonly uid: string;
|
|
135
|
+
readonly email: string;
|
|
136
|
+
readonly displayName: string;
|
|
137
|
+
readonly avatarUrl?: string;
|
|
138
|
+
}[]>;
|
|
139
|
+
ready: import("vue").Ref<boolean, boolean>;
|
|
140
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
141
|
+
error: import("vue").Ref<string | null, string | null>;
|
|
142
|
+
sessionGeneration: import("vue").Ref<number, number>;
|
|
143
|
+
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
144
|
+
configure: (nextBinding: AuthRuntimeBinding) => void;
|
|
145
|
+
getAccessToken: () => Promise<string | null>;
|
|
146
|
+
bootstrap: () => Promise<void>;
|
|
147
|
+
refreshSession: () => Promise<void>;
|
|
148
|
+
signInWithDevPersona: (uid: string) => Promise<void>;
|
|
149
|
+
signInWithGoogle: () => Promise<void>;
|
|
150
|
+
logout: () => Promise<void>;
|
|
151
|
+
deleteAccount: () => Promise<void>;
|
|
152
|
+
}, "user" | "ready" | "error" | "entitlement" | "devMode" | "personas" | "loading" | "sessionGeneration">, Pick<{
|
|
153
|
+
user: import("vue").Ref<{
|
|
154
|
+
id: import("@zaaxch/grasp-core").Brand<string, "UserId">;
|
|
155
|
+
email: string | null;
|
|
156
|
+
displayName: string | null;
|
|
157
|
+
avatarUrl: string | null;
|
|
158
|
+
createdAt: string;
|
|
159
|
+
updatedAt: string;
|
|
160
|
+
emailVerified?: boolean | undefined;
|
|
161
|
+
} | null, {
|
|
162
|
+
id: import("@zaaxch/grasp-core").Brand<string, "UserId">;
|
|
163
|
+
email: string | null;
|
|
164
|
+
displayName: string | null;
|
|
165
|
+
avatarUrl: string | null;
|
|
166
|
+
createdAt: string;
|
|
167
|
+
updatedAt: string;
|
|
168
|
+
emailVerified?: boolean | undefined;
|
|
169
|
+
} | {
|
|
170
|
+
id: import("@zaaxch/grasp-core").Brand<string, "UserId">;
|
|
171
|
+
email: string | null;
|
|
172
|
+
displayName: string | null;
|
|
173
|
+
avatarUrl: string | null;
|
|
174
|
+
createdAt: string;
|
|
175
|
+
updatedAt: string;
|
|
176
|
+
emailVerified?: boolean | undefined;
|
|
177
|
+
} | null>;
|
|
178
|
+
entitlement: import("vue").Ref<{
|
|
179
|
+
readonly planId: string;
|
|
180
|
+
readonly planName: string;
|
|
181
|
+
readonly rank: number;
|
|
182
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
183
|
+
readonly creditBalance: number;
|
|
184
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
185
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
186
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
187
|
+
readonly currentPeriodEnd?: string;
|
|
188
|
+
readonly entitledThrough?: string;
|
|
189
|
+
} | null, EffectiveEntitlement<string, Readonly<Record<string, number | boolean>>> | {
|
|
190
|
+
readonly planId: string;
|
|
191
|
+
readonly planName: string;
|
|
192
|
+
readonly rank: number;
|
|
193
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
194
|
+
readonly creditBalance: number;
|
|
195
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
196
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
197
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
198
|
+
readonly currentPeriodEnd?: string;
|
|
199
|
+
readonly entitledThrough?: string;
|
|
200
|
+
} | null>;
|
|
201
|
+
devMode: import("vue").Ref<boolean, boolean>;
|
|
202
|
+
personas: import("vue").Ref<readonly {
|
|
203
|
+
readonly uid: string;
|
|
204
|
+
readonly email: string;
|
|
205
|
+
readonly displayName: string;
|
|
206
|
+
readonly avatarUrl?: string;
|
|
207
|
+
}[], readonly DevPersonaInfo[] | readonly {
|
|
208
|
+
readonly uid: string;
|
|
209
|
+
readonly email: string;
|
|
210
|
+
readonly displayName: string;
|
|
211
|
+
readonly avatarUrl?: string;
|
|
212
|
+
}[]>;
|
|
213
|
+
ready: import("vue").Ref<boolean, boolean>;
|
|
214
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
215
|
+
error: import("vue").Ref<string | null, string | null>;
|
|
216
|
+
sessionGeneration: import("vue").Ref<number, number>;
|
|
217
|
+
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
218
|
+
configure: (nextBinding: AuthRuntimeBinding) => void;
|
|
219
|
+
getAccessToken: () => Promise<string | null>;
|
|
220
|
+
bootstrap: () => Promise<void>;
|
|
221
|
+
refreshSession: () => Promise<void>;
|
|
222
|
+
signInWithDevPersona: (uid: string) => Promise<void>;
|
|
223
|
+
signInWithGoogle: () => Promise<void>;
|
|
224
|
+
logout: () => Promise<void>;
|
|
225
|
+
deleteAccount: () => Promise<void>;
|
|
226
|
+
}, "isAuthenticated">, Pick<{
|
|
227
|
+
user: import("vue").Ref<{
|
|
228
|
+
id: import("@zaaxch/grasp-core").Brand<string, "UserId">;
|
|
229
|
+
email: string | null;
|
|
230
|
+
displayName: string | null;
|
|
231
|
+
avatarUrl: string | null;
|
|
232
|
+
createdAt: string;
|
|
233
|
+
updatedAt: string;
|
|
234
|
+
emailVerified?: boolean | undefined;
|
|
235
|
+
} | null, {
|
|
236
|
+
id: import("@zaaxch/grasp-core").Brand<string, "UserId">;
|
|
237
|
+
email: string | null;
|
|
238
|
+
displayName: string | null;
|
|
239
|
+
avatarUrl: string | null;
|
|
240
|
+
createdAt: string;
|
|
241
|
+
updatedAt: string;
|
|
242
|
+
emailVerified?: boolean | undefined;
|
|
243
|
+
} | {
|
|
244
|
+
id: import("@zaaxch/grasp-core").Brand<string, "UserId">;
|
|
245
|
+
email: string | null;
|
|
246
|
+
displayName: string | null;
|
|
247
|
+
avatarUrl: string | null;
|
|
248
|
+
createdAt: string;
|
|
249
|
+
updatedAt: string;
|
|
250
|
+
emailVerified?: boolean | undefined;
|
|
251
|
+
} | null>;
|
|
252
|
+
entitlement: import("vue").Ref<{
|
|
253
|
+
readonly planId: string;
|
|
254
|
+
readonly planName: string;
|
|
255
|
+
readonly rank: number;
|
|
256
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
257
|
+
readonly creditBalance: number;
|
|
258
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
259
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
260
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
261
|
+
readonly currentPeriodEnd?: string;
|
|
262
|
+
readonly entitledThrough?: string;
|
|
263
|
+
} | null, EffectiveEntitlement<string, Readonly<Record<string, number | boolean>>> | {
|
|
264
|
+
readonly planId: string;
|
|
265
|
+
readonly planName: string;
|
|
266
|
+
readonly rank: number;
|
|
267
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
268
|
+
readonly creditBalance: number;
|
|
269
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
270
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
271
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
272
|
+
readonly currentPeriodEnd?: string;
|
|
273
|
+
readonly entitledThrough?: string;
|
|
274
|
+
} | null>;
|
|
275
|
+
devMode: import("vue").Ref<boolean, boolean>;
|
|
276
|
+
personas: import("vue").Ref<readonly {
|
|
277
|
+
readonly uid: string;
|
|
278
|
+
readonly email: string;
|
|
279
|
+
readonly displayName: string;
|
|
280
|
+
readonly avatarUrl?: string;
|
|
281
|
+
}[], readonly DevPersonaInfo[] | readonly {
|
|
282
|
+
readonly uid: string;
|
|
283
|
+
readonly email: string;
|
|
284
|
+
readonly displayName: string;
|
|
285
|
+
readonly avatarUrl?: string;
|
|
286
|
+
}[]>;
|
|
287
|
+
ready: import("vue").Ref<boolean, boolean>;
|
|
288
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
289
|
+
error: import("vue").Ref<string | null, string | null>;
|
|
290
|
+
sessionGeneration: import("vue").Ref<number, number>;
|
|
291
|
+
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
292
|
+
configure: (nextBinding: AuthRuntimeBinding) => void;
|
|
293
|
+
getAccessToken: () => Promise<string | null>;
|
|
294
|
+
bootstrap: () => Promise<void>;
|
|
295
|
+
refreshSession: () => Promise<void>;
|
|
296
|
+
signInWithDevPersona: (uid: string) => Promise<void>;
|
|
297
|
+
signInWithGoogle: () => Promise<void>;
|
|
298
|
+
logout: () => Promise<void>;
|
|
299
|
+
deleteAccount: () => Promise<void>;
|
|
300
|
+
}, "configure" | "getAccessToken" | "bootstrap" | "refreshSession" | "signInWithDevPersona" | "signInWithGoogle" | "logout" | "deleteAccount">>;
|
|
301
|
+
export declare const useBillingStore: import("pinia").StoreDefinition<"grasp-billing", Pick<{
|
|
302
|
+
summary: import("vue").Ref<{
|
|
303
|
+
readonly enabled: boolean;
|
|
304
|
+
readonly effective: {
|
|
305
|
+
readonly planId: string;
|
|
306
|
+
readonly planName: string;
|
|
307
|
+
readonly rank: number;
|
|
308
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
309
|
+
readonly creditBalance: number;
|
|
310
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
311
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
312
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
313
|
+
readonly currentPeriodEnd?: string;
|
|
314
|
+
readonly entitledThrough?: string;
|
|
315
|
+
};
|
|
316
|
+
readonly canCheckout: boolean;
|
|
317
|
+
readonly canManagePortal: boolean;
|
|
318
|
+
readonly plans: readonly {
|
|
319
|
+
readonly id: string;
|
|
320
|
+
readonly name: string;
|
|
321
|
+
readonly rank: number;
|
|
322
|
+
readonly trialDays?: number;
|
|
323
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
324
|
+
readonly upgradable: boolean;
|
|
325
|
+
readonly prices: {
|
|
326
|
+
readonly month?: {
|
|
327
|
+
readonly priceId: string;
|
|
328
|
+
readonly unitAmount: number;
|
|
329
|
+
readonly currency: string;
|
|
330
|
+
};
|
|
331
|
+
readonly year?: {
|
|
332
|
+
readonly priceId: string;
|
|
333
|
+
readonly unitAmount: number;
|
|
334
|
+
readonly currency: string;
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
}[];
|
|
338
|
+
readonly creditPacks: readonly {
|
|
339
|
+
readonly id: string;
|
|
340
|
+
readonly name: string;
|
|
341
|
+
readonly credits: number;
|
|
342
|
+
readonly priceId?: string;
|
|
343
|
+
readonly unitAmount?: number;
|
|
344
|
+
readonly currency?: string;
|
|
345
|
+
}[];
|
|
346
|
+
} | null, ShellBillingSummary | {
|
|
347
|
+
readonly enabled: boolean;
|
|
348
|
+
readonly effective: {
|
|
349
|
+
readonly planId: string;
|
|
350
|
+
readonly planName: string;
|
|
351
|
+
readonly rank: number;
|
|
352
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
353
|
+
readonly creditBalance: number;
|
|
354
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
355
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
356
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
357
|
+
readonly currentPeriodEnd?: string;
|
|
358
|
+
readonly entitledThrough?: string;
|
|
359
|
+
};
|
|
360
|
+
readonly canCheckout: boolean;
|
|
361
|
+
readonly canManagePortal: boolean;
|
|
362
|
+
readonly plans: readonly {
|
|
363
|
+
readonly id: string;
|
|
364
|
+
readonly name: string;
|
|
365
|
+
readonly rank: number;
|
|
366
|
+
readonly trialDays?: number;
|
|
367
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
368
|
+
readonly upgradable: boolean;
|
|
369
|
+
readonly prices: {
|
|
370
|
+
readonly month?: {
|
|
371
|
+
readonly priceId: string;
|
|
372
|
+
readonly unitAmount: number;
|
|
373
|
+
readonly currency: string;
|
|
374
|
+
};
|
|
375
|
+
readonly year?: {
|
|
376
|
+
readonly priceId: string;
|
|
377
|
+
readonly unitAmount: number;
|
|
378
|
+
readonly currency: string;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
}[];
|
|
382
|
+
readonly creditPacks: readonly {
|
|
383
|
+
readonly id: string;
|
|
384
|
+
readonly name: string;
|
|
385
|
+
readonly credits: number;
|
|
386
|
+
readonly priceId?: string;
|
|
387
|
+
readonly unitAmount?: number;
|
|
388
|
+
readonly currency?: string;
|
|
389
|
+
}[];
|
|
390
|
+
} | null>;
|
|
391
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
392
|
+
busy: import("vue").Ref<boolean, boolean>;
|
|
393
|
+
error: import("vue").Ref<GraspError | Error | null, GraspError | Error | null>;
|
|
394
|
+
configure: (options: {
|
|
395
|
+
readonly shellClient: ShellClient;
|
|
396
|
+
readonly onNavigate?: (url: string) => void;
|
|
397
|
+
}) => void;
|
|
398
|
+
refresh: () => Promise<ShellBillingSummary>;
|
|
399
|
+
checkoutPlan: (planId: string, interval: BillingInterval, redirect?: boolean) => Promise<string>;
|
|
400
|
+
checkoutCredits: (packId: string, redirect?: boolean) => Promise<string>;
|
|
401
|
+
openPortal: (redirect?: boolean) => Promise<string>;
|
|
402
|
+
}, "error" | "summary" | "loading" | "busy">, Pick<{
|
|
403
|
+
summary: import("vue").Ref<{
|
|
404
|
+
readonly enabled: boolean;
|
|
405
|
+
readonly effective: {
|
|
406
|
+
readonly planId: string;
|
|
407
|
+
readonly planName: string;
|
|
408
|
+
readonly rank: number;
|
|
409
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
410
|
+
readonly creditBalance: number;
|
|
411
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
412
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
413
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
414
|
+
readonly currentPeriodEnd?: string;
|
|
415
|
+
readonly entitledThrough?: string;
|
|
416
|
+
};
|
|
417
|
+
readonly canCheckout: boolean;
|
|
418
|
+
readonly canManagePortal: boolean;
|
|
419
|
+
readonly plans: readonly {
|
|
420
|
+
readonly id: string;
|
|
421
|
+
readonly name: string;
|
|
422
|
+
readonly rank: number;
|
|
423
|
+
readonly trialDays?: number;
|
|
424
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
425
|
+
readonly upgradable: boolean;
|
|
426
|
+
readonly prices: {
|
|
427
|
+
readonly month?: {
|
|
428
|
+
readonly priceId: string;
|
|
429
|
+
readonly unitAmount: number;
|
|
430
|
+
readonly currency: string;
|
|
431
|
+
};
|
|
432
|
+
readonly year?: {
|
|
433
|
+
readonly priceId: string;
|
|
434
|
+
readonly unitAmount: number;
|
|
435
|
+
readonly currency: string;
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
}[];
|
|
439
|
+
readonly creditPacks: readonly {
|
|
440
|
+
readonly id: string;
|
|
441
|
+
readonly name: string;
|
|
442
|
+
readonly credits: number;
|
|
443
|
+
readonly priceId?: string;
|
|
444
|
+
readonly unitAmount?: number;
|
|
445
|
+
readonly currency?: string;
|
|
446
|
+
}[];
|
|
447
|
+
} | null, ShellBillingSummary | {
|
|
448
|
+
readonly enabled: boolean;
|
|
449
|
+
readonly effective: {
|
|
450
|
+
readonly planId: string;
|
|
451
|
+
readonly planName: string;
|
|
452
|
+
readonly rank: number;
|
|
453
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
454
|
+
readonly creditBalance: number;
|
|
455
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
456
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
457
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
458
|
+
readonly currentPeriodEnd?: string;
|
|
459
|
+
readonly entitledThrough?: string;
|
|
460
|
+
};
|
|
461
|
+
readonly canCheckout: boolean;
|
|
462
|
+
readonly canManagePortal: boolean;
|
|
463
|
+
readonly plans: readonly {
|
|
464
|
+
readonly id: string;
|
|
465
|
+
readonly name: string;
|
|
466
|
+
readonly rank: number;
|
|
467
|
+
readonly trialDays?: number;
|
|
468
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
469
|
+
readonly upgradable: boolean;
|
|
470
|
+
readonly prices: {
|
|
471
|
+
readonly month?: {
|
|
472
|
+
readonly priceId: string;
|
|
473
|
+
readonly unitAmount: number;
|
|
474
|
+
readonly currency: string;
|
|
475
|
+
};
|
|
476
|
+
readonly year?: {
|
|
477
|
+
readonly priceId: string;
|
|
478
|
+
readonly unitAmount: number;
|
|
479
|
+
readonly currency: string;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
}[];
|
|
483
|
+
readonly creditPacks: readonly {
|
|
484
|
+
readonly id: string;
|
|
485
|
+
readonly name: string;
|
|
486
|
+
readonly credits: number;
|
|
487
|
+
readonly priceId?: string;
|
|
488
|
+
readonly unitAmount?: number;
|
|
489
|
+
readonly currency?: string;
|
|
490
|
+
}[];
|
|
491
|
+
} | null>;
|
|
492
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
493
|
+
busy: import("vue").Ref<boolean, boolean>;
|
|
494
|
+
error: import("vue").Ref<GraspError | Error | null, GraspError | Error | null>;
|
|
495
|
+
configure: (options: {
|
|
496
|
+
readonly shellClient: ShellClient;
|
|
497
|
+
readonly onNavigate?: (url: string) => void;
|
|
498
|
+
}) => void;
|
|
499
|
+
refresh: () => Promise<ShellBillingSummary>;
|
|
500
|
+
checkoutPlan: (planId: string, interval: BillingInterval, redirect?: boolean) => Promise<string>;
|
|
501
|
+
checkoutCredits: (packId: string, redirect?: boolean) => Promise<string>;
|
|
502
|
+
openPortal: (redirect?: boolean) => Promise<string>;
|
|
503
|
+
}, never>, Pick<{
|
|
504
|
+
summary: import("vue").Ref<{
|
|
505
|
+
readonly enabled: boolean;
|
|
506
|
+
readonly effective: {
|
|
507
|
+
readonly planId: string;
|
|
508
|
+
readonly planName: string;
|
|
509
|
+
readonly rank: number;
|
|
510
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
511
|
+
readonly creditBalance: number;
|
|
512
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
513
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
514
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
515
|
+
readonly currentPeriodEnd?: string;
|
|
516
|
+
readonly entitledThrough?: string;
|
|
517
|
+
};
|
|
518
|
+
readonly canCheckout: boolean;
|
|
519
|
+
readonly canManagePortal: boolean;
|
|
520
|
+
readonly plans: readonly {
|
|
521
|
+
readonly id: string;
|
|
522
|
+
readonly name: string;
|
|
523
|
+
readonly rank: number;
|
|
524
|
+
readonly trialDays?: number;
|
|
525
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
526
|
+
readonly upgradable: boolean;
|
|
527
|
+
readonly prices: {
|
|
528
|
+
readonly month?: {
|
|
529
|
+
readonly priceId: string;
|
|
530
|
+
readonly unitAmount: number;
|
|
531
|
+
readonly currency: string;
|
|
532
|
+
};
|
|
533
|
+
readonly year?: {
|
|
534
|
+
readonly priceId: string;
|
|
535
|
+
readonly unitAmount: number;
|
|
536
|
+
readonly currency: string;
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
}[];
|
|
540
|
+
readonly creditPacks: readonly {
|
|
541
|
+
readonly id: string;
|
|
542
|
+
readonly name: string;
|
|
543
|
+
readonly credits: number;
|
|
544
|
+
readonly priceId?: string;
|
|
545
|
+
readonly unitAmount?: number;
|
|
546
|
+
readonly currency?: string;
|
|
547
|
+
}[];
|
|
548
|
+
} | null, ShellBillingSummary | {
|
|
549
|
+
readonly enabled: boolean;
|
|
550
|
+
readonly effective: {
|
|
551
|
+
readonly planId: string;
|
|
552
|
+
readonly planName: string;
|
|
553
|
+
readonly rank: number;
|
|
554
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
555
|
+
readonly creditBalance: number;
|
|
556
|
+
readonly source: import("@zaaxch/grasp-core").EntitlementSource;
|
|
557
|
+
readonly status: import("@zaaxch/grasp-core").EntitlementStatus;
|
|
558
|
+
readonly cancelAtPeriodEnd: boolean;
|
|
559
|
+
readonly currentPeriodEnd?: string;
|
|
560
|
+
readonly entitledThrough?: string;
|
|
561
|
+
};
|
|
562
|
+
readonly canCheckout: boolean;
|
|
563
|
+
readonly canManagePortal: boolean;
|
|
564
|
+
readonly plans: readonly {
|
|
565
|
+
readonly id: string;
|
|
566
|
+
readonly name: string;
|
|
567
|
+
readonly rank: number;
|
|
568
|
+
readonly trialDays?: number;
|
|
569
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
570
|
+
readonly upgradable: boolean;
|
|
571
|
+
readonly prices: {
|
|
572
|
+
readonly month?: {
|
|
573
|
+
readonly priceId: string;
|
|
574
|
+
readonly unitAmount: number;
|
|
575
|
+
readonly currency: string;
|
|
576
|
+
};
|
|
577
|
+
readonly year?: {
|
|
578
|
+
readonly priceId: string;
|
|
579
|
+
readonly unitAmount: number;
|
|
580
|
+
readonly currency: string;
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
}[];
|
|
584
|
+
readonly creditPacks: readonly {
|
|
585
|
+
readonly id: string;
|
|
586
|
+
readonly name: string;
|
|
587
|
+
readonly credits: number;
|
|
588
|
+
readonly priceId?: string;
|
|
589
|
+
readonly unitAmount?: number;
|
|
590
|
+
readonly currency?: string;
|
|
591
|
+
}[];
|
|
592
|
+
} | null>;
|
|
593
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
594
|
+
busy: import("vue").Ref<boolean, boolean>;
|
|
595
|
+
error: import("vue").Ref<GraspError | Error | null, GraspError | Error | null>;
|
|
596
|
+
configure: (options: {
|
|
597
|
+
readonly shellClient: ShellClient;
|
|
598
|
+
readonly onNavigate?: (url: string) => void;
|
|
599
|
+
}) => void;
|
|
600
|
+
refresh: () => Promise<ShellBillingSummary>;
|
|
601
|
+
checkoutPlan: (planId: string, interval: BillingInterval, redirect?: boolean) => Promise<string>;
|
|
602
|
+
checkoutCredits: (packId: string, redirect?: boolean) => Promise<string>;
|
|
603
|
+
openPortal: (redirect?: boolean) => Promise<string>;
|
|
604
|
+
}, "configure" | "refresh" | "checkoutPlan" | "checkoutCredits" | "openPortal">>;
|
|
605
|
+
//# sourceMappingURL=stores.d.ts.map
|
|
@@ -0,0 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