@ourofoundation/ouro-js 3.7.0 → 3.7.1

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.
Files changed (85) hide show
  1. package/dist/chunk-2BABFO5H.js +2 -0
  2. package/dist/chunk-2BABFO5H.js.map +1 -0
  3. package/dist/{chunk-HW6FGPTA.cjs → chunk-2KXX5JF6.cjs} +2 -2
  4. package/dist/{chunk-HW6FGPTA.cjs.map → chunk-2KXX5JF6.cjs.map} +1 -1
  5. package/dist/{chunk-QSOXS57A.cjs → chunk-G5V2WTN5.cjs} +2 -2
  6. package/dist/{chunk-QSOXS57A.cjs.map → chunk-G5V2WTN5.cjs.map} +1 -1
  7. package/dist/chunk-IL3WA4D7.js +2 -0
  8. package/dist/{chunk-QBL6KIST.js.map → chunk-IL3WA4D7.js.map} +1 -1
  9. package/dist/chunk-LYP7DPZ3.js +2 -0
  10. package/dist/{chunk-7EKD5NQB.js.map → chunk-LYP7DPZ3.js.map} +1 -1
  11. package/dist/chunk-N74Y47X7.js +2 -0
  12. package/dist/chunk-N74Y47X7.js.map +1 -0
  13. package/dist/{chunk-IVO3RQUN.cjs → chunk-O5CY3JW3.cjs} +2 -2
  14. package/dist/{chunk-IVO3RQUN.cjs.map → chunk-O5CY3JW3.cjs.map} +1 -1
  15. package/dist/{chunk-JUELSRCY.js → chunk-OBXAWON7.js} +2 -2
  16. package/dist/{chunk-JUELSRCY.js.map → chunk-OBXAWON7.js.map} +1 -1
  17. package/dist/{chunk-DY5QSBE4.js → chunk-OWS6VJJ2.js} +2 -2
  18. package/dist/{chunk-DY5QSBE4.js.map → chunk-OWS6VJJ2.js.map} +1 -1
  19. package/dist/{chunk-NTWSEN2H.cjs → chunk-PN763DHR.cjs} +2 -2
  20. package/dist/{chunk-NTWSEN2H.cjs.map → chunk-PN763DHR.cjs.map} +1 -1
  21. package/dist/{chunk-5EQ5LO7V.cjs → chunk-PPZZKUF6.cjs} +2 -2
  22. package/dist/chunk-PPZZKUF6.cjs.map +1 -0
  23. package/dist/chunk-QJG6O5OT.cjs +2 -0
  24. package/dist/chunk-QJG6O5OT.cjs.map +1 -0
  25. package/dist/chunk-R7YOQNVS.js +2 -0
  26. package/dist/{chunk-ZC2VDKSH.js.map → chunk-R7YOQNVS.js.map} +1 -1
  27. package/dist/{chunk-TMNFNVTZ.js → chunk-S5VZHGMV.js} +2 -2
  28. package/dist/{chunk-TMNFNVTZ.js.map → chunk-S5VZHGMV.js.map} +1 -1
  29. package/dist/{chunk-QNERXSMJ.cjs → chunk-VPYKCTVU.cjs} +2 -2
  30. package/dist/{chunk-QNERXSMJ.cjs.map → chunk-VPYKCTVU.cjs.map} +1 -1
  31. package/dist/{chunk-AI2FA44G.cjs → chunk-Y6EN5F74.cjs} +2 -2
  32. package/dist/{chunk-AI2FA44G.cjs.map → chunk-Y6EN5F74.cjs.map} +1 -1
  33. package/dist/{chunk-57RRLX7P.cjs → chunk-YCK6Y3BF.cjs} +2 -2
  34. package/dist/{chunk-57RRLX7P.cjs.map → chunk-YCK6Y3BF.cjs.map} +1 -1
  35. package/dist/{chunk-RD6EPK44.js → chunk-YXVAFJZH.js} +2 -2
  36. package/dist/{chunk-RD6EPK44.js.map → chunk-YXVAFJZH.js.map} +1 -1
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.d.cts +1 -1
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.js +1 -1
  41. package/dist/schema/assets.cjs +1 -1
  42. package/dist/schema/assets.d.cts +123 -84
  43. package/dist/schema/assets.d.ts +123 -84
  44. package/dist/schema/assets.js +1 -1
  45. package/dist/schema/comments.cjs +1 -1
  46. package/dist/schema/comments.d.cts +78 -42
  47. package/dist/schema/comments.d.ts +78 -42
  48. package/dist/schema/comments.js +1 -1
  49. package/dist/schema/conversations.cjs +1 -1
  50. package/dist/schema/conversations.d.cts +173 -101
  51. package/dist/schema/conversations.d.ts +173 -101
  52. package/dist/schema/conversations.js +1 -1
  53. package/dist/schema/datasets.cjs +1 -1
  54. package/dist/schema/datasets.d.cts +239 -167
  55. package/dist/schema/datasets.d.ts +239 -167
  56. package/dist/schema/datasets.js +1 -1
  57. package/dist/schema/files.cjs +1 -1
  58. package/dist/schema/files.d.cts +219 -147
  59. package/dist/schema/files.d.ts +219 -147
  60. package/dist/schema/files.js +1 -1
  61. package/dist/schema/posts.cjs +1 -1
  62. package/dist/schema/posts.d.cts +152 -116
  63. package/dist/schema/posts.d.ts +152 -116
  64. package/dist/schema/posts.js +1 -1
  65. package/dist/schema/quests.cjs +1 -1
  66. package/dist/schema/quests.d.cts +156 -120
  67. package/dist/schema/quests.d.ts +156 -120
  68. package/dist/schema/quests.js +1 -1
  69. package/dist/schema/services.cjs +1 -1
  70. package/dist/schema/services.d.cts +156 -120
  71. package/dist/schema/services.d.ts +156 -120
  72. package/dist/schema/services.js +1 -1
  73. package/dist/utils/quest-submission.cjs +1 -1
  74. package/dist/utils/quest-submission.js +1 -1
  75. package/package.json +2 -2
  76. package/dist/chunk-5EQ5LO7V.cjs.map +0 -1
  77. package/dist/chunk-7EKD5NQB.js +0 -2
  78. package/dist/chunk-ITF5WQQB.js +0 -2
  79. package/dist/chunk-ITF5WQQB.js.map +0 -1
  80. package/dist/chunk-QBL6KIST.js +0 -2
  81. package/dist/chunk-SY5IKIT6.cjs +0 -2
  82. package/dist/chunk-SY5IKIT6.cjs.map +0 -1
  83. package/dist/chunk-TGOXRPF5.js +0 -2
  84. package/dist/chunk-TGOXRPF5.js.map +0 -1
  85. package/dist/chunk-ZC2VDKSH.js +0 -2
