@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/README.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@zaaxch/grasp-vue`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Zero-codegen typed RPC/SSE client, Pinia auth & billing stores, Vue Router auth/plan guards, and themeable PrimeVue 4 + Tailwind shell UI components.
|
|
4
|
+
|
|
5
|
+
Subpath exports:
|
|
6
|
+
|
|
7
|
+
- `@zaaxch/grasp-vue` (`createGraspVueApp`)
|
|
8
|
+
- `@zaaxch/grasp-vue/client`
|
|
9
|
+
- `@zaaxch/grasp-vue/stores`
|
|
10
|
+
- `@zaaxch/grasp-vue/router`
|
|
11
|
+
- `@zaaxch/grasp-vue/theme`
|
|
12
|
+
- `@zaaxch/grasp-vue/components`
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { GraspError, type AnyAppContract, type BillingInterval, type EffectiveEntitlement, type GraspUser, type InferClientContract } from '@zaaxch/grasp-core';
|
|
2
|
+
export interface GraspClientOptions {
|
|
3
|
+
readonly baseUrl?: string;
|
|
4
|
+
readonly getAccessToken: () => Promise<string | null> | string | null;
|
|
5
|
+
readonly getSessionGeneration?: () => number;
|
|
6
|
+
readonly fetchImpl?: typeof fetch;
|
|
7
|
+
readonly onError?: (error: GraspError) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface DevPersonaInfo {
|
|
10
|
+
readonly uid: string;
|
|
11
|
+
readonly email: string;
|
|
12
|
+
readonly displayName: string;
|
|
13
|
+
readonly avatarUrl?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ShellSessionResponse {
|
|
16
|
+
readonly user: GraspUser | null;
|
|
17
|
+
readonly entitlement: EffectiveEntitlement | null;
|
|
18
|
+
readonly devMode: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ShellBillingCatalogPlan {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly rank: number;
|
|
24
|
+
readonly trialDays?: number;
|
|
25
|
+
readonly limits: Readonly<Record<string, number | boolean>>;
|
|
26
|
+
readonly upgradable: boolean;
|
|
27
|
+
readonly prices: {
|
|
28
|
+
readonly month?: {
|
|
29
|
+
readonly priceId: string;
|
|
30
|
+
readonly unitAmount: number;
|
|
31
|
+
readonly currency: string;
|
|
32
|
+
};
|
|
33
|
+
readonly year?: {
|
|
34
|
+
readonly priceId: string;
|
|
35
|
+
readonly unitAmount: number;
|
|
36
|
+
readonly currency: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface ShellBillingCreditPack {
|
|
41
|
+
readonly id: string;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly credits: number;
|
|
44
|
+
readonly priceId?: string;
|
|
45
|
+
readonly unitAmount?: number;
|
|
46
|
+
readonly currency?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ShellBillingSummary {
|
|
49
|
+
readonly enabled: boolean;
|
|
50
|
+
readonly effective: EffectiveEntitlement;
|
|
51
|
+
readonly canCheckout: boolean;
|
|
52
|
+
readonly canManagePortal: boolean;
|
|
53
|
+
readonly plans: readonly ShellBillingCatalogPlan[];
|
|
54
|
+
readonly creditPacks: readonly ShellBillingCreditPack[];
|
|
55
|
+
}
|
|
56
|
+
export interface ShellClient {
|
|
57
|
+
getSession(): Promise<ShellSessionResponse>;
|
|
58
|
+
getDevPersonas(): Promise<readonly DevPersonaInfo[]>;
|
|
59
|
+
mintDevToken(uid: string): Promise<{
|
|
60
|
+
readonly token: string;
|
|
61
|
+
readonly user: GraspUser;
|
|
62
|
+
readonly entitlement: EffectiveEntitlement;
|
|
63
|
+
}>;
|
|
64
|
+
deleteAccount(): Promise<{
|
|
65
|
+
readonly deleted: boolean;
|
|
66
|
+
readonly deletedCollections: readonly string[];
|
|
67
|
+
}>;
|
|
68
|
+
getBilling(): Promise<ShellBillingSummary>;
|
|
69
|
+
checkoutPlan(input: {
|
|
70
|
+
readonly planId: string;
|
|
71
|
+
readonly interval: BillingInterval;
|
|
72
|
+
readonly successUrl?: string;
|
|
73
|
+
readonly cancelUrl?: string;
|
|
74
|
+
}): Promise<{
|
|
75
|
+
readonly url: string;
|
|
76
|
+
}>;
|
|
77
|
+
checkoutCredits(input: {
|
|
78
|
+
readonly packId: string;
|
|
79
|
+
readonly successUrl?: string;
|
|
80
|
+
readonly cancelUrl?: string;
|
|
81
|
+
}): Promise<{
|
|
82
|
+
readonly url: string;
|
|
83
|
+
}>;
|
|
84
|
+
openPortal(input?: {
|
|
85
|
+
readonly returnUrl?: string;
|
|
86
|
+
}): Promise<{
|
|
87
|
+
readonly url: string;
|
|
88
|
+
}>;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Builds a zero-codegen typed RPC + SSE client proxy driven directly by `AppContract`.
|
|
92
|
+
*/
|
|
93
|
+
export declare function createGraspClient<TAppContract extends AnyAppContract>(appContract: TAppContract, options: GraspClientOptions): InferClientContract<TAppContract>;
|
|
94
|
+
export declare function createShellClient(options: GraspClientOptions): ShellClient;
|
|
95
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAIV,KAAK,cAAc,EAInB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,mBAAmB,EAGzB,MAAM,oBAAoB,CAAA;AAE3B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;IACrE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;CAC/C;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAA;IAC/B,QAAQ,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAAA;IACjD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,M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S,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACvF;AAqND;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,SAAS,cAAc,EACnE,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,kBAAkB,GAC1B,mBAAmB,CAAC,YAAY,CAAC,CA4CnC;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,WAAW,CAoB1E"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { GraspError, isGraspErrorPayload, isGraspWireEnvelope, parseStreamEvent, } from '@zaaxch/grasp-core';
|
|
2
|
+
function buildUrl(baseUrl, path) {
|
|
3
|
+
const prefix = baseUrl ? baseUrl.replace(/\/+$/, '') : '';
|
|
4
|
+
return `${prefix}${path}`;
|
|
5
|
+
}
|
|
6
|
+
async function requestJson(options, method, path, body) {
|
|
7
|
+
const fetchFn = options.fetchImpl ?? globalThis.fetch;
|
|
8
|
+
const startGeneration = options.getSessionGeneration?.() ?? 0;
|
|
9
|
+
const token = await options.getAccessToken();
|
|
10
|
+
const headers = {
|
|
11
|
+
'x-grasp-client': '1',
|
|
12
|
+
};
|
|
13
|
+
if (token) {
|
|
14
|
+
headers['authorization'] = `Bearer ${token}`;
|
|
15
|
+
}
|
|
16
|
+
if (body !== undefined) {
|
|
17
|
+
headers['content-type'] = 'application/json';
|
|
18
|
+
}
|
|
19
|
+
let response;
|
|
20
|
+
try {
|
|
21
|
+
response = await fetchFn(buildUrl(options.baseUrl, path), {
|
|
22
|
+
method,
|
|
23
|
+
headers,
|
|
24
|
+
...(body !== undefined ? { body: JSON.stringify(body) } : {}),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
const netErr = GraspError.unavailable('Network request failed', { cause: err });
|
|
29
|
+
options.onError?.(netErr);
|
|
30
|
+
throw netErr;
|
|
31
|
+
}
|
|
32
|
+
if (options.getSessionGeneration && options.getSessionGeneration() !== startGeneration) {
|
|
33
|
+
throw GraspError.unauthenticated('Session changed while request was in flight');
|
|
34
|
+
}
|
|
35
|
+
let parsed;
|
|
36
|
+
try {
|
|
37
|
+
parsed = await response.json();
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
const parseErr = GraspError.internal(`Invalid JSON response (${response.status})`, {
|
|
41
|
+
cause: err,
|
|
42
|
+
});
|
|
43
|
+
options.onError?.(parseErr);
|
|
44
|
+
throw parseErr;
|
|
45
|
+
}
|
|
46
|
+
if (!isGraspWireEnvelope(parsed)) {
|
|
47
|
+
const envErr = GraspError.internal(`Malformed server response (${response.status})`);
|
|
48
|
+
options.onError?.(envErr);
|
|
49
|
+
throw envErr;
|
|
50
|
+
}
|
|
51
|
+
if (!parsed.ok) {
|
|
52
|
+
const graspErr = GraspError.fromPayload(parsed.error);
|
|
53
|
+
options.onError?.(graspErr);
|
|
54
|
+
throw graspErr;
|
|
55
|
+
}
|
|
56
|
+
return parsed.data;
|
|
57
|
+
}
|
|
58
|
+
function openSseStream(options, streamPath, streamDef, rawInput, handlers) {
|
|
59
|
+
const fetchFn = options.fetchImpl ?? globalThis.fetch;
|
|
60
|
+
const controller = new AbortController();
|
|
61
|
+
const startGeneration = options.getSessionGeneration?.() ?? 0;
|
|
62
|
+
const urlPath = streamDef.hasInput && rawInput !== undefined
|
|
63
|
+
? `${streamPath}?input=${encodeURIComponent(JSON.stringify(rawInput))}`
|
|
64
|
+
: streamPath;
|
|
65
|
+
const closed = (async () => {
|
|
66
|
+
try {
|
|
67
|
+
const token = await options.getAccessToken();
|
|
68
|
+
const headers = {
|
|
69
|
+
accept: 'text/event-stream',
|
|
70
|
+
'x-grasp-client': '1',
|
|
71
|
+
};
|
|
72
|
+
if (token) {
|
|
73
|
+
headers['authorization'] = `Bearer ${token}`;
|
|
74
|
+
}
|
|
75
|
+
const response = await fetchFn(buildUrl(options.baseUrl, urlPath), {
|
|
76
|
+
method: 'GET',
|
|
77
|
+
headers,
|
|
78
|
+
signal: controller.signal,
|
|
79
|
+
});
|
|
80
|
+
if (!response.ok) {
|
|
81
|
+
let err = GraspError.unavailable(`Stream connection failed (${response.status})`);
|
|
82
|
+
try {
|
|
83
|
+
const json = (await response.json());
|
|
84
|
+
if (isGraspWireEnvelope(json) && !json.ok) {
|
|
85
|
+
err = GraspError.fromPayload(json.error);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
// Ignore non-JSON error body
|
|
90
|
+
}
|
|
91
|
+
options.onError?.(err);
|
|
92
|
+
handlers.onError?.(err);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (!response.body) {
|
|
96
|
+
const err = GraspError.internal('Stream response has no readable body');
|
|
97
|
+
options.onError?.(err);
|
|
98
|
+
handlers.onError?.(err);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const reader = response.body.getReader();
|
|
102
|
+
const decoder = new TextDecoder();
|
|
103
|
+
let buffer = '';
|
|
104
|
+
const dispatchFrame = (rawFrame) => {
|
|
105
|
+
const lines = rawFrame.split(/\r?\n/);
|
|
106
|
+
let eventName = 'message';
|
|
107
|
+
const dataLines = [];
|
|
108
|
+
for (const line of lines) {
|
|
109
|
+
if (line.startsWith('event:')) {
|
|
110
|
+
eventName = line.slice(6).trim();
|
|
111
|
+
}
|
|
112
|
+
else if (line.startsWith('data:')) {
|
|
113
|
+
dataLines.push(line.slice(5).trimStart());
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (dataLines.length === 0)
|
|
117
|
+
return 'continue';
|
|
118
|
+
const rawData = dataLines.join('\n');
|
|
119
|
+
if (eventName === 'ready') {
|
|
120
|
+
return 'continue';
|
|
121
|
+
}
|
|
122
|
+
if (eventName === 'done') {
|
|
123
|
+
handlers.onComplete?.();
|
|
124
|
+
return 'done';
|
|
125
|
+
}
|
|
126
|
+
if (eventName === 'error') {
|
|
127
|
+
const parsedPayload = JSON.parse(rawData);
|
|
128
|
+
const err = isGraspErrorPayload(parsedPayload)
|
|
129
|
+
? GraspError.fromPayload(parsedPayload)
|
|
130
|
+
: GraspError.internal('Stream failed');
|
|
131
|
+
options.onError?.(err);
|
|
132
|
+
handlers.onError?.(err);
|
|
133
|
+
return 'done';
|
|
134
|
+
}
|
|
135
|
+
const rawJson = JSON.parse(rawData);
|
|
136
|
+
const event = parseStreamEvent(streamDef.event, rawJson);
|
|
137
|
+
handlers.onEvent(event);
|
|
138
|
+
return 'continue';
|
|
139
|
+
};
|
|
140
|
+
while (!controller.signal.aborted) {
|
|
141
|
+
if (options.getSessionGeneration && options.getSessionGeneration() !== startGeneration) {
|
|
142
|
+
controller.abort();
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
const { value, done } = await reader.read();
|
|
146
|
+
if (done) {
|
|
147
|
+
if (buffer.trim().length > 0) {
|
|
148
|
+
dispatchFrame(buffer);
|
|
149
|
+
}
|
|
150
|
+
handlers.onComplete?.();
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
buffer += decoder.decode(value, { stream: true });
|
|
154
|
+
let separatorMatch = /\r?\n\r?\n/.exec(buffer);
|
|
155
|
+
while (separatorMatch) {
|
|
156
|
+
const idx = separatorMatch.index;
|
|
157
|
+
const rawFrame = buffer.slice(0, idx);
|
|
158
|
+
buffer = buffer.slice(idx + separatorMatch[0].length);
|
|
159
|
+
if (rawFrame.trim().length > 0 && dispatchFrame(rawFrame) === 'done') {
|
|
160
|
+
controller.abort();
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
separatorMatch = /\r?\n\r?\n/.exec(buffer);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
catch (err) {
|
|
168
|
+
if (controller.signal.aborted) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const graspErr = err instanceof GraspError
|
|
172
|
+
? err
|
|
173
|
+
: GraspError.unavailable('Stream interrupted', { cause: err });
|
|
174
|
+
options.onError?.(graspErr);
|
|
175
|
+
handlers.onError?.(graspErr);
|
|
176
|
+
}
|
|
177
|
+
})();
|
|
178
|
+
return {
|
|
179
|
+
close() {
|
|
180
|
+
controller.abort();
|
|
181
|
+
},
|
|
182
|
+
closed,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Builds a zero-codegen typed RPC + SSE client proxy driven directly by `AppContract`.
|
|
187
|
+
*/
|
|
188
|
+
export function createGraspClient(appContract, options) {
|
|
189
|
+
const features = {};
|
|
190
|
+
for (const [featureName, featureContract] of Object.entries(appContract.features)) {
|
|
191
|
+
const methods = {};
|
|
192
|
+
for (const [procName, procDef] of Object.entries(featureContract.procedures)) {
|
|
193
|
+
methods[procName] = (input) => requestJson(options, 'POST', `/api/rpc/${featureName}.${procName}`, procDef.hasInput ? (input ?? {}) : undefined);
|
|
194
|
+
}
|
|
195
|
+
for (const [streamName, streamDef] of Object.entries(featureContract.streams)) {
|
|
196
|
+
methods[streamName] = (...args) => {
|
|
197
|
+
const hasExplicitInput = streamDef.hasInput && args.length >= 2;
|
|
198
|
+
const rawInput = hasExplicitInput ? args[0] : undefined;
|
|
199
|
+
const handlers = (hasExplicitInput ? args[1] : args[0]);
|
|
200
|
+
return openSseStream(options, `/api/stream/${featureName}.${streamName}`, streamDef, rawInput, handlers);
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
features[featureName] = Object.freeze(methods);
|
|
204
|
+
}
|
|
205
|
+
return Object.freeze(features);
|
|
206
|
+
}
|
|
207
|
+
export function createShellClient(options) {
|
|
208
|
+
return {
|
|
209
|
+
getSession: () => requestJson(options, 'GET', '/api/shell/session'),
|
|
210
|
+
async getDevPersonas() {
|
|
211
|
+
const res = await requestJson(options, 'GET', '/api/shell/dev-auth/personas');
|
|
212
|
+
return res.personas;
|
|
213
|
+
},
|
|
214
|
+
mintDevToken: (uid) => requestJson(options, 'POST', '/api/shell/dev-auth/token', { uid }),
|
|
215
|
+
deleteAccount: () => requestJson(options, 'DELETE', '/api/shell/account'),
|
|
216
|
+
getBilling: () => requestJson(options, 'GET', '/api/shell/billing'),
|
|
217
|
+
checkoutPlan: (input) => requestJson(options, 'POST', '/api/shell/billing/checkout/plan', input),
|
|
218
|
+
checkoutCredits: (input) => requestJson(options, 'POST', '/api/shell/billing/checkout/credits', input),
|
|
219
|
+
openPortal: (input = {}) => requestJson(options, 'POST', '/api/shell/billing/portal', input),
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,GAWjB,MAAM,oBAAoB,CAAA;AAyF3B,SAAS,QAAQ,CAAC,OAA2B,EAAE,IAAY;IACzD,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACzD,OAAO,GAAG,MAAM,GAAG,IAAI,EAAE,CAAA;AAC3B,CAAC;AAED,KAAK,UAAU,WAAW,CACxB,OAA2B,EAC3B,MAAiC,EACjC,IAAY,EACZ,IAAc;IAEd,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,IAAI,UAAU,CAAC,KAAK,CAAA;IACrD,MAAM,eAAe,GAAG,OAAO,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAA;IAC7D,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,cAAc,EAAE,CAAA;IAE5C,MAAM,OAAO,GAA2B;QACtC,gBAAgB,EAAE,GAAG;KACtB,CAAA;IACD,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,KAAK,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AO,EAAE,KAAK,EAAE,oBAAoB,CAAC;QACnE,KAAK,CAAC,cAAc;YAClB,MAAM,GAAG,GAAG,MAAM,WAAW,CAC3B,OAAO,EACP,KAAK,EACL,8BAA8B,CAC/B,CAAA;YACD,OAAO,GAAG,CAAC,QAAQ,CAAA;QACrB,CAAC;QACD,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,2BAA2B,EAAE,EAAE,GAAG,EAAE,CAAC;QACzF,aAAa,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,oBAAoB,CAAC;QACzE,UAAU,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE,oBAAoB,CAAC;QACnE,YAAY,EAAE,CAAC,KAAK,EAAE,EAAE,CACtB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,kCAAkC,EAAE,KAAK,CAAC;QACzE,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CACzB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,qCAAqC,EAAE,KAAK,CAAC;QAC5E,UAAU,EAAE,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,2BAA2B,EAAE,KAAK,CAAC;KAC7F,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ShellBillingCatalogPlan } from './client.js';
|
|
2
|
+
export declare const GraspAppRoot: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const GraspAuthFlow: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
homePath: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
homePath: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {
|
|
18
|
+
homePath: string;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export declare const GraspAccountSettings: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export declare const GraspPricingTable: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
24
|
+
plans: {
|
|
25
|
+
type: () => readonly ShellBillingCatalogPlan[];
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
currentPlanId: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
busy: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
selectPlan: (_planId: string, _interval: "month" | "year") => true;
|
|
40
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
plans: {
|
|
42
|
+
type: () => readonly ShellBillingCatalogPlan[];
|
|
43
|
+
required: true;
|
|
44
|
+
};
|
|
45
|
+
currentPlanId: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
busy: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{
|
|
54
|
+
onSelectPlan?: (_planId: string, _interval: "month" | "year") => any;
|
|
55
|
+
}>, {
|
|
56
|
+
busy: boolean;
|
|
57
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
58
|
+
export declare const GraspBillingPanel: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
61
|
+
export declare const GraspShellLayout: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
64
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAuB1D,eAAO,MAAM,YAAY;;2OAkCvB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;4EAsGxB,CAAA;AAEF,eAAO,MAAM,oBAAoB;;2OA8G/B,CAAA;AAEF,eAAO,MAAM,iBAAiB;;cAIT,MAAM,SAAS,uBAAuB,EAAE;;;;;;;;;;;;;;0BAOnC,MAAM,aAAa,OAAO,GAAG,MAAM;;;cAPxC,MAAM,SAAS,uBAAuB,EAAE;;;;;;;;;;;;;;;4EA8D3D,CAAA;AAEF,eAAO,MAAM,iBAAiB;;2OA2G5B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;2OAoF3B,CAAA"}
|