@vibes.diy/api-types 14.3.114 → 14.3.116

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/invite-flow.d.ts CHANGED
@@ -8,53 +8,6 @@ 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
- } | {
58
11
  type: "app.acl.active.invite";
59
12
  role: "editor";
60
13
  state: "pending";
@@ -140,6 +93,53 @@ export declare const ResKeyGrantItem: import("arktype/internal/variants/object.t
140
93
  count: number;
141
94
  last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
142
95
  };
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,53 +168,6 @@ 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
- } | {
218
171
  type: "app.acl.active.invite";
219
172
  role: "editor";
220
173
  state: "pending";
@@ -300,6 +253,53 @@ export declare const ResListKeyGrants: import("arktype/internal/variants/object.
300
253
  count: number;
301
254
  last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
302
255
  };
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,53 +321,6 @@ 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
- } | {
371
324
  type: "app.acl.active.invite";
372
325
  role: "editor";
373
326
  state: "pending";
@@ -453,16 +406,7 @@ export declare const ReqUpsertKeyGrant: import("arktype/internal/variants/object
453
406
  count: number;
454
407
  last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
455
408
  };
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: {
409
+ } | {
466
410
  type: "app.acl.active.request";
467
411
  role: "viewer";
468
412
  state: "pending";
@@ -509,7 +453,16 @@ export declare const ResUpsertKeyGrant: import("arktype/internal/variants/object
509
453
  key?: string | undefined;
510
454
  on: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
511
455
  };
512
- } | {
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: {
513
466
  type: "app.acl.active.invite";
514
467
  role: "editor";
515
468
  state: "pending";
@@ -595,6 +548,53 @@ export declare const ResUpsertKeyGrant: import("arktype/internal/variants/object
595
548
  count: number;
596
549
  last: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
597
550
  };
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;
@@ -0,0 +1,81 @@
1
+ export declare const lookRestyleShot: import("arktype/internal/variants/object.ts").ObjectType<{
2
+ fsId: string;
3
+ cid: string;
4
+ mime: string;
5
+ }, {}>;
6
+ export type LookRestyleShot = typeof lookRestyleShot.infer;
7
+ export declare const lookRestyleLook: import("arktype/internal/variants/object.ts").ObjectType<{
8
+ index: number;
9
+ name: string;
10
+ colorway: string;
11
+ mode: "dark" | "light";
12
+ headingFont: string;
13
+ bodyFont: string;
14
+ uploadId?: string | undefined;
15
+ cid?: string | undefined;
16
+ mimeType?: string | undefined;
17
+ failed?: boolean | undefined;
18
+ }, {}>;
19
+ export type LookRestyleLook = typeof lookRestyleLook.infer;
20
+ export declare const lookRestyleRound: import("arktype/internal/variants/object.ts").ObjectType<{
21
+ roundId: string;
22
+ looks: {
23
+ index: number;
24
+ name: string;
25
+ colorway: string;
26
+ mode: "dark" | "light";
27
+ headingFont: string;
28
+ bodyFont: string;
29
+ uploadId?: string | undefined;
30
+ cid?: string | undefined;
31
+ mimeType?: string | undefined;
32
+ failed?: boolean | undefined;
33
+ }[];
34
+ }, {}>;
35
+ export type LookRestyleRound = typeof lookRestyleRound.infer;
36
+ export declare const reqLookRestyle: import("arktype/internal/variants/object.ts").ObjectType<{
37
+ type: "vibes.diy.req-look-restyle";
38
+ auth: {
39
+ type: "clerk" | "device-id" | "guest" | "ucan";
40
+ token: string;
41
+ };
42
+ ownerHandle: string;
43
+ appSlug: string;
44
+ intent: "peek" | "start" | "wait";
45
+ retry?: boolean | undefined;
46
+ }, {}>;
47
+ export type ReqLookRestyle = typeof reqLookRestyle.infer;
48
+ export declare function isReqLookRestyle(obj: unknown): obj is ReqLookRestyle;
49
+ export declare const lookRestyleStatus: import("arktype/internal/variants/string.ts").StringType<"credits-short" | "failed" | "no-screenshot" | "none" | "ready" | "running", {}>;
50
+ export type LookRestyleStatus = typeof lookRestyleStatus.infer;
51
+ export declare const resLookRestyle: import("arktype/internal/variants/object.ts").ObjectType<{
52
+ type: "vibes.diy.res-look-restyle";
53
+ ownerHandle: string;
54
+ appSlug: string;
55
+ status: "credits-short" | "failed" | "no-screenshot" | "none" | "ready" | "running";
56
+ shot?: {
57
+ fsId: string;
58
+ cid: string;
59
+ mime: string;
60
+ } | undefined;
61
+ round?: {
62
+ roundId: string;
63
+ looks: {
64
+ index: number;
65
+ name: string;
66
+ colorway: string;
67
+ mode: "dark" | "light";
68
+ headingFont: string;
69
+ bodyFont: string;
70
+ uploadId?: string | undefined;
71
+ cid?: string | undefined;
72
+ mimeType?: string | undefined;
73
+ failed?: boolean | undefined;
74
+ }[];
75
+ } | undefined;
76
+ }, {}>;
77
+ export type ResLookRestyle = typeof resLookRestyle.infer;
78
+ export declare function isResLookRestyle(obj: unknown): obj is ResLookRestyle;
79
+ export declare const LOOK_RESTYLE_MIN_LOOKS = 2;
80
+ export declare function lookRestyleRoundReady(round: LookRestyleRound): boolean;
81
+ export declare function lookRestyleRoundSettled(round: LookRestyleRound): boolean;
@@ -0,0 +1,56 @@
1
+ import { type } from "arktype";
2
+ import { dashAuthType } from "./common.js";
3
+ import { lazyType } from "./lazy-type.js";
4
+ export const lookRestyleShot = lazyType(() => type({
5
+ fsId: "string",
6
+ cid: "string",
7
+ mime: "string",
8
+ }));
9
+ export const lookRestyleLook = lazyType(() => type({
10
+ index: "number",
11
+ name: "string",
12
+ colorway: "string",
13
+ mode: "'light' | 'dark'",
14
+ headingFont: "string",
15
+ bodyFont: "string",
16
+ "uploadId?": "string",
17
+ "cid?": "string",
18
+ "mimeType?": "string",
19
+ "failed?": "boolean",
20
+ }));
21
+ export const lookRestyleRound = lazyType(() => type({
22
+ roundId: "string",
23
+ looks: lookRestyleLook.array(),
24
+ }));
25
+ export const reqLookRestyle = lazyType(() => type({
26
+ type: "'vibes.diy.req-look-restyle'",
27
+ auth: dashAuthType,
28
+ ownerHandle: "string",
29
+ appSlug: "string",
30
+ intent: "'peek' | 'start' | 'wait'",
31
+ "retry?": "boolean",
32
+ }));
33
+ export function isReqLookRestyle(obj) {
34
+ return !(reqLookRestyle(obj) instanceof type.errors);
35
+ }
36
+ export const lookRestyleStatus = lazyType(() => type("'none' | 'running' | 'ready' | 'failed' | 'credits-short' | 'no-screenshot'"));
37
+ export const resLookRestyle = lazyType(() => type({
38
+ type: "'vibes.diy.res-look-restyle'",
39
+ ownerHandle: "string",
40
+ appSlug: "string",
41
+ status: lookRestyleStatus,
42
+ "shot?": lookRestyleShot,
43
+ "round?": lookRestyleRound,
44
+ }));
45
+ export function isResLookRestyle(obj) {
46
+ return !(resLookRestyle(obj) instanceof type.errors);
47
+ }
48
+ export const LOOK_RESTYLE_MIN_LOOKS = 2;
49
+ export function lookRestyleRoundReady(round) {
50
+ const live = round.looks.filter((l) => l.failed !== true);
51
+ return live.length >= LOOK_RESTYLE_MIN_LOOKS && live.every((l) => l.uploadId !== undefined && l.cid !== undefined);
52
+ }
53
+ export function lookRestyleRoundSettled(round) {
54
+ return round.looks.every((l) => l.failed === true || l.uploadId !== undefined);
55
+ }
56
+ //# sourceMappingURL=look-restyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"look-restyle.js","sourceRoot":"","sources":["../jsr/look-restyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAiB1C,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,GAAG,EAAE,CAC3C,IAAI,CAAC;IACH,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;CACf,CAAC,CACH,CAAC;AAQF,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,GAAG,EAAE,CAC3C,IAAI,CAAC;IACH,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,QAAQ;IACrB,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,QAAQ;IACrB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,QAAQ;IACrB,SAAS,EAAE,SAAS;CACrB,CAAC,CACH,CAAC;AAGF,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,EAAE,CAC5C,IAAI,CAAC;IACH,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,eAAe,CAAC,KAAK,EAAE;CAC/B,CAAC,CACH,CAAC;AAGF,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,QAAQ,KAAK,SAAS,IAAI,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC;AACrH,CAAC;AAGD,MAAM,UAAU,uBAAuB,CAAC,KAAuB;IAC7D,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;AACjF,CAAC"}
@@ -4,6 +4,7 @@ export declare const LEAD_POINTS: {
4
4
  readonly prompt: 5;
5
5
  readonly signup: 10;
6
6
  readonly revise: 25;
7
+ readonly chip: 5;
7
8
  readonly audience: 50;
8
9
  readonly paid: 100;
9
10
  readonly return: 10;
package/meta-capi-core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { exception2Result } from "@adviser/cement";
2
- export const LEAD_POINTS = { touch: 1, prompt: 5, signup: 10, revise: 25, audience: 50, paid: 100, return: 10 };
2
+ export const LEAD_POINTS = { touch: 1, prompt: 5, signup: 10, revise: 25, chip: 5, audience: 50, paid: 100, return: 10 };
3
3
  export const META_CLICK_WINDOW_MS = 7 * 24 * 60 * 60 * 1000;
4
4
  export function capiEndpoint(pixelId) {
5
5
  return `https://graph.facebook.com/v19.0/${pixelId}/events`;
@@ -1 +1 @@
1
- {"version":3,"file":"meta-capi-core.js","sourceRoot":"","sources":["../jsr/meta-capi-core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAkEnD,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAW,CAAC;AAYzH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE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
+ type: "vibes.diy.req-nature-rewrite-suggestion";
3
+ auth: {
4
+ type: "clerk" | "device-id" | "guest" | "ucan";
5
+ token: string;
6
+ };
7
+ ownerHandle: string;
8
+ appSlug: string;
9
+ nature: "collaborative" | "open" | "sensitive";
10
+ }, {}>;
11
+ export type ReqNatureRewriteSuggestion = typeof reqNatureRewriteSuggestion.infer;
12
+ export declare function isReqNatureRewriteSuggestion(obj: unknown): obj is ReqNatureRewriteSuggestion;
13
+ export declare const resNatureRewriteSuggestion: import("arktype/internal/variants/object.ts").ObjectType<{
14
+ type: "vibes.diy.res-nature-rewrite-suggestion";
15
+ suggestion?: string | undefined;
16
+ }, {}>;
17
+ export type ResNatureRewriteSuggestion = typeof resNatureRewriteSuggestion.infer;
18
+ export declare function isResNatureRewriteSuggestion(obj: unknown): obj is ResNatureRewriteSuggestion;
@@ -0,0 +1,22 @@
1
+ import { type } from "arktype";
2
+ import { dashAuthType } from "./common.js";
3
+ import { AppNature } from "./invite.js";
4
+ import { lazyType } from "./lazy-type.js";
5
+ export const reqNatureRewriteSuggestion = lazyType(() => type({
6
+ type: "'vibes.diy.req-nature-rewrite-suggestion'",
7
+ auth: dashAuthType,
8
+ ownerHandle: "string",
9
+ appSlug: "string",
10
+ nature: AppNature,
11
+ }));
12
+ export function isReqNatureRewriteSuggestion(obj) {
13
+ return !(reqNatureRewriteSuggestion(obj) instanceof type.errors);
14
+ }
15
+ export const resNatureRewriteSuggestion = lazyType(() => type({
16
+ type: "'vibes.diy.res-nature-rewrite-suggestion'",
17
+ "suggestion?": "string",
18
+ }));
19
+ export function isResNatureRewriteSuggestion(obj) {
20
+ return !(resNatureRewriteSuggestion(obj) instanceof type.errors);
21
+ }
22
+ //# sourceMappingURL=nature-rewrite-suggestion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nature-rewrite-suggestion.js","sourceRoot":"","sources":["../jsr/nature-rewrite-suggestion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAU1C,MAAM,CAAC,MAAM,0BAA0B,GAAG,QAAQ,CAAC,GAAG,EAAE,CACtD,IAAI,CAAC;IACH,IAAI,EAAE,2CAA2C;IACjD,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,SAAS;CAClB,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,4BAA4B,CAAC,GAAY;IACvD,OAAO,CAAC,CAAC,0BAA0B,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC;AAID,MAAM,CAAC,MAAM,0BAA0B,GAAG,QAAQ,CAAC,GAAG,EAAE,CACtD,IAAI,CAAC;IACH,IAAI,EAAE,2CAA2C;IACjD,aAAa,EAAE,QAAQ;CACxB,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,4BAA4B,CAAC,GAAY;IACvD,OAAO,CAAC,CAAC,0BAA0B,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/api-types",
3
- "version": "14.3.114",
3
+ "version": "14.3.116",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@adviser/cement": "~0.5.34",
22
22
  "@cloudflare/workers-types": "~5.20261004.1",
23
- "@vibes.diy/call-ai-v2": "14.3.114",
24
- "@vibes.diy/identity": "14.3.114",
25
- "@vibes.diy/vibe-types": "14.3.114",
23
+ "@vibes.diy/call-ai-v2": "14.3.116",
24
+ "@vibes.diy/identity": "14.3.116",
25
+ "@vibes.diy/vibe-types": "14.3.116",
26
26
  "arktype": "~2.2.6"
27
27
  },
28
28
  "repository": {
@@ -38,6 +38,7 @@ export declare const YOUR_WAY_REFINED_EXAMPLES: ({
38
38
  export declare const YOUR_WAY_PLACEHOLDER: PrefilledPrompt;
39
39
  export declare const partyPlannerPrompt: PrefilledPrompt;
40
40
  export declare const progressTrackerPrompt: PrefilledPrompt;
41
+ export declare function utmContentPrefill(utmContent: string | undefined): PrefilledPrompt | undefined;
41
42
  export type HumanLaneId = "fun-apps" | "my-tools" | "group-apps";
42
43
  export type HumanLaneArt = "checkers" | "blocks" | "soundboard" | "coffee" | "cooking" | "plants" | "books" | "cabin" | "recipes" | "digest" | "gamenight" | "taskboard" | "budget";
43
44
  export interface HumanLaneIdea extends Suggestion {
@@ -409,6 +409,16 @@ prefilled("An order form for pottery.");
409
409
  export const YOUR_WAY_PLACEHOLDER = prefilled("An order form for my pottery shop, with glaze colors and local pickup times.");
410
410
  export const partyPlannerPrompt = prefilled("Create a party planning app with a shared guest list where invitees RSVP themselves, plus collaborative budget tracking.");
411
411
  export const progressTrackerPrompt = prefilled("Create a random app idea and build it automatically.");
412
+ const UTM_CONTENT_PREFILLS = new Map([
413
+ ["strivers-booking", prefilled("A booking page where people pick a time, and I get the list.")],
414
+ ["plain-clubhouse-2", prefilled("An app for my friends with plans, polls and photos, and one link to share.")],
415
+ ["plain-touch-2", prefilled("A simple app to keep in touch: birthdays, check-ins, and who's in town.")],
416
+ ]);
417
+ export function utmContentPrefill(utmContent) {
418
+ if (utmContent === undefined)
419
+ return undefined;
420
+ return UTM_CONTENT_PREFILLS.get(utmContent);
421
+ }
412
422
  const humanLaneData = {
413
423
  "fun-apps": [
414
424
  {