@@ -207,7 +207,7 @@ declare const ServiceSchema: z.ZodObject<{
207
207
  stripe_product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
208
208
  stripe_price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
209
209
  stripe_meter_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
- attribution: z.ZodOptional<z.ZodNullable<z.ZodObject<{
210
+ attribution: z.ZodObject<{
211
211
  originality: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
212
212
  original: "original";
213
213
  derivative: "derivative";
@@ -235,7 +235,7 @@ declare const ServiceSchema: z.ZodObject<{
235
235
  IsIdenticalTo: "IsIdenticalTo";
236
236
  }>>>;
237
237
  doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
- }, z.core.$strip>>>;
238
+ }, z.core.$strip>;
239
239
  preview: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
240
240
  state: z.ZodEnum<{
241
241
  success: "success";
@@ -307,7 +307,31 @@ declare const CreateServiceSchema: z.ZodPipe<z.ZodObject<{
307
307
  stripe_product_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
308
308
  stripe_price_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
309
309
  stripe_meter_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
310
- attribution: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
310
+ preview: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>>;
311
+ id: z.ZodDefault<z.ZodUUID>;
312
+ team_id: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
313
+ org_id: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
314
+ name: z.ZodString;
315
+ name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
316
+ state: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
317
+ success: "success";
318
+ queued: "queued";
319
+ "in-progress": "in-progress";
320
+ "timed-out": "timed-out";
321
+ error: "error";
322
+ }>>>;
323
+ source: z.ZodDefault<z.ZodEnum<{
324
+ api: "api";
325
+ web: "web";
326
+ }>>;
327
+ visibility: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
328
+ organization: "organization";
329
+ public: "public";
330
+ private: "private";
331
+ monetized: "monetized";
332
+ inherit: "inherit";
333
+ }>>>;
334
+ attribution: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
311
335
  originality: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
312
336
  original: "original";
313
337
  derivative: "derivative";
@@ -335,31 +359,43 @@ declare const CreateServiceSchema: z.ZodPipe<z.ZodObject<{
335
359
  IsIdenticalTo: "IsIdenticalTo";
336
360
  }>>>;
337
361
  doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
338
- }, z.core.$strip>>>>;
339
- preview: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>>;
340
- id: z.ZodDefault<z.ZodUUID>;
341
- team_id: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
342
- org_id: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
343
- name: z.ZodString;
344
- name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
345
- state: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
346
- success: "success";
347
- queued: "queued";
348
- "in-progress": "in-progress";
349
- "timed-out": "timed-out";
350
- error: "error";
351
- }>>>;
352
- source: z.ZodDefault<z.ZodEnum<{
353
- api: "api";
354
- web: "web";
355
- }>>;
356
- visibility: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
357
- organization: "organization";
358
- public: "public";
359
- private: "private";
360
- monetized: "monetized";
361
- inherit: "inherit";
362
- }>>>;
362
+ }, z.core.$strip>>>, z.ZodTransform<{
363
+ originality: "original" | "derivative" | "third-party";
364
+ external_url?: string | null | undefined;
365
+ github_url?: string | null | undefined;
366
+ paper_url?: string | null | undefined;
367
+ doi_url?: string | null | undefined;
368
+ citation?: {
369
+ doi?: string | null | undefined;
370
+ title?: string | null | undefined;
371
+ authors?: string[] | null | undefined;
372
+ year?: number | null | undefined;
373
+ venue?: string | null | undefined;
374
+ url?: string | null | undefined;
375
+ bibtex?: string | null | undefined;
376
+ source?: string | null | undefined;
377
+ } | null | undefined;
378
+ relation_type?: "IsSupplementTo" | "IsDerivedFrom" | "References" | "IsVariantFormOf" | "IsIdenticalTo" | null | undefined;
379
+ doi?: string | null | undefined;
380
+ }, {
381
+ originality: "original" | "derivative" | "third-party";
382
+ external_url?: string | null | undefined;
383
+ github_url?: string | null | undefined;
384
+ paper_url?: string | null | undefined;
385
+ doi_url?: string | null | undefined;
386
+ citation?: {
387
+ doi?: string | null | undefined;
388
+ title?: string | null | undefined;
389
+ authors?: string[] | null | undefined;
390
+ year?: number | null | undefined;
391
+ venue?: string | null | undefined;
392
+ url?: string | null | undefined;
393
+ bibtex?: string | null | undefined;
394
+ source?: string | null | undefined;
395
+ } | null | undefined;
396
+ relation_type?: "IsSupplementTo" | "IsDerivedFrom" | "References" | "IsVariantFormOf" | "IsIdenticalTo" | null | undefined;
397
+ doi?: string | null | undefined;
398
+ } | null | undefined>>;
363
399
  created_at: z.ZodDefault<z.ZodString>;
364
400
  last_updated: z.ZodDefault<z.ZodString>;
365
401
  asset_type: z.ZodEnum<{
@@ -398,6 +434,25 @@ declare const CreateServiceSchema: z.ZodPipe<z.ZodObject<{
398
434
  state: "success" | "queued" | "in-progress" | "timed-out" | "error";
399
435
  source: "api" | "web";
400
436
  visibility: "organization" | "public" | "private" | "monetized" | "inherit";
437
+ attribution: {
438
+ originality: "original" | "derivative" | "third-party";
439
+ external_url?: string | null | undefined;
440
+ github_url?: string | null | undefined;
441
+ paper_url?: string | null | undefined;
442
+ doi_url?: string | null | undefined;
443
+ citation?: {
444
+ doi?: string | null | undefined;
445
+ title?: string | null | undefined;
446
+ authors?: string[] | null | undefined;
447
+ year?: number | null | undefined;
448
+ venue?: string | null | undefined;
449
+ url?: string | null | undefined;
450
+ bibtex?: string | null | undefined;
451
+ source?: string | null | undefined;
452
+ } | null | undefined;
453
+ relation_type?: "IsSupplementTo" | "IsDerivedFrom" | "References" | "IsVariantFormOf" | "IsIdenticalTo" | null | undefined;
454
+ doi?: string | null | undefined;
455
+ };
401
456
  created_at: string;
402
457
  last_updated: string;
403
458
  asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "quest" | "comment" | "conversation";
@@ -427,7 +482,17 @@ declare const CreateServiceSchema: z.ZodPipe<z.ZodObject<{
427
482
  stripe_product_id?: string | null | undefined;
428
483
  stripe_price_id?: string | null | undefined;
429
484
  stripe_meter_id?: string | null | undefined;
430
- attribution?: {
485
+ preview?: Record<string, any>[] | null | undefined;
486
+ name_url_slug?: string | null | undefined;
487
+ }, {
488
+ id: string;
489
+ team_id: string | null;
490
+ org_id: string | null;
491
+ name: string;
492
+ state: "success" | "queued" | "in-progress" | "timed-out" | "error";
493
+ source: "api" | "web";
494
+ visibility: "organization" | "public" | "private" | "monetized" | "inherit";
495
+ attribution: {
431
496
  originality: "original" | "derivative" | "third-party";
432
497
  external_url?: string | null | undefined;
433
498
  github_url?: string | null | undefined;
@@ -445,17 +510,7 @@ declare const CreateServiceSchema: z.ZodPipe<z.ZodObject<{
445
510
  } | null | undefined;
446
511
  relation_type?: "IsSupplementTo" | "IsDerivedFrom" | "References" | "IsVariantFormOf" | "IsIdenticalTo" | null | undefined;
447
512
  doi?: string | null | undefined;
448
- } | null | undefined;
449
- preview?: Record<string, any>[] | null | undefined;
450
- name_url_slug?: string | null | undefined;
451
- }, {
452
- id: string;
453
- team_id: string | null;
454
- org_id: string | null;
455
- name: string;
456
- state: "success" | "queued" | "in-progress" | "timed-out" | "error";
457
- source: "api" | "web";
458
- visibility: "organization" | "public" | "private" | "monetized" | "inherit";
513
+ };
459
514
  created_at: string;
460
515
  last_updated: string;
461
516
  asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "quest" | "comment" | "conversation";
@@ -485,25 +540,6 @@ declare const CreateServiceSchema: z.ZodPipe<z.ZodObject<{
485
540
  stripe_product_id?: string | null | undefined;
486
541
  stripe_price_id?: string | null | undefined;
487
542
  stripe_meter_id?: string | null | undefined;
488
- attribution?: {
489
- originality: "original" | "derivative" | "third-party";
490
- external_url?: string | null | undefined;
491
- github_url?: string | null | undefined;
492
- paper_url?: string | null | undefined;
493
- doi_url?: string | null | undefined;
494
- citation?: {
495
- doi?: string | null | undefined;
496
- title?: string | null | undefined;
497
- authors?: string[] | null | undefined;
498
- year?: number | null | undefined;
499
- venue?: string | null | undefined;
500
- url?: string | null | undefined;
501
- bibtex?: string | null | undefined;
502
- source?: string | null | undefined;
503
- } | null | undefined;
504
- relation_type?: "IsSupplementTo" | "IsDerivedFrom" | "References" | "IsVariantFormOf" | "IsIdenticalTo" | null | undefined;
505
- doi?: string | null | undefined;
506
- } | null | undefined;
507
543
  preview?: Record<string, any>[] | null | undefined;
508
544
  name_url_slug?: string | null | undefined;
509
545
  }>>;
@@ -560,32 +596,7 @@ declare const UpdateServiceSchema: z.ZodPipe<z.ZodObject<{
560
596
  "pay-to-unlock": "pay-to-unlock";
561
597
  "pay-per-use": "pay-per-use";
562
598
  }>>;
563
- state: z.ZodOptional<z.ZodEnum<{
564
- success: "success";
565
- queued: "queued";
566
- "in-progress": "in-progress";
567
- "timed-out": "timed-out";
568
- error: "error";
569
- }>>;
570
- parent_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
571
- license_id: z.ZodOptional<z.ZodString>;
572
- license: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
573
- name_url_slug: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
574
- price: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
575
- unit_cost: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
576
- cost_accounting: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
577
- fixed: "fixed";
578
- variable: "variable";
579
- }>>>>;
580
- cost_unit: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
581
- price_currency: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
582
- usd: "usd";
583
- btc: "btc";
584
- }>>>;
585
- stripe_product_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
586
- stripe_price_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
587
- stripe_meter_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
588
- attribution: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
599
+ attribution: z.ZodOptional<z.ZodObject<{
589
600
  originality: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
590
601
  original: "original";
591
602
  derivative: "derivative";
@@ -613,7 +624,32 @@ declare const UpdateServiceSchema: z.ZodPipe<z.ZodObject<{
613
624
  IsIdenticalTo: "IsIdenticalTo";
614
625
  }>>>;
615
626
  doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
616
- }, z.core.$strip>>>>;
627
+ }, z.core.$strip>>;
628
+ state: z.ZodOptional<z.ZodEnum<{
629
+ success: "success";
630
+ queued: "queued";
631
+ "in-progress": "in-progress";
632
+ "timed-out": "timed-out";
633
+ error: "error";
634
+ }>>;
635
+ parent_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
636
+ license_id: z.ZodOptional<z.ZodString>;
637
+ license: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
638
+ name_url_slug: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
639
+ price: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
640
+ unit_cost: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
641
+ cost_accounting: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
642
+ fixed: "fixed";
643
+ variable: "variable";
644
+ }>>>>;
645
+ cost_unit: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
646
+ price_currency: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
647
+ usd: "usd";
648
+ btc: "btc";
649
+ }>>>;
650
+ stripe_product_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
651
+ stripe_price_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
652
+ stripe_meter_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
617
653
  preview: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>>;
