@vibes.diy/api-types 14.3.233 → 14.3.234

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.
@@ -0,0 +1,187 @@
1
+ import { Result } from "@adviser/cement";
2
+ declare const question: import("arktype/internal/variants/object.ts").ObjectType<{
3
+ id: string;
4
+ label: string;
5
+ type?: "choice" | "text" | "textarea" | "url" | undefined;
6
+ placeholder?: string | undefined;
7
+ help?: string | undefined;
8
+ options?: string[] | undefined;
9
+ required?: boolean | undefined;
10
+ default?: string | undefined;
11
+ }, {}>;
12
+ export type GuidedQuestion = typeof question.infer;
13
+ declare const guidedStep: import("arktype/internal/variants/object.ts").ObjectType<{
14
+ id: string;
15
+ title: string;
16
+ body?: string | undefined;
17
+ button?: string | undefined;
18
+ kind: "ask";
19
+ questions: {
20
+ id: string;
21
+ label: string;
22
+ type?: "choice" | "text" | "textarea" | "url" | undefined;
23
+ placeholder?: string | undefined;
24
+ help?: string | undefined;
25
+ options?: string[] | undefined;
26
+ required?: boolean | undefined;
27
+ default?: string | undefined;
28
+ }[];
29
+ } | {
30
+ id: string;
31
+ title: string;
32
+ body?: string | undefined;
33
+ button?: string | undefined;
34
+ kind: "build";
35
+ prompt: string;
36
+ building?: string | undefined;
37
+ } | {
38
+ id: string;
39
+ title: string;
40
+ body?: string | undefined;
41
+ button?: string | undefined;
42
+ kind: "connect";
43
+ provider: "stripe";
44
+ mode?: "live" | "test" | undefined;
45
+ later?: string | undefined;
46
+ keepExamples?: boolean | undefined;
47
+ await?: {
48
+ match: Record<string, string | number | boolean>;
49
+ body?: string | undefined;
50
+ waiting?: string | undefined;
51
+ done?: string | undefined;
52
+ } | undefined;
53
+ } | {
54
+ id: string;
55
+ title: string;
56
+ body?: string | undefined;
57
+ button?: string | undefined;
58
+ kind: "open-app";
59
+ } | {
60
+ id: string;
61
+ title: string;
62
+ body?: string | undefined;
63
+ button?: string | undefined;
64
+ kind: "await";
65
+ match: Record<string, string | number | boolean>;
66
+ waiting?: string | undefined;
67
+ } | {
68
+ id: string;
69
+ title: string;
70
+ body?: string | undefined;
71
+ button?: string | undefined;
72
+ kind: "say";
73
+ show?: "phone-link" | undefined;
74
+ } | {
75
+ id: string;
76
+ title: string;
77
+ body?: string | undefined;
78
+ button?: string | undefined;
79
+ kind: "call";
80
+ path: string;
81
+ method?: "DELETE" | "PATCH" | "POST" | "PUT" | undefined;
82
+ match?: Record<string, string | number | boolean> | undefined;
83
+ done?: string | undefined;
84
+ refused?: string | undefined;
85
+ later?: string | undefined;
86
+ examples?: string | undefined;
87
+ }, {}>;
88
+ export type GuidedStep = typeof guidedStep.infer;
89
+ export type GuidedStepKind = GuidedStep["kind"];
90
+ export declare const guidedDefinition: import("arktype/internal/variants/object.ts").ObjectType<{
91
+ version: 1;
92
+ title: string;
93
+ intro?: string | undefined;
94
+ steps: ({
95
+ id: string;
96
+ title: string;
97
+ body?: string | undefined;
98
+ button?: string | undefined;
99
+ kind: "ask";
100
+ questions: {
101
+ id: string;
102
+ label: string;
103
+ type?: "choice" | "text" | "textarea" | "url" | undefined;
104
+ placeholder?: string | undefined;
105
+ help?: string | undefined;
106
+ options?: string[] | undefined;
107
+ required?: boolean | undefined;
108
+ default?: string | undefined;
109
+ }[];
110
+ } | {
111
+ id: string;
112
+ title: string;
113
+ body?: string | undefined;
114
+ button?: string | undefined;
115
+ kind: "build";
116
+ prompt: string;
117
+ building?: string | undefined;
118
+ } | {
119
+ id: string;
120
+ title: string;
121
+ body?: string | undefined;
122
+ button?: string | undefined;
123
+ kind: "connect";
124
+ provider: "stripe";
125
+ mode?: "live" | "test" | undefined;
126
+ later?: string | undefined;
127
+ keepExamples?: boolean | undefined;
128
+ await?: {
129
+ match: Record<string, string | number | boolean>;
130
+ body?: string | undefined;
131
+ waiting?: string | undefined;
132
+ done?: string | undefined;
133
+ } | undefined;
134
+ } | {
135
+ id: string;
136
+ title: string;
137
+ body?: string | undefined;
138
+ button?: string | undefined;
139
+ kind: "open-app";
140
+ } | {
141
+ id: string;
142
+ title: string;
143
+ body?: string | undefined;
144
+ button?: string | undefined;
145
+ kind: "await";
146
+ match: Record<string, string | number | boolean>;
147
+ waiting?: string | undefined;
148
+ } | {
149
+ id: string;
150
+ title: string;
151
+ body?: string | undefined;
152
+ button?: string | undefined;
153
+ kind: "say";
154
+ show?: "phone-link" | undefined;
155
+ } | {
156
+ id: string;
157
+ title: string;
158
+ body?: string | undefined;
159
+ button?: string | undefined;
160
+ kind: "call";
161
+ path: string;
162
+ method?: "DELETE" | "PATCH" | "POST" | "PUT" | undefined;
163
+ match?: Record<string, string | number | boolean> | undefined;
164
+ done?: string | undefined;
165
+ refused?: string | undefined;
166
+ later?: string | undefined;
167
+ examples?: string | undefined;
168
+ })[];
169
+ }, {}>;
170
+ export type GuidedDefinition = typeof guidedDefinition.infer;
171
+ export declare const GUIDED_FILE = "guided.json";
172
+ export declare function parseGuidedDefinition(text: string): Result<GuidedDefinition>;
173
+ export declare function templateFields(template: string): string[];
174
+ export type CopyPart = {
175
+ readonly text: string;
176
+ } | {
177
+ readonly url: string;
178
+ };
179
+ export declare function splitLinks(text: string): CopyPart[];
180
+ export declare function fillTemplate(template: string, answers: Readonly<Record<string, string>>): string;
181
+ export declare function normalizeUrlAnswer(raw: string): string;
182
+ export declare function askComplete(step: Extract<GuidedStep, {
183
+ kind: "ask";
184
+ }>, answers: Readonly<Record<string, string>>): boolean;
185
+ export declare function docMatches(doc: unknown, match: Readonly<Record<string, string | number | boolean>>): boolean;
186
+ export declare function guideKey(ownerHandle: string, appSlug: string): string;
187
+ export {};
@@ -0,0 +1,154 @@
1
+ import { exception2Result, Result } from "@adviser/cement";
2
+ import { type } from "arktype";
3
+ const question = type({
4
+ id: /^[a-zA-Z][a-zA-Z0-9_]*$/,
5
+ label: "string > 0",
6
+ "type?": "'text' | 'textarea' | 'choice' | 'url'",
7
+ "placeholder?": "string",
8
+ "help?": "string",
9
+ "options?": "string[]",
10
+ "required?": "boolean",
11
+ "default?": "string",
12
+ });
13
+ const stepCommon = {
14
+ id: /^[a-zA-Z0-9_-]+$/,
15
+ title: "string > 0",
16
+ "body?": "string",
17
+ "button?": "string",
18
+ };
19
+ const askStep = type({ ...stepCommon, kind: "'ask'", questions: question.array().atLeastLength(1) });
20
+ const buildStep = type({ ...stepCommon, kind: "'build'", prompt: "string > 0", "building?": "string" });
21
+ const docMatch = "Record<string, string | number | boolean>";
22
+ const connectAwait = type({ match: docMatch, "body?": "string", "waiting?": "string", "done?": "string" });
23
+ const connectStep = type({
24
+ ...stepCommon,
25
+ kind: "'connect'",
26
+ provider: "'stripe'",
27
+ "mode?": "'test' | 'live'",
28
+ "later?": "string > 0",
29
+ "keepExamples?": "boolean",
30
+ "await?": connectAwait,
31
+ });
32
+ const openAppStep = type({ ...stepCommon, kind: "'open-app'" });
33
+ const awaitStep = type({
34
+ ...stepCommon,
35
+ kind: "'await'",
36
+ match: docMatch,
37
+ "waiting?": "string",
38
+ });
39
+ const sayStep = type({ ...stepCommon, kind: "'say'", "show?": "'phone-link'" });
40
+ const callStep = type({
41
+ ...stepCommon,
42
+ kind: "'call'",
43
+ path: /^\/(?!\/)/,
44
+ "method?": "'POST' | 'PUT' | 'PATCH' | 'DELETE'",
45
+ "match?": docMatch,
46
+ "done?": "string",
47
+ "refused?": "string",
48
+ "later?": "string > 0",
49
+ "examples?": "string > 0",
50
+ });
51
+ const guidedStep = askStep.or(buildStep).or(connectStep).or(openAppStep).or(awaitStep).or(sayStep).or(callStep);
52
+ export const guidedDefinition = type({
53
+ version: "1",
54
+ title: "string > 0",
55
+ "intro?": "string",
56
+ steps: guidedStep.array().atLeastLength(1),
57
+ });
58
+ export const GUIDED_FILE = "guided.json";
59
+ export function parseGuidedDefinition(text) {
60
+ const rJson = exception2Result(() => JSON.parse(text));
61
+ if (rJson.isErr())
62
+ return Result.Err(`guided.json is not JSON: ${rJson.Err().message}`);
63
+ const parsed = guidedDefinition(rJson.Ok());
64
+ if (parsed instanceof type.errors)
65
+ return Result.Err(`guided.json: ${parsed.summary}`);
66
+ const ids = new Set();
67
+ for (const step of parsed.steps) {
68
+ if (ids.has(step.id))
69
+ return Result.Err(`guided.json: step id "${step.id}" is used twice`);
70
+ ids.add(step.id);
71
+ const pickless = step.kind === "ask" ? step.questions.find((q) => q.type === "choice" && (q.options ?? []).length === 0) : undefined;
72
+ if (pickless !== undefined)
73
+ return Result.Err(`guided.json: choice question "${pickless.id}" needs options to pick from`);
74
+ }
75
+ const buildAt = parsed.steps.findIndex((s) => s.kind === "build");
76
+ if (buildAt < 0)
77
+ return Result.Err("guided.json: a guided remix needs one build step");
78
+ if (parsed.steps.filter((s) => s.kind === "build").length > 1)
79
+ return Result.Err("guided.json: only one build step is allowed");
80
+ const asked = new Set(parsed.steps.slice(0, buildAt).flatMap((s) => (s.kind === "ask" ? s.questions.map((q) => q.id) : [])));
81
+ const build = parsed.steps[buildAt];
82
+ if (build?.kind === "build") {
83
+ const missing = templateFields(build.prompt).filter((f) => asked.has(f) === false);
84
+ if (missing.length > 0)
85
+ return Result.Err(`guided.json: the build prompt uses ${missing.join(", ")}, which no earlier step asks`);
86
+ }
87
+ const early = parsed.steps
88
+ .slice(0, buildAt)
89
+ .find((s) => s.kind === "connect" || s.kind === "open-app" || s.kind === "await" || s.kind === "call");
90
+ if (early !== undefined)
91
+ return Result.Err(`guided.json: step "${early.id}" acts on the new app, so it goes after the build`);
92
+ return Result.Ok(parsed);
93
+ }
94
+ const FIELD = /\{\{\s*([a-zA-Z][a-zA-Z0-9_]*)\s*\}\}/g;
95
+ const SECTION = /\{\{#\s*([a-zA-Z][a-zA-Z0-9_]*)\s*\}\}([\s\S]*?)\{\{\/\s*\1\s*\}\}/g;
96
+ export function templateFields(template) {
97
+ const names = [...template.matchAll(/\{\{[#/]?\s*([a-zA-Z][a-zA-Z0-9_]*)\s*\}\}/g)].map((m) => m[1]);
98
+ return [...new Set(names)];
99
+ }
100
+ const URL_IN_COPY = /https?:\/\/[^\s<>"'\u2018\u2019\u201c\u201d[\]]+/g;
101
+ function trimUrl(raw) {
102
+ let url = raw;
103
+ for (;;) {
104
+ const last = url.at(-1);
105
+ if (last !== undefined && ".,;:!?".includes(last))
106
+ url = url.slice(0, -1);
107
+ else if (last === ")" && (url.match(/\(/g)?.length ?? 0) < (url.match(/\)/g)?.length ?? 0))
108
+ url = url.slice(0, -1);
109
+ else
110
+ return url;
111
+ }
112
+ }
113
+ export function splitLinks(text) {
114
+ const parts = [];
115
+ let at = 0;
116
+ for (const m of text.matchAll(URL_IN_COPY)) {
117
+ const url = trimUrl(m[0]);
118
+ if (m.index > at)
119
+ parts.push({ text: text.slice(at, m.index) });
120
+ parts.push({ url });
121
+ at = m.index + url.length;
122
+ }
123
+ if (at < text.length)
124
+ parts.push({ text: text.slice(at) });
125
+ return parts;
126
+ }
127
+ export function fillTemplate(template, answers) {
128
+ const answer = (name) => (answers[name] ?? "").trim();
129
+ const sections = (text) => text.replace(SECTION, (_whole, name, inner) => (answer(name) === "" ? "" : sections(inner)));
130
+ return sections(template).replace(FIELD, (_whole, name) => answer(name));
131
+ }
132
+ export function normalizeUrlAnswer(raw) {
133
+ const typed = raw.trim();
134
+ if (typed === "")
135
+ return "";
136
+ if (/^https:\/\//i.test(typed))
137
+ return typed;
138
+ if (/^http:\/\//i.test(typed))
139
+ return `https://${typed.slice(7)}`;
140
+ return `https://${typed.replace(/^\/+/, "")}`;
141
+ }
142
+ export function askComplete(step, answers) {
143
+ return step.questions.every((q) => q.required !== true || (answers[q.id] ?? "").trim() !== "");
144
+ }
145
+ export function docMatches(doc, match) {
146
+ if (typeof doc !== "object" || doc === null)
147
+ return false;
148
+ const fields = new Map(Object.entries(doc));
149
+ return Object.entries(match).every(([k, v]) => fields.get(k) === v);
150
+ }
151
+ export function guideKey(ownerHandle, appSlug) {
152
+ return `${ownerHandle}/${appSlug}`;
153
+ }
154
+ //# sourceMappingURL=guided-remix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guided-remix.js","sourceRoot":"","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AK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACtE,CAAC;AAGD,MAAM,UAAU,QAAQ,CAAC,WAAmB,EAAE,OAAe;IAC3D,OAAO,GAAG,WAAW,IAAI,OAAO,EAAE,CAAC;AACrC,CAAC"}
package/invite-flow.d.ts CHANGED
@@ -8,6 +8,53 @@ export declare const KeyGrantKey: import("arktype/internal/variants/object.ts").
8
8
  export type KeyGrantKey = typeof KeyGrantKey.infer;
9
9
  export declare const ResKeyGrantItem: import("arktype/internal/variants/object.ts").ObjectType<{
10
10
  entry: {
11
+ type: "app.acl.active.request";
12
+ role: "viewer";
13
+ state: "pending";
14
+ request: {
15
+ key: string;
16
+ provider: "clerk" | "github" | "google";
17
+ msg?: string | undefined;
18
+ userId: string;
19
+ created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
20
+ };
21
+ } | {
22
+ type: "app.acl.active.request";
23
+ role: "editor" | "submitter" | "viewer";
24
+ state: "approved";
25
+ request: {
26
+ key: string;
27
+ provider: "clerk" | "github" | "google";
28
+ msg?: string | undefined;
29
+ userId: string;
30
+ created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
31
+ };
32
+ tick: {
33
+ count: number;
34
+ last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
35
+ };
36
+ grant: {
37
+ ownerId: string;
38
+ key?: string | undefined;
39
+ on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
40
+ };
41
+ } | {
42
+ type: "app.acl.active.request";
43
+ role: "editor" | "submitter" | "viewer";
44
+ state: "rejected";
45
+ request: {
46
+ key: string;
47
+ provider: "clerk" | "github" | "google";
48
+ msg?: string | undefined;
49
+ userId: string;
50
+ created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
51
+ };
52
+ grant: {
53
+ ownerId: string;
54
+ key?: string | undefined;
55
+ on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
56
+ };
57
+ } | {
11
58
  type: "app.acl.active.invite";
12
59
  role: "editor";
13
60
  state: "pending";
@@ -93,53 +140,6 @@ export declare const ResKeyGrantItem: import("arktype/internal/variants/object.t
93
140
  count: number;
94
141
  last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
95
142
  };
96
- } | {
97
- type: "app.acl.active.request";
98
- role: "viewer";
99
- state: "pending";
100
- request: {
101
- key: string;
102
- provider: "clerk" | "github" | "google";
103
- msg?: string | undefined;
104
- userId: string;
105
- created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
106
- };
107
- } | {
108
- type: "app.acl.active.request";
109
- role: "editor" | "submitter" | "viewer";
110
- state: "approved";
111
- request: {
112
- key: string;
113
- provider: "clerk" | "github" | "google";
114
- msg?: string | undefined;
115
- userId: string;
116
- created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
117
- };
118
- tick: {
119
- count: number;
120
- last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
121
- };
122
- grant: {
123
- ownerId: string;
124
- key?: string | undefined;
125
- on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
126
- };
127
- } | {
128
- type: "app.acl.active.request";
129
- role: "editor" | "submitter" | "viewer";
130
- state: "rejected";
131
- request: {
132
- key: string;
133
- provider: "clerk" | "github" | "google";
134
- msg?: string | undefined;
135
- userId: string;
136
- created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
137
- };
138
- grant: {
139
- ownerId: string;
140
- key?: string | undefined;
141
- on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
142
- };
143
143
  };
144
144
  grantUserId?: string | undefined;
145
145
  grantType: "invite" | "request";
@@ -168,6 +168,53 @@ export declare const ResListKeyGrants: import("arktype/internal/variants/object.
168
168
  items: {
169
169
  key: string;
170
170
  entry: {
171
+ type: "app.acl.active.request";
172
+ role: "viewer";
173
+ state: "pending";
174
+ request: {
175
+ key: string;
176
+ provider: "clerk" | "github" | "google";
177
+ msg?: string | undefined;
178
+ userId: string;
179
+ created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
180
+ };
181
+ } | {
182
+ type: "app.acl.active.request";
183
+ role: "editor" | "submitter" | "viewer";
184
+ state: "approved";
185
+ request: {
186
+ key: string;
187
+ provider: "clerk" | "github" | "google";
188
+ msg?: string | undefined;
189
+ userId: string;
190
+ created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
191
+ };
192
+ tick: {
193
+ count: number;
194
+ last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
195
+ };
196
+ grant: {
197
+ ownerId: string;
198
+ key?: string | undefined;
199
+ on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
200
+ };
201
+ } | {
202
+ type: "app.acl.active.request";
203
+ role: "editor" | "submitter" | "viewer";
204
+ state: "rejected";
205
+ request: {
206
+ key: string;
207
+ provider: "clerk" | "github" | "google";
208
+ msg?: string | undefined;
209
+ userId: string;
210
+ created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
211
+ };
212
+ grant: {
213
+ ownerId: string;
214
+ key?: string | undefined;
215
+ on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
216
+ };
217
+ } | {
171
218
  type: "app.acl.active.invite";
172
219
  role: "editor";
173
220
  state: "pending";
@@ -253,53 +300,6 @@ export declare const ResListKeyGrants: import("arktype/internal/variants/object.
253
300
  count: number;
254
301
  last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
255
302
  };
256
- } | {
257
- type: "app.acl.active.request";
258
- role: "viewer";
259
- state: "pending";
260
- request: {
261
- key: string;
262
- provider: "clerk" | "github" | "google";
263
- msg?: string | undefined;
264
- userId: string;
265
- created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
266
- };
267
- } | {
268
- type: "app.acl.active.request";
269
- role: "editor" | "submitter" | "viewer";
270
- state: "approved";
271
- request: {
272
- key: string;
273
- provider: "clerk" | "github" | "google";
274
- msg?: string | undefined;
275
- userId: string;
276
- created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
277
- };
278
- tick: {
279
- count: number;
280
- last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
281
- };
282
- grant: {
283
- ownerId: string;
284
- key?: string | undefined;
285
- on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
286
- };
287
- } | {
288
- type: "app.acl.active.request";
289
- role: "editor" | "submitter" | "viewer";
290
- state: "rejected";
291
- request: {
292
- key: string;
293
- provider: "clerk" | "github" | "google";
294
- msg?: string | undefined;
295
- userId: string;
296
- created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
297
- };
298
- grant: {
299
- ownerId: string;
300
- key?: string | undefined;
301
- on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
302
- };
303
303
  };
304
304
  grantUserId?: string | undefined;
305
305
  updated: string;
@@ -321,6 +321,53 @@ export declare const ReqUpsertKeyGrant: import("arktype/internal/variants/object
321
321
  appSlug: string;
322
322
  ownerHandle: string;
323
323
  entry: {
324
+ type: "app.acl.active.request";
325
+ role: "viewer";
326
+ state: "pending";
327
+ request: {
328
+ key: string;
329
+ provider: "clerk" | "github" | "google";
330
+ msg?: string | undefined;
331
+ userId: string;
332
+ created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
333
+ };
334
+ } | {
335
+ type: "app.acl.active.request";
336
+ role: "editor" | "submitter" | "viewer";
337
+ state: "approved";
338
+ request: {
339
+ key: string;
340
+ provider: "clerk" | "github" | "google";
341
+ msg?: string | undefined;
342
+ userId: string;
343
+ created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
344
+ };
345
+ tick: {
346
+ count: number;
347
+ last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
348
+ };
349
+ grant: {
350
+ ownerId: string;
351
+ key?: string | undefined;
352
+ on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
353
+ };
354
+ } | {
355
+ type: "app.acl.active.request";
356
+ role: "editor" | "submitter" | "viewer";
357
+ state: "rejected";
358
+ request: {
359
+ key: string;
360
+ provider: "clerk" | "github" | "google";
361
+ msg?: string | undefined;
362
+ userId: string;
363
+ created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
364
+ };
365
+ grant: {
366
+ ownerId: string;
367
+ key?: string | undefined;
368
+ on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
369
+ };
370
+ } | {
324
371
  type: "app.acl.active.invite";
325
372
  role: "editor";
326
373
  state: "pending";
@@ -406,7 +453,16 @@ export declare const ReqUpsertKeyGrant: import("arktype/internal/variants/object
406
453
  count: number;
407
454
  last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
408
455
  };
409
- } | {
456
+ };
457
+ }, {}>;
458
+ export type ReqUpsertKeyGrant = typeof ReqUpsertKeyGrant.infer;
459
+ export declare function isReqUpsertKeyGrant(obj: unknown): obj is ReqUpsertKeyGrant;
460
+ export declare const ResUpsertKeyGrant: import("arktype/internal/variants/object.ts").ObjectType<{
461
+ appSlug: string;
462
+ ownerHandle: string;
463
+ grantType: "invite" | "request";
464
+ key: string;
465
+ entry: {
410
466
  type: "app.acl.active.request";
411
467
  role: "viewer";
412
468
  state: "pending";
@@ -453,16 +509,7 @@ export declare const ReqUpsertKeyGrant: import("arktype/internal/variants/object
453
509
  key?: string | undefined;
454
510
  on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
455
511
  };
456
- };
457
- }, {}>;
458
- export type ReqUpsertKeyGrant = typeof ReqUpsertKeyGrant.infer;
459
- export declare function isReqUpsertKeyGrant(obj: unknown): obj is ReqUpsertKeyGrant;
460
- export declare const ResUpsertKeyGrant: import("arktype/internal/variants/object.ts").ObjectType<{
461
- appSlug: string;
462
- ownerHandle: string;
463
- grantType: "invite" | "request";
464
- key: string;
465
- entry: {
512
+ } | {
466
513
  type: "app.acl.active.invite";
467
514
  role: "editor";
468
515
  state: "pending";
@@ -548,53 +595,6 @@ export declare const ResUpsertKeyGrant: import("arktype/internal/variants/object
548
595
  count: number;
549
596
  last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
550
597
  };
551
- } | {
552
- type: "app.acl.active.request";
553
- role: "viewer";
554
- state: "pending";
555
- request: {
556
- key: string;
557
- provider: "clerk" | "github" | "google";
558
- msg?: string | undefined;
559
- userId: string;
560
- created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
561
- };
562
- } | {
563
- type: "app.acl.active.request";
564
- role: "editor" | "submitter" | "viewer";
565
- state: "approved";
566
- request: {
567
- key: string;
568
- provider: "clerk" | "github" | "google";
569
- msg?: string | undefined;
570
- userId: string;
571
- created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
572
- };
573
- tick: {
574
- count: number;
575
- last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
576
- };
577
- grant: {
578
- ownerId: string;
579
- key?: string | undefined;
580
- on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
581
- };
582
- } | {
583
- type: "app.acl.active.request";
584
- role: "editor" | "submitter" | "viewer";
585
- state: "rejected";
586
- request: {
587
- key: string;
588
- provider: "clerk" | "github" | "google";
589
- msg?: string | undefined;
590
- userId: string;
591
- created: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
592
- };
593
- grant: {
594
- ownerId: string;
595
- key?: string | undefined;
596
- on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
597
- };
598
598
  };
599
599
  grantUserId?: string | undefined;
600
600
  updated: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/api-types",
3
- "version": "14.3.233",
3
+ "version": "14.3.234",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -13,7 +13,8 @@
13
13
  "./invite-note": "./invite-note.js",
14
14
  "./prefilled-prompts": "./prefilled-prompts.js",
15
15
  "./vibes-logo-paths": "./vibes-logo-paths.js",
16
- "./queue-schedule": "./queue-schedule.js"
16
+ "./queue-schedule": "./queue-schedule.js",
17
+ "./guided-remix": "./guided-remix.js"
17
18
  },
18
19
  "scripts": {
19
20
  "build": "core-cli tsc"
@@ -21,9 +22,9 @@
21
22
  "dependencies": {
22
23
  "@adviser/cement": "~0.5.34",
23
24
  "@cloudflare/workers-types": "~5.20261019.1",
24
- "@vibes.diy/call-ai-v2": "14.3.233",
25
- "@vibes.diy/identity": "14.3.233",
26
- "@vibes.diy/vibe-types": "14.3.233",
25
+ "@vibes.diy/call-ai-v2": "14.3.234",
26
+ "@vibes.diy/identity": "14.3.234",
27
+ "@vibes.diy/vibe-types": "14.3.234",
27
28
  "arktype": "~2.2.8"
28
29
  },
29
30
  "repository": {