618
654
  last_updated: z.ZodDefault<z.ZodString>;
619
655
  }, z.core.$strip>, z.ZodTransform<{
@@ -640,19 +676,6 @@ declare const UpdateServiceSchema: z.ZodPipe<z.ZodObject<{
640
676
  } | null | undefined;
641
677
  source?: "api" | "web" | undefined;
642
678
  monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
643
- state?: "success" | "queued" | "in-progress" | "timed-out" | "error" | undefined;
644
- parent_id?: string | null | undefined;
645
- license_id?: string | undefined;
646
- license?: Record<string, any> | undefined;
647
- name_url_slug?: string | null | undefined;
648
- price?: number | null | undefined;
649
- unit_cost?: number | null | undefined;
650
- cost_accounting?: "fixed" | "variable" | null | undefined;
651
- cost_unit?: string | null | undefined;
652
- price_currency?: "usd" | "btc" | undefined;
653
- stripe_product_id?: string | null | undefined;
654
- stripe_price_id?: string | null | undefined;
655
- stripe_meter_id?: string | null | undefined;
656
679
  attribution?: {
657
680
  originality: "original" | "derivative" | "third-party";
658
681
  external_url?: string | null | undefined;
@@ -671,7 +694,20 @@ declare const UpdateServiceSchema: z.ZodPipe<z.ZodObject<{
671
694
  } | null | undefined;
672
695
  relation_type?: "IsSupplementTo" | "IsDerivedFrom" | "References" | "IsVariantFormOf" | "IsIdenticalTo" | null | undefined;
673
696
  doi?: string | null | undefined;
674
- } | null | undefined;
697
+ } | undefined;
698
+ state?: "success" | "queued" | "in-progress" | "timed-out" | "error" | undefined;
699
+ parent_id?: string | null | undefined;
700
+ license_id?: string | undefined;
701
+ license?: Record<string, any> | undefined;
702
+ name_url_slug?: string | null | undefined;
703
+ price?: number | null | undefined;
704
+ unit_cost?: number | null | undefined;
705
+ cost_accounting?: "fixed" | "variable" | null | undefined;
706
+ cost_unit?: string | null | undefined;
707
+ price_currency?: "usd" | "btc" | undefined;
708
+ stripe_product_id?: string | null | undefined;
709
+ stripe_price_id?: string | null | undefined;
710
+ stripe_meter_id?: string | null | undefined;
675
711
  preview?: Record<string, any>[] | null | undefined;
676
712
  }, {
677
713
  last_updated: string;
@@ -697,19 +733,6 @@ declare const UpdateServiceSchema: z.ZodPipe<z.ZodObject<{
697
733
  } | null | undefined;
698
734
  source?: "api" | "web" | undefined;
699
735
  monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
700
- state?: "success" | "queued" | "in-progress" | "timed-out" | "error" | undefined;
701
- parent_id?: string | null | undefined;
702
- license_id?: string | undefined;
703
- license?: Record<string, any> | undefined;
704
- name_url_slug?: string | null | undefined;
705
- price?: number | null | undefined;
706
- unit_cost?: number | null | undefined;
707
- cost_accounting?: "fixed" | "variable" | null | undefined;
708
- cost_unit?: string | null | undefined;
709
- price_currency?: "usd" | "btc" | undefined;
710
- stripe_product_id?: string | null | undefined;
711
- stripe_price_id?: string | null | undefined;
712
- stripe_meter_id?: string | null | undefined;
713
736
  attribution?: {
714
737
  originality: "original" | "derivative" | "third-party";
715
738
  external_url?: string | null | undefined;
@@ -728,7 +751,20 @@ declare const UpdateServiceSchema: z.ZodPipe<z.ZodObject<{
728
751
  } | null | undefined;
729
752
  relation_type?: "IsSupplementTo" | "IsDerivedFrom" | "References" | "IsVariantFormOf" | "IsIdenticalTo" | null | undefined;
730
753
  doi?: string | null | undefined;
731
- } | null | undefined;
754
+ } | undefined;
755
+ state?: "success" | "queued" | "in-progress" | "timed-out" | "error" | undefined;
756
+ parent_id?: string | null | undefined;
757
+ license_id?: string | undefined;
758
+ license?: Record<string, any> | undefined;
759
+ name_url_slug?: string | null | undefined;
760
+ price?: number | null | undefined;
761
+ unit_cost?: number | null | undefined;
762
+ cost_accounting?: "fixed" | "variable" | null | undefined;
763
+ cost_unit?: string | null | undefined;
764
+ price_currency?: "usd" | "btc" | undefined;
765
+ stripe_product_id?: string | null | undefined;
766
+ stripe_price_id?: string | null | undefined;
767
+ stripe_meter_id?: string | null | undefined;
732
768
  preview?: Record<string, any>[] | null | undefined;
733
769
  }>>;
734
770
  declare const ExecutionModeSchema: z.ZodEnum<{
@@ -1086,7 +1122,7 @@ declare const RouteSchema: z.ZodObject<{
1086
1122
  source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1087
1123
  reply_to_comment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1088
1124
  }, z.core.$strip>>>;
1089
- attribution: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1125
+ attribution: z.ZodObject<{
1090
1126
  originality: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
1091
1127
  original: "original";
1092
1128
  derivative: "derivative";
@@ -1114,7 +1150,7 @@ declare const RouteSchema: z.ZodObject<{
1114
1150
  IsIdenticalTo: "IsIdenticalTo";
1115
1151
  }>>>;
1116
1152
  doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1117
- }, z.core.$strip>>>;
1153
+ }, z.core.$strip>;
1118
1154
  preview: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
1119
1155
  state: z.ZodEnum<{
1120
1156
  success: "success";
@@ -1461,7 +1497,7 @@ declare const ActionSchema: z.ZodObject<{
1461
1497
  source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1462
1498
  reply_to_comment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1463
1499
  }, z.core.$strip>>>;
1464
- attribution: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1500
+ attribution: z.ZodObject<{
1465
1501
  originality: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
1466
1502
  original: "original";
1467
1503
  derivative: "derivative";
@@ -1489,7 +1525,7 @@ declare const ActionSchema: z.ZodObject<{
1489
1525
  IsIdenticalTo: "IsIdenticalTo";
1490
1526
  }>>>;
1491
1527
  doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1492
- }, z.core.$strip>>>;
1528
+ }, z.core.$strip>;
1493
1529
  preview: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
1494
1530
  state: z.ZodEnum<{
1495
1531
  success: "success";
@@ -1731,7 +1767,7 @@ declare const ActionSchema: z.ZodObject<{
1731
1767
  source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1732
1768
  reply_to_comment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1733
1769
  }, z.core.$strip>>>;
1734
- attribution: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1770
+ attribution: z.ZodObject<{
1735
1771
  originality: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
1736
1772
  original: "original";
1737
1773
  derivative: "derivative";
@@ -1759,7 +1795,7 @@ declare const ActionSchema: z.ZodObject<{
1759
1795
  IsIdenticalTo: "IsIdenticalTo";
1760
1796
  }>>>;
1761
1797
  doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1762
- }, z.core.$strip>>>;
1798
+ }, z.core.$strip>;
1763
1799
  preview: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
1764
1800
  state: z.ZodEnum<{
1765
1801
  success: "success";
@@ -1,2 +1,2 @@
1
- export{k as ActionSchema,b as CreateServiceSchema,d as ExecutionModeSchema,e as RouteInputAssetDeclarationSchema,g as RouteInputAssetsSchema,i as RouteMetricsSchema,f as RouteOutputAssetDeclarationSchema,h as RouteOutputAssetsSchema,j as RouteSchema,a as ServiceSchema,c as UpdateServiceSchema}from'../chunk-ZC2VDKSH.js';import'../chunk-OU4JKY4M.js';import'../chunk-TGOXRPF5.js';import'../chunk-CF56NFUG.js';import'../chunk-WLGOABHV.js';import'../chunk-3N56ERWF.js';import'../chunk-WRHPQNEL.js';import'../chunk-DUBPWSCA.js';//# sourceMappingURL=services.js.map
1
+ export{k as ActionSchema,b as CreateServiceSchema,d as ExecutionModeSchema,e as RouteInputAssetDeclarationSchema,g as RouteInputAssetsSchema,i as RouteMetricsSchema,f as RouteOutputAssetDeclarationSchema,h as RouteOutputAssetsSchema,j as RouteSchema,a as ServiceSchema,c as UpdateServiceSchema}from'../chunk-R7YOQNVS.js';import'../chunk-OU4JKY4M.js';import'../chunk-2BABFO5H.js';import'../chunk-CF56NFUG.js';import'../chunk-WLGOABHV.js';import'../chunk-3N56ERWF.js';import'../chunk-WRHPQNEL.js';import'../chunk-DUBPWSCA.js';//# sourceMappingURL=services.js.map
2
2
  //# sourceMappingURL=services.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkQNERXSMJ_cjs=require('../chunk-QNERXSMJ.cjs');require('../chunk-QSOXS57A.cjs'),require('../chunk-KHERHT26.cjs'),require('../chunk-5EQ5LO7V.cjs'),require('../chunk-UY43EQTO.cjs'),require('../chunk-VOY623ZD.cjs'),require('../chunk-GY6SLMMJ.cjs'),require('../chunk-43KB23BA.cjs'),require('../chunk-7HF5VHUN.cjs');Object.defineProperty(exports,"KeyedAssetInputSchema",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.c}});Object.defineProperty(exports,"KeyedAssetInputValueSchema",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.b}});Object.defineProperty(exports,"KeyedAssetRefsSchema",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.a}});Object.defineProperty(exports,"QuestSubmissionAssetDeclarationSchema",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.d}});Object.defineProperty(exports,"assetMatchesDeclaration",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.k}});Object.defineProperty(exports,"declarationToPickerFilters",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.j}});Object.defineProperty(exports,"declarationToSubmissionDeclaration",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.f}});Object.defineProperty(exports,"getPrimaryAssetRef",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.l}});Object.defineProperty(exports,"getPrimaryDeclarationKey",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.h}});Object.defineProperty(exports,"getRouteInputDeclarationsFromRoute",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.e}});Object.defineProperty(exports,"getSubmissionAssetShape",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.i}});Object.defineProperty(exports,"materializeContributorSubmissionAssets",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.g}});Object.defineProperty(exports,"toRouteInputAssets",{enumerable:true,get:function(){return chunkQNERXSMJ_cjs.m}});//# sourceMappingURL=quest-submission.cjs.map
1
+ 'use strict';var chunkVPYKCTVU_cjs=require('../chunk-VPYKCTVU.cjs');require('../chunk-G5V2WTN5.cjs'),require('../chunk-KHERHT26.cjs'),require('../chunk-PPZZKUF6.cjs'),require('../chunk-UY43EQTO.cjs'),require('../chunk-VOY623ZD.cjs'),require('../chunk-GY6SLMMJ.cjs'),require('../chunk-43KB23BA.cjs'),require('../chunk-7HF5VHUN.cjs');Object.defineProperty(exports,"KeyedAssetInputSchema",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.c}});Object.defineProperty(exports,"KeyedAssetInputValueSchema",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.b}});Object.defineProperty(exports,"KeyedAssetRefsSchema",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.a}});Object.defineProperty(exports,"QuestSubmissionAssetDeclarationSchema",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.d}});Object.defineProperty(exports,"assetMatchesDeclaration",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.k}});Object.defineProperty(exports,"declarationToPickerFilters",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.j}});Object.defineProperty(exports,"declarationToSubmissionDeclaration",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.f}});Object.defineProperty(exports,"getPrimaryAssetRef",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.l}});Object.defineProperty(exports,"getPrimaryDeclarationKey",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.h}});Object.defineProperty(exports,"getRouteInputDeclarationsFromRoute",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.e}});Object.defineProperty(exports,"getSubmissionAssetShape",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.i}});Object.defineProperty(exports,"materializeContributorSubmissionAssets",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.g}});Object.defineProperty(exports,"toRouteInputAssets",{enumerable:true,get:function(){return chunkVPYKCTVU_cjs.m}});//# sourceMappingURL=quest-submission.cjs.map
2
2
  //# sourceMappingURL=quest-submission.cjs.map
@@ -1,2 +1,2 @@
1
- export{c as KeyedAssetInputSchema,b as KeyedAssetInputValueSchema,a as KeyedAssetRefsSchema,d as QuestSubmissionAssetDeclarationSchema,k as assetMatchesDeclaration,j as declarationToPickerFilters,f as declarationToSubmissionDeclaration,l as getPrimaryAssetRef,h as getPrimaryDeclarationKey,e as getRouteInputDeclarationsFromRoute,i as getSubmissionAssetShape,g as materializeContributorSubmissionAssets,m as toRouteInputAssets}from'../chunk-TMNFNVTZ.js';import'../chunk-ZC2VDKSH.js';import'../chunk-OU4JKY4M.js';import'../chunk-TGOXRPF5.js';import'../chunk-CF56NFUG.js';import'../chunk-WLGOABHV.js';import'../chunk-3N56ERWF.js';import'../chunk-WRHPQNEL.js';import'../chunk-DUBPWSCA.js';//# sourceMappingURL=quest-submission.js.map
1
+ export{c as KeyedAssetInputSchema,b as KeyedAssetInputValueSchema,a as KeyedAssetRefsSchema,d as QuestSubmissionAssetDeclarationSchema,k as assetMatchesDeclaration,j as declarationToPickerFilters,f as declarationToSubmissionDeclaration,l as getPrimaryAssetRef,h as getPrimaryDeclarationKey,e as getRouteInputDeclarationsFromRoute,i as getSubmissionAssetShape,g as materializeContributorSubmissionAssets,m as toRouteInputAssets}from'../chunk-S5VZHGMV.js';import'../chunk-R7YOQNVS.js';import'../chunk-OU4JKY4M.js';import'../chunk-2BABFO5H.js';import'../chunk-CF56NFUG.js';import'../chunk-WLGOABHV.js';import'../chunk-3N56ERWF.js';import'../chunk-WRHPQNEL.js';import'../chunk-DUBPWSCA.js';//# sourceMappingURL=quest-submission.js.map
2
2
  //# sourceMappingURL=quest-submission.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ourofoundation/ouro-js",
3
- "version": "3.7.0",
3
+ "version": "3.7.1",
4
4
  "description": "Interact with the Ouro platform in browser and node.js environments",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.cjs",
@@ -78,4 +78,4 @@
78
78
  "engines": {
79
79
  "node": ">=14.0.0"
80
80
  }
81
- }
81
+ }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/schema/assets.ts"],"names":["normalizeAssetConfigForParsing","input","GLOBAL_ORG_ID","AssetMetadataSchema","object","optional","nullable","string","RelationTypeSchema","zodEnum","CitationSchema","array","number","AttributionSchema","AssetSchema","uuid","ProfileSchema","OrganizationsSchema","TeamSchema","record","any","AssetTypeSchema","VisibilitySchema","MonetizationSchema","PriceCurrencySchema","StatusSchema","SourceSchema","boolean","CreateAssetSchema","uuidv7","GLOBAL_TEAM_ID","UpdateAssetSchema","value"],"mappings":"uTAkCMA,IAAAA,CAAAA,CACJC,GAEIA,CAAM,CAAA,MAAA,GAAWC,mBAAiBD,EAAAA,CAAAA,CAAM,UAAe,GAAA,cAAA,CAClD,CAAE,GAAGA,CAAO,CAAA,UAAA,CAAY,QAA4B,CAAA,CAEtDA,CAIHE,CAAAA,CAAAA,CAAsBC,UAAO,CAAA,CACjC,OAAQC,YAASC,CAAAA,YAAAA,CAASC,UAAO,EAAC,CAAC,CAAA,CAEnC,mBAAqBF,CAAAA,YAAAA,CAASC,aAASC,UAAO,EAAC,CAAC,CAClD,CAAC,CAAA,CAEKC,CAAqBC,CAAAA,QAAAA,CAAQ,CACjC,gBACA,CAAA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Content":["import {\n object,\n string,\n uuid,\n number,\n array,\n enum as zodEnum,\n nullable,\n optional,\n boolean,\n record,\n type z,\n any\n} from \"zod\";\n\nimport {\n AssetTypeSchema,\n MonetizationSchema,\n PriceCurrencySchema,\n StatusSchema,\n SourceSchema,\n VisibilitySchema,\n} from \"./common\";\nimport { OrganizationsSchema } from \"./organizations\";\nimport { TeamSchema } from \"./teams\";\nimport { ProfileSchema } from \"./users\";\nimport { uuidv7 } from \"uuidv7\";\nimport { GLOBAL_ORG_ID, GLOBAL_TEAM_ID } from \"./constants\";\n\ntype AssetConfigInput = {\n org_id?: string | null;\n visibility?: z.infer<typeof VisibilitySchema> | null;\n};\n\nconst normalizeAssetConfigForParsing = <T extends AssetConfigInput>(\n input: T\n): T => {\n if (input.org_id === GLOBAL_ORG_ID && input.visibility === \"organization\") {\n return { ...input, visibility: \"public\" as T[\"visibility\"] };\n }\n return input;\n};\n\n/** Type-specific / incidental metadata only (not attribution). */\nconst AssetMetadataSchema = object({\n source: optional(nullable(string())),\n /** When present on a comment, the id of the comment the user directly replied to (for reply-to-reply; parent_id is the top-level comment). */\n reply_to_comment_id: optional(nullable(string())),\n})\n\nconst RelationTypeSchema = zodEnum([\n \"IsSupplementTo\",\n \"IsDerivedFrom\",\n \"References\",\n \"IsVariantFormOf\",\n \"IsIdenticalTo\",\n])\n\nconst CitationSchema = object({\n doi: optional(nullable(string())),\n title: optional(nullable(string())),\n authors: optional(nullable(array(string()))),\n year: optional(nullable(number())),\n venue: optional(nullable(string())),\n url: optional(nullable(string())),\n bibtex: optional(nullable(string())),\n source: optional(nullable(string())),\n})\n\n/** Provenance, related-work citation, and (later) this asset's minted DOI. */\nconst AttributionSchema = object({\n originality: optional(\n zodEnum([\"original\", \"derivative\", \"third-party\"])\n ).default(\"original\"),\n external_url: optional(nullable(string())),\n github_url: optional(nullable(string())),\n paper_url: optional(nullable(string())),\n doi_url: optional(nullable(string())),\n citation: optional(nullable(CitationSchema)),\n relation_type: optional(nullable(RelationTypeSchema)),\n /** This asset's DOI — reserved for minting; never the related paper's DOI. */\n doi: optional(nullable(string())),\n})\n\nconst AssetSchema = object({\n id: uuid(),\n user_id: uuid(),\n user: optional(ProfileSchema.partial()),\n org_id: uuid(),\n organization: optional(OrganizationsSchema.partial()),\n team_id: uuid(),\n team: optional(TeamSchema.partial()),\n parent_id: optional(nullable(uuid())),\n parent: optional(record(string(), any())),\n license_id: string(),\n license: optional(record(string(), any())),\n asset_type: AssetTypeSchema,\n name: string(),\n name_url_slug: optional(nullable(string())),\n slug: optional(nullable(string())),\n // Rich description: store both editor json and plain text\n description: optional(\n nullable(\n object({\n json: record(string(), any()),\n text: string(),\n })\n )\n ),\n visibility: VisibilitySchema,\n monetization: MonetizationSchema,\n price: optional(nullable(number())),\n unit_cost: optional(nullable(number())),\n cost_accounting: optional(nullable(zodEnum([\"fixed\", \"variable\"]))),\n cost_unit: optional(nullable(string())),\n price_currency: optional(PriceCurrencySchema),\n stripe_product_id: optional(nullable(string())),\n stripe_price_id: optional(nullable(string())),\n stripe_meter_id: optional(nullable(string())),\n metadata: optional(nullable(AssetMetadataSchema)),\n attribution: optional(nullable(AttributionSchema)),\n preview: optional(nullable(array(record(string(), any())))),\n state: StatusSchema,\n source: SourceSchema,\n is_pinned_in_team: optional(boolean().default(false)),\n created_at: string(),\n last_updated: string(),\n});\n\nconst CreateAssetSchema = AssetSchema.partial()\n .omit({\n user_id: true,\n user: true,\n organization: true,\n license: true,\n team: true,\n slug: true,\n is_pinned_in_team: true,\n })\n .extend({\n id: uuid().default(() => uuidv7()),\n team_id: nullable(uuid())\n .default(GLOBAL_TEAM_ID),\n org_id: nullable(uuid())\n .default(GLOBAL_ORG_ID),\n name: string()\n .min(1, { message: \"Name cannot be empty\" })\n .max(255, { message: \"Name must be less than 255 characters\" }),\n name_url_slug: optional(nullable(string())),\n state: StatusSchema.optional().default(\"success\"),\n source: SourceSchema.default(\"web\"),\n visibility: VisibilitySchema.optional().default(\"public\"),\n created_at: string().default(() => new Date().toISOString()),\n last_updated: string().default(() => new Date().toISOString()),\n });\n\nconst UpdateAssetSchema = AssetSchema.partial().omit({\n id: true,\n user_id: true,\n created_at: true,\n user: true,\n organization: true,\n team: true,\n slug: true,\n is_pinned_in_team: true,\n}).transform((value) => normalizeAssetConfigForParsing(value));\n\nexport {\n AssetMetadataSchema,\n AttributionSchema,\n CitationSchema,\n RelationTypeSchema,\n AssetSchema,\n CreateAssetSchema,\n UpdateAssetSchema,\n normalizeAssetConfigForParsing,\n};\nexport type AssetMetadata = z.infer<typeof AssetMetadataSchema>;\nexport type Attribution = z.infer<typeof AttributionSchema>;\nexport type Citation = z.infer<typeof CitationSchema>;\nexport type RelationType = z.infer<typeof RelationTypeSchema>;\nexport type Asset = z.infer<typeof AssetSchema>;\nexport type CreateAsset = z.infer<typeof CreateAssetSchema>;\nexport type UpdateAsset = z.infer<typeof UpdateAssetSchema>;\n"]}
@@ -1,2 +0,0 @@
1
- import {b,f,g,a as a$1}from'./chunk-TGOXRPF5.js';import {a}from'./chunk-WRHPQNEL.js';import {lazy,object,optional,string,array,record,any,literal,nullable,number}from'zod';var h=lazy(()=>object({type:string(),content:optional(array(h)),attrs:optional(record(string(),any())),marks:optional(array(object({type:string(),attrs:optional(record(string(),any()))}))),text:optional(string())})),c=object({type:literal("doc"),content:array(h)}),P=object({json:c,text:string()}).default({json:{type:"doc",content:[]},text:""}),z=object({}),T=z.extend(b.partial().shape),m=f.extend({name:nullable(string()),asset_type:a.refine(t=>["post","comment"].includes(t)),metadata:T,preview:c.default({type:"doc",content:[]}),content:P}),A=g.extend({asset_type:literal("post").default("post"),name:string().optional().nullable().default("").transform(t=>t==null?void 0:t.trim()).transform(t=>t||null),preview:c}).transform(t=>a$1(t)),C=m.extend({content:optional(nullable(P.default({json:{type:"doc",content:[]},text:""}))),reactions:array(record(string(),any())).default([]),views:number().default(0),commentCount:number().default(0)}),j=array(C),w=array(m),v=m.partial().omit({user_id:true,id:true,created_at:true,last_updated:true,content:true,organization:true,user:true,team:true,slug:true,is_pinned_in_team:true}).extend({last_updated:string().default(()=>new Date().toISOString())}).transform(t=>a$1(t));export{c as a,P as b,m as c,A as d,C as e,j as f,w as g,v as h};//# sourceMappingURL=chunk-7EKD5NQB.js.map
2
- //# sourceMappingURL=chunk-7EKD5NQB.js.map
@@ -1,2 +0,0 @@
1
- import {f,a}from'./chunk-TGOXRPF5.js';import {uuidv7}from'uuidv7';import {optional,literal,nullable,object,array,string,record,any}from'zod';var l=f.extend({asset_type:literal("comment").default("comment"),preview:optional(nullable(object({type:string().refine(t=>t==="doc"),content:array(record(string(),any()))}).default({type:"doc",content:[]})))}),C=l.partial().omit({id:true,user_id:true}).extend({asset_type:literal("comment").default("comment"),id:string().default(()=>uuidv7()),name:string().default(""),created_at:string().default(()=>new Date().toISOString()),last_updated:string().default(()=>new Date().toISOString())}).transform(t=>a(t));export{l as a,C as b};//# sourceMappingURL=chunk-ITF5WQQB.js.map
2
- //# sourceMappingURL=chunk-ITF5WQQB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/schema/comments.ts"],"names":["CommentSchema","AssetSchema","literal","optional","nullable","object","string","x","array","record","any","CreateCommentSchema","uuidv7","value","normalizeAssetConfigForParsing"],"mappings":"6IAeMA,IAAAA,CAAAA,CAAgBC,CAAY,CAAA,MAAA,CAAO,CACvC,UAAA,CAAYC,OAAQ,CAAA,SAAS,EAAE,OAAQ,CAAA,SAAS,CAChD,CAAA,OAAA,CAASC,QACPC,CAAAA,QAAAA,CACEC,MAAO,CAAA,CACL,IAAMC,CAAAA,MAAAA,EAAS,CAAA,MAAA,CAAQC,CAAMA,EAAAA,CAAAA,GAAM,KAAK,CAAA,CACxC,QAASC,KAAMC,CAAAA,MAAAA,CAAOH,MAAO,EAAA,CAAGI,GAAI,EAAC,CAAC,CACxC,CAAC,CAAA,CAAE,OAAQ,CAAA,CAAE,IAAM,CAAA,KAAA,CAAO,OAAS,CAAA,EAAG,CAAC,CACzC,CACF,CACF,CAAC,CAAA,CAEKC,CAAsBX,CAAAA,CAAAA,CAAc,OAAQ,EAAA,CAC/C,IAAK,CAAA,CACJ,EAAI,CAAA,IAAA,CACJ,OAAS,CAAA,IACX,CAAC,CACA,CAAA,MAAA,CAAO,CACN,UAAA,CAAYE,OAAQ,CAAA,SAAS,CAAE,CAAA,OAAA,CAAQ,SAAS,CAAA,CAChD,EAAII,CAAAA,MAAAA,EAAS,CAAA,OAAA,CAAQ,IAAMM,MAAAA,EAAQ,CACnC,CAAA,IAAA,CAAMN,MAAO,EAAA,CAAE,OAAQ,CAAA,EAAE,CACzB,CAAA,UAAA,CAAYA,MAAO,EAAA,CAAE,OAAQ,CAAA,IAAM,IAAI,IAAA,EAAO,CAAA,WAAA,EAAa,CAC3D,CAAA,YAAA,CAAcA,MAAO,EAAA,CAAE,OAAQ,CAAA,IAAM,IAAI,IAAA,GAAO,WAAY,EAAC,CAC/D,CAAC,CACA,CAAA,SAAA,CAAWO,CAAUC,EAAAA,CAAAA,CAA+BD,CAAK,CAAC","file":"chunk-ITF5WQQB.js","sourcesContent":["import { uuidv7 } from \"uuidv7\";\nimport {\n object,\n string,\n array,\n type z,\n record,\n any,\n literal,\n optional,\n nullable\n} from \"zod\";\n\nimport { AssetSchema, normalizeAssetConfigForParsing } from \"./assets\";\n\nconst CommentSchema = AssetSchema.extend({\n asset_type: literal(\"comment\").default(\"comment\"),\n preview: optional(\n nullable(\n object({\n type: string().refine((x) => x === \"doc\"),\n content: array(record(string(), any())),\n }).default({ type: \"doc\", content: [] })\n )\n ),\n});\n\nconst CreateCommentSchema = CommentSchema.partial()\n .omit({\n id: true,\n user_id: true,\n })\n .extend({\n asset_type: literal(\"comment\").default(\"comment\"),\n id: string().default(() => uuidv7()),\n name: string().default(\"\"),\n created_at: string().default(() => new Date().toISOString()),\n last_updated: string().default(() => new Date().toISOString()),\n })\n .transform((value) => normalizeAssetConfigForParsing(value));\n\nexport { CommentSchema, CreateCommentSchema };\nexport type Comment = z.infer<typeof CommentSchema>;\nexport type CreateComment = z.infer<typeof CreateCommentSchema>;\n"]}
@@ -1,2 +0,0 @@
1
- import {b as b$1,f,g as g$1,a as a$1}from'./chunk-TGOXRPF5.js';import {a}from'./chunk-WRHPQNEL.js';import {object,enum as _enum,uuid,string,number,record,optional,array,literal,nullable,discriminatedUnion,any}from'zod';var y=object({type:string(),size:number(),path:string(),extension:string(),name:string(),id:uuid(),bucket:_enum(["public-files","files"])}),_=_enum(["asset","action"]),x=record(string(),object({kind:_,asset_type:optional(a)})),z=record(string(),object({values:array(string())})),F=object({table_name:string(),schema:literal("datasets").default("datasets"),columns:array(string()),refs:optional(nullable(x)),enum_columns:optional(nullable(z))}),w=object({column_name:string(),data_type:string(),fk_constraint_name:optional(nullable(string())),foreign_table_schema:optional(nullable(string())),foreign_table_name:optional(nullable(string())),foreign_column_name:optional(nullable(string())),semantic_type:optional(nullable(_enum(["reference","enum"]))),ref_kind:optional(nullable(_)),asset_type:optional(nullable(a)),enum_values:optional(nullable(array(string())))}),v=object({kind:literal("asset"),id:uuid(),asset_type:a,name:nullable(string()),web_url:nullable(string())}),C=object({kind:literal("action"),id:uuid(),status:nullable(string()),route_id:nullable(uuid()),route_name:nullable(string()),name:nullable(string()),web_url:nullable(string()),created_at:nullable(string())}),b=discriminatedUnion("kind",[v,C]),M=record(string(),record(string(),b)),u=F.extend(b$1.partial().shape),g=f.extend({asset_type:literal("dataset").default("dataset"),metadata:u.extend({...y.partial().shape}),preview:array(record(string(),any()))}),K=g$1.extend({asset_type:literal("dataset").default("dataset"),metadata:u.extend({...y.shape}),preview:array(record(string(),any()))}).transform(m=>a$1(m)),U=g$1.extend({asset_type:literal("dataset").default("dataset"),metadata:u,preview:array(record(string(),any()))}).transform(m=>a$1(m)),j=g.partial().omit({user_id:true,id:true,created_at:true,last_updated:true,organization:true,user:true,team:true,slug:true,is_pinned_in_team:true}).extend({asset_type:literal("dataset").default("dataset"),last_updated:string().default(()=>new Date().toISOString())}).transform(m=>a$1(m));export{_ as a,x as b,z as c,w as d,b as e,M as f,g,K as h,U as i,j};//# sourceMappingURL=chunk-QBL6KIST.js.map
2
- //# sourceMappingURL=chunk-QBL6KIST.js.map
@@ -1,2 +0,0 @@
1
- 'use strict';var chunk5EQ5LO7V_cjs=require('./chunk-5EQ5LO7V.cjs'),uuidv7=require('uuidv7'),zod=require('zod');var l=chunk5EQ5LO7V_cjs.f.extend({asset_type:zod.literal("comment").default("comment"),preview:zod.optional(zod.nullable(zod.object({type:zod.string().refine(t=>t==="doc"),content:zod.array(zod.record(zod.string(),zod.any()))}).default({type:"doc",content:[]})))}),C=l.partial().omit({id:true,user_id:true}).extend({asset_type:zod.literal("comment").default("comment"),id:zod.string().default(()=>uuidv7.uuidv7()),name:zod.string().default(""),created_at:zod.string().default(()=>new Date().toISOString()),last_updated:zod.string().default(()=>new Date().toISOString())}).transform(t=>chunk5EQ5LO7V_cjs.a(t));exports.a=l;exports.b=C;//# sourceMappingURL=chunk-SY5IKIT6.cjs.map
2
- //# sourceMappingURL=chunk-SY5IKIT6.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/schema/comments.ts"],"names":["CommentSchema","AssetSchema","literal","optional","nullable","object","string","x","array","record","any","CreateCommentSchema","uuidv7","value","normalizeAssetConfigForParsing"],"mappings":"+GAeMA,IAAAA,CAAAA,CAAgBC,mBAAY,CAAA,MAAA,CAAO,CACvC,UAAA,CAAYC,WAAQ,CAAA,SAAS,EAAE,OAAQ,CAAA,SAAS,CAChD,CAAA,OAAA,CAASC,YACPC,CAAAA,YAAAA,CACEC,UAAO,CAAA,CACL,IAAMC,CAAAA,UAAAA,EAAS,CAAA,MAAA,CAAQC,CAAMA,EAAAA,CAAAA,GAAM,KAAK,CAAA,CACxC,QAASC,SAAMC,CAAAA,UAAAA,CAAOH,UAAO,EAAA,CAAGI,OAAI,EAAC,CAAC,CACxC,CAAC,CAAA,CAAE,OAAQ,CAAA,CAAE,IAAM,CAAA,KAAA,CAAO,OAAS,CAAA,EAAG,CAAC,CACzC,CACF,CACF,CAAC,CAAA,CAEKC,CAAsBX,CAAAA,CAAAA,CAAc,OAAQ,EAAA,CAC/C,IAAK,CAAA,CACJ,EAAI,CAAA,IAAA,CACJ,OAAS,CAAA,IACX,CAAC,CACA,CAAA,MAAA,CAAO,CACN,UAAA,CAAYE,WAAQ,CAAA,SAAS,CAAE,CAAA,OAAA,CAAQ,SAAS,CAAA,CAChD,EAAII,CAAAA,UAAAA,EAAS,CAAA,OAAA,CAAQ,IAAMM,aAAAA,EAAQ,CACnC,CAAA,IAAA,CAAMN,UAAO,EAAA,CAAE,OAAQ,CAAA,EAAE,CACzB,CAAA,UAAA,CAAYA,UAAO,EAAA,CAAE,OAAQ,CAAA,IAAM,IAAI,IAAA,EAAO,CAAA,WAAA,EAAa,CAC3D,CAAA,YAAA,CAAcA,UAAO,EAAA,CAAE,OAAQ,CAAA,IAAM,IAAI,IAAA,GAAO,WAAY,EAAC,CAC/D,CAAC,CACA,CAAA,SAAA,CAAWO,CAAUC,EAAAA,mBAAAA,CAA+BD,CAAK,CAAC","file":"chunk-SY5IKIT6.cjs","sourcesContent":["import { uuidv7 } from \"uuidv7\";\nimport {\n object,\n string,\n array,\n type z,\n record,\n any,\n literal,\n optional,\n nullable\n} from \"zod\";\n\nimport { AssetSchema, normalizeAssetConfigForParsing } from \"./assets\";\n\nconst CommentSchema = AssetSchema.extend({\n asset_type: literal(\"comment\").default(\"comment\"),\n preview: optional(\n nullable(\n object({\n type: string().refine((x) => x === \"doc\"),\n content: array(record(string(), any())),\n }).default({ type: \"doc\", content: [] })\n )\n ),\n});\n\nconst CreateCommentSchema = CommentSchema.partial()\n .omit({\n id: true,\n user_id: true,\n })\n .extend({\n asset_type: literal(\"comment\").default(\"comment\"),\n id: string().default(() => uuidv7()),\n name: string().default(\"\"),\n created_at: string().default(() => new Date().toISOString()),\n last_updated: string().default(() => new Date().toISOString()),\n })\n .transform((value) => normalizeAssetConfigForParsing(value));\n\nexport { CommentSchema, CreateCommentSchema };\nexport type Comment = z.infer<typeof CommentSchema>;\nexport type CreateComment = z.infer<typeof CreateCommentSchema>;\n"]}
@@ -1,2 +0,0 @@
1
- import {a as a$1}from'./chunk-CF56NFUG.js';import {c}from'./chunk-WLGOABHV.js';import {b as b$1}from'./chunk-3N56ERWF.js';import {k,j,d,b,a,e}from'./chunk-WRHPQNEL.js';import {b as b$2,c as c$1}from'./chunk-DUBPWSCA.js';import {object,optional,nullable,string,enum as _enum,number,array,uuid,boolean,record,any}from'zod';import {uuidv7}from'uuidv7';var T=r=>r.org_id===b$2&&r.visibility==="organization"?{...r,visibility:"public"}:r,I=object({source:optional(nullable(string())),reply_to_comment_id:optional(nullable(string()))}),C=_enum(["IsSupplementTo","IsDerivedFrom","References","IsVariantFormOf","IsIdenticalTo"]),O=object({doi:optional(nullable(string())),title:optional(nullable(string())),authors:optional(nullable(array(string()))),year:optional(nullable(number())),venue:optional(nullable(string())),url:optional(nullable(string())),bibtex:optional(nullable(string())),source:optional(nullable(string()))}),D=object({originality:optional(_enum(["original","derivative","third-party"])).default("original"),external_url:optional(nullable(string())),github_url:optional(nullable(string())),paper_url:optional(nullable(string())),doi_url:optional(nullable(string())),citation:optional(nullable(O)),relation_type:optional(nullable(C)),doi:optional(nullable(string()))}),z=object({id:uuid(),user_id:uuid(),user:optional(b$1.partial()),org_id:uuid(),organization:optional(c.partial()),team_id:uuid(),team:optional(a$1.partial()),parent_id:optional(nullable(uuid())),parent:optional(record(string(),any())),license_id:string(),license:optional(record(string(),any())),asset_type:a,name:string(),name_url_slug:optional(nullable(string())),slug:optional(nullable(string())),description:optional(nullable(object({json:record(string(),any()),text:string()}))),visibility:b,monetization:d,price:optional(nullable(number())),unit_cost:optional(nullable(number())),cost_accounting:optional(nullable(_enum(["fixed","variable"]))),cost_unit:optional(nullable(string())),price_currency:optional(e),stripe_product_id:optional(nullable(string())),stripe_price_id:optional(nullable(string())),stripe_meter_id:optional(nullable(string())),metadata:optional(nullable(I)),attribution:optional(nullable(D)),preview:optional(nullable(array(record(string(),any())))),state:j,source:k,is_pinned_in_team:optional(boolean().default(false)),created_at:string(),last_updated:string()}),U=z.partial().omit({user_id:true,user:true,organization:true,license:true,team:true,slug:true,is_pinned_in_team:true}).extend({id:uuid().default(()=>uuidv7()),team_id:nullable(uuid()).default(c$1),org_id:nullable(uuid()).default(b$2),name:string().min(1,{message:"Name cannot be empty"}).max(255,{message:"Name must be less than 255 characters"}),name_url_slug:optional(nullable(string())),state:j.optional().default("success"),source:k.default("web"),visibility:b.optional().default("public"),created_at:string().default(()=>new Date().toISOString()),last_updated:string().default(()=>new Date().toISOString())}),V=z.partial().omit({id:true,user_id:true,created_at:true,user:true,organization:true,team:true,slug:true,is_pinned_in_team:true}).transform(r=>T(r));export{T as a,I as b,C as c,O as d,D as e,z as f,U as g,V as h};//# sourceMappingURL=chunk-TGOXRPF5.js.map
2
- //# sourceMappingURL=chunk-TGOXRPF5.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/schema/assets.ts"],"names":["normalizeAssetConfigForParsing","input","GLOBAL_ORG_ID","AssetMetadataSchema","object","optional","nullable","string","RelationTypeSchema","zodEnum","CitationSchema","array","number","AttributionSchema","AssetSchema","uuid","ProfileSchema","OrganizationsSchema","TeamSchema","record","any","AssetTypeSchema","VisibilitySchema","MonetizationSchema","PriceCurrencySchema","StatusSchema","SourceSchema","boolean","CreateAssetSchema","uuidv7","GLOBAL_TEAM_ID","UpdateAssetSchema","value"],"mappings":"6VAkCMA,IAAAA,CAAAA,CACJC,GAEIA,CAAM,CAAA,MAAA,GAAWC,GAAiBD,EAAAA,CAAAA,CAAM,UAAe,GAAA,cAAA,CAClD,CAAE,GAAGA,CAAO,CAAA,UAAA,CAAY,QAA4B,CAAA,CAEtDA,CAIHE,CAAAA,CAAAA,CAAsBC,MAAO,CAAA,CACjC,OAAQC,QAASC,CAAAA,QAAAA,CAASC,MAAO,EAAC,CAAC,CAAA,CAEnC,mBAAqBF,CAAAA,QAAAA,CA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CAAWkB,CAAUhC,EAAAA,CAAAA,CAA+BgC,CAAK,CAAC","file":"chunk-TGOXRPF5.js","sourcesContent":["import {\n object,\n string,\n uuid,\n number,\n array,\n enum as zodEnum,\n nullable,\n optional,\n boolean,\n record,\n type z,\n any\n} from \"zod\";\n\nimport {\n AssetTypeSchema,\n MonetizationSchema,\n PriceCurrencySchema,\n StatusSchema,\n SourceSchema,\n VisibilitySchema,\n} from \"./common\";\nimport { OrganizationsSchema } from \"./organizations\";\nimport { TeamSchema } from \"./teams\";\nimport { ProfileSchema } from \"./users\";\nimport { uuidv7 } from \"uuidv7\";\nimport { GLOBAL_ORG_ID, GLOBAL_TEAM_ID } from \"./constants\";\n\ntype AssetConfigInput = {\n org_id?: string | null;\n visibility?: z.infer<typeof VisibilitySchema> | null;\n};\n\nconst normalizeAssetConfigForParsing = <T extends AssetConfigInput>(\n input: T\n): T => {\n if (input.org_id === GLOBAL_ORG_ID && input.visibility === \"organization\") {\n return { ...input, visibility: \"public\" as T[\"visibility\"] };\n }\n return input;\n};\n\n/** Type-specific / incidental metadata only (not attribution). */\nconst AssetMetadataSchema = object({\n source: optional(nullable(string())),\n /** When present on a comment, the id of the comment the user directly replied to (for reply-to-reply; parent_id is the top-level comment). */\n reply_to_comment_id: optional(nullable(string())),\n})\n\nconst RelationTypeSchema = zodEnum([\n \"IsSupplementTo\",\n \"IsDerivedFrom\",\n \"References\",\n \"IsVariantFormOf\",\n \"IsIdenticalTo\",\n])\n\nconst CitationSchema = object({\n doi: optional(nullable(string())),\n title: optional(nullable(string())),\n authors: optional(nullable(array(string()))),\n year: optional(nullable(number())),\n venue: optional(nullable(string())),\n url: optional(nullable(string())),\n bibtex: optional(nullable(string())),\n source: optional(nullable(string())),\n})\n\n/** Provenance, related-work citation, and (later) this asset's minted DOI. */\nconst AttributionSchema = object({\n originality: optional(\n zodEnum([\"original\", \"derivative\", \"third-party\"])\n ).default(\"original\"),\n external_url: optional(nullable(string())),\n github_url: optional(nullable(string())),\n paper_url: optional(nullable(string())),\n doi_url: optional(nullable(string())),\n citation: optional(nullable(CitationSchema)),\n relation_type: optional(nullable(RelationTypeSchema)),\n /** This asset's DOI — reserved for minting; never the related paper's DOI. */\n doi: optional(nullable(string())),\n})\n\nconst AssetSchema = object({\n id: uuid(),\n user_id: uuid(),\n user: optional(ProfileSchema.partial()),\n org_id: uuid(),\n organization: optional(OrganizationsSchema.partial()),\n team_id: uuid(),\n team: optional(TeamSchema.partial()),\n parent_id: optional(nullable(uuid())),\n parent: optional(record(string(), any())),\n license_id: string(),\n license: optional(record(string(), any())),\n asset_type: AssetTypeSchema,\n name: string(),\n name_url_slug: optional(nullable(string())),\n slug: optional(nullable(string())),\n // Rich description: store both editor json and plain text\n description: optional(\n nullable(\n object({\n json: record(string(), any()),\n text: string(),\n })\n )\n ),\n visibility: VisibilitySchema,\n monetization: MonetizationSchema,\n price: optional(nullable(number())),\n unit_cost: optional(nullable(number())),\n cost_accounting: optional(nullable(zodEnum([\"fixed\", \"variable\"]))),\n cost_unit: optional(nullable(string())),\n price_currency: optional(PriceCurrencySchema),\n stripe_product_id: optional(nullable(string())),\n stripe_price_id: optional(nullable(string())),\n stripe_meter_id: optional(nullable(string())),\n metadata: optional(nullable(AssetMetadataSchema)),\n attribution: optional(nullable(AttributionSchema)),\n preview: optional(nullable(array(record(string(), any())))),\n state: StatusSchema,\n source: SourceSchema,\n is_pinned_in_team: optional(boolean().default(false)),\n created_at: string(),\n last_updated: string(),\n});\n\nconst CreateAssetSchema = AssetSchema.partial()\n .omit({\n user_id: true,\n user: true,\n organization: true,\n license: true,\n team: true,\n slug: true,\n is_pinned_in_team: true,\n })\n .extend({\n id: uuid().default(() => uuidv7()),\n team_id: nullable(uuid())\n .default(GLOBAL_TEAM_ID),\n org_id: nullable(uuid())\n .default(GLOBAL_ORG_ID),\n name: string()\n .min(1, { message: \"Name cannot be empty\" })\n .max(255, { message: \"Name must be less than 255 characters\" }),\n name_url_slug: optional(nullable(string())),\n state: StatusSchema.optional().default(\"success\"),\n source: SourceSchema.default(\"web\"),\n visibility: VisibilitySchema.optional().default(\"public\"),\n created_at: string().default(() => new Date().toISOString()),\n last_updated: string().default(() => new Date().toISOString()),\n });\n\nconst UpdateAssetSchema = AssetSchema.partial().omit({\n id: true,\n user_id: true,\n created_at: true,\n user: true,\n organization: true,\n team: true,\n slug: true,\n is_pinned_in_team: true,\n}).transform((value) => normalizeAssetConfigForParsing(value));\n\nexport {\n AssetMetadataSchema,\n AttributionSchema,\n CitationSchema,\n RelationTypeSchema,\n AssetSchema,\n CreateAssetSchema,\n UpdateAssetSchema,\n normalizeAssetConfigForParsing,\n};\nexport type AssetMetadata = z.infer<typeof AssetMetadataSchema>;\nexport type Attribution = z.infer<typeof AttributionSchema>;\nexport type Citation = z.infer<typeof CitationSchema>;\nexport type RelationType = z.infer<typeof RelationTypeSchema>;\nexport type Asset = z.infer<typeof AssetSchema>;\nexport type CreateAsset = z.infer<typeof CreateAssetSchema>;\nexport type UpdateAsset = z.infer<typeof UpdateAssetSchema>;\n"]}
@@ -1,2 +0,0 @@
1
- import {a as a$2}from'./chunk-OU4JKY4M.js';import {b as b$1,f,g as g$1,a as a$1}from'./chunk-TGOXRPF5.js';import {a,j as j$1}from'./chunk-WRHPQNEL.js';import {enum as _enum,object,optional,string,nullable,array,boolean,any,record,number,uuid}from'zod';var v=_enum(["Personal Access Token","Ouro","None","OAuth 2.0"]),T=object({authentication:v,base_url:string(),version:optional(nullable(string())),spec_path:optional(nullable(string())),spec_url:optional(nullable(string())),auth_url:optional(nullable(string()))}),R=T.extend(b$1.partial().shape),D=f.extend({asset_type:a.refine(n=>n==="service"),metadata:R}),w=g$1.extend({asset_type:a.refine(n=>n==="service"),metadata:R}).transform(n=>a$1(n)),L=D.partial().omit({user_id:true,id:true,created_at:true,last_updated:true,organization:true,user:true,team:true,slug:true,is_pinned_in_team:true}).extend({last_updated:string().default(()=>new Date().toISOString())}).transform(n=>a$1(n)),A=_enum(["sync","async"]),d=_enum(["file","dataset","post"]),z=_enum(a$2),E=object({asset_type:d,primary:optional(boolean()),input_filter:optional(nullable(z)),file_extensions:optional(nullable(array(string()))),contains_file_extensions:optional(nullable(array(string())))}).catchall(any()),I=object({asset_type:d,primary:optional(boolean()),file_extensions:optional(nullable(array(string()))),contains_file_extensions:optional(nullable(array(string())))}).catchall(any()),O=record(string(),E),b=record(string(),I),M=object({id:string(),user_id:string(),service_id:string(),path:string(),method:_enum(["GET","POST","PUT","PATCH","DELETE"]),summary:optional(nullable(string())),parameters:optional(nullable(array(record(string(),any())))),request_body:optional(nullable(record(string(),any()))),responses:optional(nullable(array(record(string(),any())))),input_assets:optional(nullable(O)),input_type:optional(nullable(d)),input_filter:optional(nullable(z)),input_file_extension:optional(nullable(string())),input_file_extensions:optional(nullable(array(string()))),output_assets:optional(nullable(b)),output_type:optional(nullable(d)),output_file_extension:optional(nullable(string())),security:optional(nullable(record(string(),any()))),rate_limit:optional(nullable(number())),execution_mode:optional(A).default("sync"),observed_execution_mode:optional(nullable(A)),last_updated:string()}),g=object({avg_ack_ms:optional(nullable(number())),p95_ack_ms:optional(nullable(number())),avg_completion_ms:optional(nullable(number())),p95_completion_ms:optional(nullable(number())),latency_sample_count:optional(nullable(number()))}),U=f.extend({asset_type:a.refine(n=>n==="route"),route:M,metrics:optional(nullable(g))}),j=object({id:uuid(),user_id:uuid(),route_id:uuid(),metadata:optional(nullable(record(string(),any()))),response:optional(nullable(record(string(),any()))),side_effects:boolean().default(true),input_asset_id:optional(nullable(uuid())),output_asset_id:optional(nullable(uuid())),input_asset:optional(nullable(f)),input_assets:optional(nullable(array(record(string(),any())))),output_asset:optional(nullable(f)),output_assets:optional(nullable(array(record(string(),any())))),webhook_url:optional(nullable(string())),webhook_token:optional(nullable(string())),status:j$1,created_at:string(),last_updated:string(),started_at:optional(nullable(string())),ack_at:optional(nullable(string())),upstream_status_code:optional(nullable(number())),finished_at:optional(nullable(string()))});export{D as a,w as b,L as c,A as d,E as e,I as f,O as g,b as h,g as i,U as j,j as k};//# sourceMappingURL=chunk-ZC2VDKSH.js.map
2
- //# sourceMappingURL=chunk-ZC2VDKSH.js.map