@ourofoundation/ouro-js 1.1.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/index.cjs +801 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +8045 -0
  4. package/dist/index.d.ts +8045 -18
  5. package/dist/index.js +740 -1
  6. package/dist/index.js.map +1 -1
  7. package/package.json +19 -36
  8. package/tsup.config.ts +12 -0
  9. package/dist/index.esm.js +0 -2
  10. package/dist/index.esm.js.map +0 -1
  11. package/dist/schema/assets.d.ts +0 -611
  12. package/dist/schema/assets.esm.js +0 -2
  13. package/dist/schema/assets.esm.js.map +0 -1
  14. package/dist/schema/assets.js +0 -2
  15. package/dist/schema/assets.js.map +0 -1
  16. package/dist/schema/blueprints.d.ts +0 -553
  17. package/dist/schema/blueprints.esm.js +0 -2
  18. package/dist/schema/blueprints.esm.js.map +0 -1
  19. package/dist/schema/blueprints.js +0 -2
  20. package/dist/schema/blueprints.js.map +0 -1
  21. package/dist/schema/comments.d.ts +0 -537
  22. package/dist/schema/comments.esm.js +0 -2
  23. package/dist/schema/comments.esm.js.map +0 -1
  24. package/dist/schema/comments.js +0 -2
  25. package/dist/schema/comments.js.map +0 -1
  26. package/dist/schema/common.d.ts +0 -138
  27. package/dist/schema/common.esm.js +0 -2
  28. package/dist/schema/common.esm.js.map +0 -1
  29. package/dist/schema/common.js +0 -2
  30. package/dist/schema/common.js.map +0 -1
  31. package/dist/schema/conversations.d.ts +0 -709
  32. package/dist/schema/conversations.esm.js +0 -2
  33. package/dist/schema/conversations.esm.js.map +0 -1
  34. package/dist/schema/conversations.js +0 -2
  35. package/dist/schema/conversations.js.map +0 -1
  36. package/dist/schema/datasets.d.ts +0 -1056
  37. package/dist/schema/datasets.esm.js +0 -2
  38. package/dist/schema/datasets.esm.js.map +0 -1
  39. package/dist/schema/datasets.js +0 -2
  40. package/dist/schema/datasets.js.map +0 -1
  41. package/dist/schema/files.d.ts +0 -1024
  42. package/dist/schema/files.esm.js +0 -2
  43. package/dist/schema/files.esm.js.map +0 -1
  44. package/dist/schema/files.js +0 -2
  45. package/dist/schema/files.js.map +0 -1
  46. package/dist/schema/index.d.ts +0 -14
  47. package/dist/schema/index.js +0 -63
  48. package/dist/schema/notifications.d.ts +0 -97
  49. package/dist/schema/notifications.esm.js +0 -2
  50. package/dist/schema/notifications.esm.js.map +0 -1
  51. package/dist/schema/notifications.js +0 -2
  52. package/dist/schema/notifications.js.map +0 -1
  53. package/dist/schema/organizations.d.ts +0 -70
  54. package/dist/schema/organizations.esm.js +0 -2
  55. package/dist/schema/organizations.esm.js.map +0 -1
  56. package/dist/schema/organizations.js +0 -2
  57. package/dist/schema/organizations.js.map +0 -1
  58. package/dist/schema/posts.d.ts +0 -1848
  59. package/dist/schema/posts.esm.js +0 -2
  60. package/dist/schema/posts.esm.js.map +0 -1
  61. package/dist/schema/posts.js +0 -2
  62. package/dist/schema/posts.js.map +0 -1
  63. package/dist/schema/replications.d.ts +0 -610
  64. package/dist/schema/replications.esm.js +0 -2
  65. package/dist/schema/replications.esm.js.map +0 -1
  66. package/dist/schema/replications.js +0 -2
  67. package/dist/schema/replications.js.map +0 -1
  68. package/dist/schema/services.d.ts +0 -86
  69. package/dist/schema/services.esm.js +0 -2
  70. package/dist/schema/services.esm.js.map +0 -1
  71. package/dist/schema/services.js +0 -2
  72. package/dist/schema/services.js.map +0 -1
  73. package/dist/schema/teams.d.ts +0 -528
  74. package/dist/schema/teams.esm.js +0 -2
  75. package/dist/schema/teams.esm.js.map +0 -1
  76. package/dist/schema/teams.js +0 -2
  77. package/dist/schema/teams.js.map +0 -1
  78. package/dist/schema/users.d.ts +0 -132
  79. package/dist/schema/users.esm.js +0 -2
  80. package/dist/schema/users.esm.js.map +0 -1
  81. package/dist/schema/users.js +0 -2
  82. package/dist/schema/users.js.map +0 -1
  83. package/dist/types/index.d.ts +0 -14
  84. package/dist/utils/air/index.d.ts +0 -24
  85. package/dist/utils/air/index.esm.js +0 -2
  86. package/dist/utils/air/index.esm.js.map +0 -1
  87. package/dist/utils/air/index.js +0 -2
  88. package/dist/utils/air/index.js.map +0 -1
  89. package/dist/utils/air/markdown-parser.d.ts +0 -1
  90. package/dist/utils/air/markdown-parser.esm.js +0 -2
  91. package/dist/utils/air/markdown-parser.esm.js.map +0 -1
  92. package/dist/utils/air/markdown-parser.js +0 -2
  93. package/dist/utils/air/markdown-parser.js.map +0 -1
  94. package/dist/utils/dataset.d.ts +0 -7
  95. package/dist/utils/dataset.esm.js +0 -2
  96. package/dist/utils/dataset.esm.js.map +0 -1
  97. package/dist/utils/dataset.js +0 -2
  98. package/dist/utils/dataset.js.map +0 -1
  99. package/dist/utils/navigate.d.ts +0 -11
  100. package/dist/utils/navigate.esm.js +0 -2
  101. package/dist/utils/navigate.esm.js.map +0 -1
  102. package/dist/utils/navigate.js +0 -2
  103. package/dist/utils/navigate.js.map +0 -1
  104. package/rollup.config.js +0 -52
@@ -1 +0,0 @@
1
- {"version":3,"file":"assets.js","sources":["../../src/schema/assets.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport {\n AssetTypeSchema,\n MonetizationSchema,\n StatusSchema,\n VisibilitySchema,\n} from \"./common\";\nimport { OrganizationsSchema } from \"./organizations\";\nimport { TeamSchema } from \"./teams\";\n\nimport { ProfileSchema } from \"./users\";\nimport { uuidv7 } from \"uuidv7\";\n\nconst AssetSchema = z.object({\n id: z.string().uuid(),\n user_id: z.string().uuid(),\n user: ProfileSchema.partial().optional(),\n org_id: z.string().uuid(),\n organization: OrganizationsSchema.partial().optional(),\n team_id: z.string().uuid(),\n team: TeamSchema.partial().optional(),\n parent_id: z.string().uuid().optional().nullable(),\n // parent: z.lazy(() => AssetSchema.partial()).optional(),\n parent: z.object({}).passthrough().optional(),\n asset_type: AssetTypeSchema,\n name: z.string(),\n name_url_slug: z.string().optional().nullable(),\n slug: z.string().optional().nullable(),\n description: z.string().nullable().optional(),\n visibility: VisibilitySchema,\n // Product information\n monetization: MonetizationSchema,\n price: z.number().nullable().optional(),\n unit_cost: z.number().nullable().optional(),\n cost_accounting: z.enum([\"fixed\", \"variable\"]).optional().nullable(),\n cost_unit: z.string().optional().nullable(),\n product_id: z.string().optional().nullable(),\n price_id: z.string().optional().nullable(),\n // Metadata information\n metadata: z.object({}).passthrough().optional().nullable(),\n preview: z.array(z.object({}).passthrough()).optional().nullable(),\n state: StatusSchema.optional().nullable(),\n created_at: z.string(),\n last_updated: z.string(),\n});\n\nconst CreateAssetSchema = AssetSchema.partial()\n .omit({\n user_id: true,\n // Remove extended foreign fields\n user: true,\n organization: true,\n team: true,\n // remove added slug\n slug: true,\n })\n .extend({\n id: z\n .string()\n .uuid()\n .default(() => uuidv7()),\n team_id: z\n .string()\n .uuid()\n .nullish()\n .default(\"00000000-0000-0000-0000-000000000000\"),\n org_id: z\n .string()\n .uuid()\n .nullish()\n .default(\"00000000-0000-0000-0000-000000000000\"),\n name: z\n .string()\n .min(1, {\n message: \"Name cannot be empty\",\n })\n .max(255, {\n message: \"Name must be less than 255 characters\",\n }), // name is required for all assets but posts and conversations\n name_url_slug: z.string().optional().nullable(),\n state: StatusSchema.optional().default(\"success\"),\n visibility: VisibilitySchema.optional().default(\"public\"),\n created_at: z.string().default(() => new Date().toISOString()),\n last_updated: z.string().default(() => new Date().toISOString()),\n });\n\nconst UpdateAssetSchema = AssetSchema.partial().omit({\n id: true,\n user_id: true,\n created_at: true,\n // Remove extended foreign fields\n user: true,\n organization: true,\n team: true,\n // remove added slug\n slug: true,\n});\n\nexport { AssetSchema, CreateAssetSchema, UpdateAssetSchema };\nexport type Asset = z.infer<typeof AssetSchema>;\nexport type CreateAsset = z.infer<typeof CreateAssetSchema>;\nexport type UpdateAsset = z.infer<typeof UpdateAssetSchema>;\n"],"names":["AssetSchema","z","object","id","string","uuid","user_id","user","ProfileSchema","partial","optional","org_id","organization","OrganizationsSchema","team_id","team","TeamSchema","parent_id","nullable","parent","passthrough","asset_type","AssetTypeSchema","name","name_url_slug","slug","description","visibility","VisibilitySchema","monetization","MonetizationSchema","price","number","unit_cost","cost_accounting","enum","cost_unit","product_id","price_id","metadata","preview","array","state","StatusSchema","created_at","last_updated","CreateAssetSchema","omit","extend","default","uuidv7","nullish","min","message","max","Date","toISOString","UpdateAssetSchema"],"mappings":"+JAcA,MAAMA,EAAcC,EAACA,EAACC,OAAO,CAC3BC,GAAIF,EAACA,EAACG,SAASC,OACfC,QAASL,EAACA,EAACG,SAASC,OACpBE,KAAMC,EAAaA,cAACC,UAAUC,WAC9BC,OAAQV,EAACA,EAACG,SAASC,OACnBO,aAAcC,EAAmBA,oBAACJ,UAAUC,WAC5CI,QAASb,EAACA,EAACG,SAASC,OACpBU,KAAMC,EAAUA,WAACP,UAAUC,WAC3BO,UAAWhB,EAACA,EAACG,SAASC,OAAOK,WAAWQ,WAExCC,OAAQlB,EAACA,EAACC,OAAO,CAAE,GAAEkB,cAAcV,WACnCW,WAAYC,EAAeA,gBAC3BC,KAAMtB,EAACA,EAACG,SACRoB,cAAevB,EAAAA,EAAEG,SAASM,WAAWQ,WACrCO,KAAMxB,EAAAA,EAAEG,SAASM,WAAWQ,WAC5BQ,YAAazB,EAAAA,EAAEG,SAASc,WAAWR,WACnCiB,WAAYC,EAAgBA,iBAE5BC,aAAcC,EAAkBA,mBAChCC,MAAO9B,EAAAA,EAAE+B,SAASd,WAAWR,WAC7BuB,UAAWhC,EAAAA,EAAE+B,SAASd,WAAWR,WACjCwB,gBAAiBjC,EAAAA,EAAEkC,KAAK,CAAC,QAAS,aAAazB,WAAWQ,WAC1DkB,UAAWnC,EAAAA,EAAEG,SAASM,WAAWQ,WACjCmB,WAAYpC,EAAAA,EAAEG,SAASM,WAAWQ,WAClCoB,SAAUrC,EAAAA,EAAEG,SAASM,WAAWQ,WAEhCqB,SAAUtC,EAAAA,EAAEC,OAAO,CAAE,GAAEkB,cAAcV,WAAWQ,WAChDsB,QAASvC,EAACA,EAACwC,MAAMxC,EAAAA,EAAEC,OAAO,IAAIkB,eAAeV,WAAWQ,WACxDwB,MAAOC,EAAYA,aAACjC,WAAWQ,WAC/B0B,WAAY3C,EAACA,EAACG,SACdyC,aAAc5C,EAACA,EAACG,WAGZ0C,EAAoB9C,EAAYS,UACnCsC,KAAK,CACJzC,SAAS,EAETC,MAAM,EACNK,cAAc,EACdG,MAAM,EAENU,MAAM,IAEPuB,OAAO,CACN7C,GAAIF,EAAAA,EACDG,SACAC,OACA4C,SAAQ,IAAMC,EAAAA,WACjBpC,QAASb,EAAAA,EACNG,SACAC,OACA8C,UACAF,QAAQ,wCACXtC,OAAQV,EAAAA,EACLG,SACAC,OACA8C,UACAF,QAAQ,wCACX1B,KAAMtB,EAAAA,EACHG,SACAgD,IAAI,EAAG,CACNC,QAAS,yBAEVC,IAAI,IAAK,CACRD,QAAS,0CAEb7B,cAAevB,EAAAA,EAAEG,SAASM,WAAWQ,WACrCwB,MAAOC,EAAAA,aAAajC,WAAWuC,QAAQ,WACvCtB,WAAYC,EAAAA,iBAAiBlB,WAAWuC,QAAQ,UAChDL,WAAY3C,EAAAA,EAAEG,SAAS6C,SAAQ,KAAM,IAAIM,MAAOC,gBAChDX,aAAc5C,EAAAA,EAAEG,SAAS6C,SAAQ,KAAM,IAAIM,MAAOC,kBAGhDC,EAAoBzD,EAAYS,UAAUsC,KAAK,CACnD5C,IAAI,EACJG,SAAS,EACTsC,YAAY,EAEZrC,MAAM,EACNK,cAAc,EACdG,MAAM,EAENU,MAAM"}
@@ -1,553 +0,0 @@
1
- import { z } from "zod";
2
- declare const BlueprintSchema: z.ZodObject<z.objectUtil.extendShape<{
3
- id: z.ZodString;
4
- user_id: z.ZodString;
5
- user: z.ZodOptional<z.ZodObject<{
6
- id: z.ZodOptional<z.ZodString>;
7
- user_id: z.ZodOptional<z.ZodString>;
8
- username: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
9
- avatar_path: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
10
- bio: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
11
- urls: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
12
- value: z.ZodString;
13
- }, "strip", z.ZodTypeAny, {
14
- value: string;
15
- }, {
16
- value: string;
17
- }>, "many">>>;
18
- post_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
19
- last_active: z.ZodOptional<z.ZodString>;
20
- }, "strip", z.ZodTypeAny, {
21
- id?: string | undefined;
22
- user_id?: string | undefined;
23
- avatar_path?: string | null | undefined;
24
- urls?: {
25
- value: string;
26
- }[] | undefined;
27
- username?: string | null | undefined;
28
- bio?: string | null | undefined;
29
- post_id?: string | null | undefined;
30
- last_active?: string | undefined;
31
- }, {
32
- id?: string | undefined;
33
- user_id?: string | undefined;
34
- avatar_path?: string | null | undefined;
35
- urls?: {
36
- value: string;
37
- }[] | undefined;
38
- username?: string | null | undefined;
39
- bio?: string | null | undefined;
40
- post_id?: string | null | undefined;
41
- last_active?: string | undefined;
42
- }>>;
43
- org_id: z.ZodString;
44
- organization: z.ZodOptional<z.ZodObject<{
45
- id: z.ZodOptional<z.ZodString>;
46
- name: z.ZodOptional<z.ZodString>;
47
- avatar_path: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
48
- mission: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
49
- size: z.ZodOptional<z.ZodString>;
50
- email: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
51
- domain: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
52
- urls: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
53
- value: z.ZodString;
54
- }, "strip", z.ZodTypeAny, {
55
- value: string;
56
- }, {
57
- value: string;
58
- }>, "many">>>>;
59
- base_role: z.ZodOptional<z.ZodDefault<z.ZodEnum<["admin", "read", "write", "none"]>>>;
60
- }, "strip", z.ZodTypeAny, {
61
- id?: string | undefined;
62
- name?: string | undefined;
63
- avatar_path?: string | null | undefined;
64
- mission?: string | null | undefined;
65
- size?: string | undefined;
66
- email?: string | null | undefined;
67
- domain?: string | null | undefined;
68
- urls?: {
69
- value: string;
70
- }[] | null | undefined;
71
- base_role?: "admin" | "read" | "write" | "none" | undefined;
72
- }, {
73
- id?: string | undefined;
74
- name?: string | undefined;
75
- avatar_path?: string | null | undefined;
76
- mission?: string | null | undefined;
77
- size?: string | undefined;
78
- email?: string | null | undefined;
79
- domain?: string | null | undefined;
80
- urls?: {
81
- value: string;
82
- }[] | null | undefined;
83
- base_role?: "admin" | "read" | "write" | "none" | undefined;
84
- }>>;
85
- team_id: z.ZodString;
86
- team: z.ZodOptional<z.ZodObject<{
87
- id: z.ZodOptional<z.ZodString>;
88
- org_id: z.ZodOptional<z.ZodString>;
89
- name: z.ZodOptional<z.ZodString>;
90
- description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
91
- default_role: z.ZodOptional<z.ZodEnum<["admin", "read", "write", "none"]>>;
92
- visibility: z.ZodOptional<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>;
93
- created_at: z.ZodOptional<z.ZodString>;
94
- }, "strip", z.ZodTypeAny, {
95
- id?: string | undefined;
96
- org_id?: string | undefined;
97
- created_at?: string | undefined;
98
- name?: string | undefined;
99
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
100
- description?: string | null | undefined;
101
- default_role?: "admin" | "read" | "write" | "none" | undefined;
102
- }, {
103
- id?: string | undefined;
104
- org_id?: string | undefined;
105
- created_at?: string | undefined;
106
- name?: string | undefined;
107
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
108
- description?: string | null | undefined;
109
- default_role?: "admin" | "read" | "write" | "none" | undefined;
110
- }>>;
111
- parent_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
112
- parent: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
113
- asset_type: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
114
- name: z.ZodString;
115
- name_url_slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
116
- slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
117
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
- visibility: z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>;
119
- monetization: z.ZodEnum<["none", "pay-to-unlock", "pay-per-use"]>;
120
- price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
121
- unit_cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
122
- cost_accounting: z.ZodNullable<z.ZodOptional<z.ZodEnum<["fixed", "variable"]>>>;
123
- cost_unit: z.ZodNullable<z.ZodOptional<z.ZodString>>;
124
- product_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
125
- price_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
126
- metadata: z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
127
- preview: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">>>;
128
- state: z.ZodNullable<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>;
129
- created_at: z.ZodString;
130
- last_updated: z.ZodString;
131
- }, {
132
- asset_type: z.ZodEffects<z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>, "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication", "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication">;
133
- }>, "strip", z.ZodTypeAny, {
134
- id: string;
135
- user_id: string;
136
- org_id: string;
137
- asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
138
- created_at: string;
139
- last_updated: string;
140
- name: string;
141
- team_id: string;
142
- visibility: "organization" | "public" | "private" | "monetized" | "inherit";
143
- monetization: "none" | "pay-to-unlock" | "pay-per-use";
144
- user?: {
145
- id?: string | undefined;
146
- user_id?: string | undefined;
147
- avatar_path?: string | null | undefined;
148
- urls?: {
149
- value: string;
150
- }[] | undefined;
151
- username?: string | null | undefined;
152
- bio?: string | null | undefined;
153
- post_id?: string | null | undefined;
154
- last_active?: string | undefined;
155
- } | undefined;
156
- organization?: {
157
- id?: string | undefined;
158
- name?: string | undefined;
159
- avatar_path?: string | null | undefined;
160
- mission?: string | null | undefined;
161
- size?: string | undefined;
162
- email?: string | null | undefined;
163
- domain?: string | null | undefined;
164
- urls?: {
165
- value: string;
166
- }[] | null | undefined;
167
- base_role?: "admin" | "read" | "write" | "none" | undefined;
168
- } | undefined;
169
- team?: {
170
- id?: string | undefined;
171
- org_id?: string | undefined;
172
- created_at?: string | undefined;
173
- name?: string | undefined;
174
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
175
- description?: string | null | undefined;
176
- default_role?: "admin" | "read" | "write" | "none" | undefined;
177
- } | undefined;
178
- metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
179
- description?: string | null | undefined;
180
- parent_id?: string | null | undefined;
181
- parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
182
- name_url_slug?: string | null | undefined;
183
- slug?: string | null | undefined;
184
- price?: number | null | undefined;
185
- unit_cost?: number | null | undefined;
186
- cost_accounting?: "fixed" | "variable" | null | undefined;
187
- cost_unit?: string | null | undefined;
188
- product_id?: string | null | undefined;
189
- price_id?: string | null | undefined;
190
- preview?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
191
- state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
192
- }, {
193
- id: string;
194
- user_id: string;
195
- org_id: string;
196
- asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
197
- created_at: string;
198
- last_updated: string;
199
- name: string;
200
- team_id: string;
201
- visibility: "organization" | "public" | "private" | "monetized" | "inherit";
202
- monetization: "none" | "pay-to-unlock" | "pay-per-use";
203
- user?: {
204
- id?: string | undefined;
205
- user_id?: string | undefined;
206
- avatar_path?: string | null | undefined;
207
- urls?: {
208
- value: string;
209
- }[] | undefined;
210
- username?: string | null | undefined;
211
- bio?: string | null | undefined;
212
- post_id?: string | null | undefined;
213
- last_active?: string | undefined;
214
- } | undefined;
215
- organization?: {
216
- id?: string | undefined;
217
- name?: string | undefined;
218
- avatar_path?: string | null | undefined;
219
- mission?: string | null | undefined;
220
- size?: string | undefined;
221
- email?: string | null | undefined;
222
- domain?: string | null | undefined;
223
- urls?: {
224
- value: string;
225
- }[] | null | undefined;
226
- base_role?: "admin" | "read" | "write" | "none" | undefined;
227
- } | undefined;
228
- team?: {
229
- id?: string | undefined;
230
- org_id?: string | undefined;
231
- created_at?: string | undefined;
232
- name?: string | undefined;
233
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
234
- description?: string | null | undefined;
235
- default_role?: "admin" | "read" | "write" | "none" | undefined;
236
- } | undefined;
237
- metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
238
- description?: string | null | undefined;
239
- parent_id?: string | null | undefined;
240
- parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
241
- name_url_slug?: string | null | undefined;
242
- slug?: string | null | undefined;
243
- price?: number | null | undefined;
244
- unit_cost?: number | null | undefined;
245
- cost_accounting?: "fixed" | "variable" | null | undefined;
246
- cost_unit?: string | null | undefined;
247
- product_id?: string | null | undefined;
248
- price_id?: string | null | undefined;
249
- preview?: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
250
- state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
251
- }>;
252
- declare const CreateBlueprintSchema: z.ZodObject<z.objectUtil.extendShape<{
253
- id: z.ZodOptional<z.ZodString>;
254
- user_id: z.ZodOptional<z.ZodString>;
255
- user: z.ZodOptional<z.ZodOptional<z.ZodObject<{
256
- id: z.ZodOptional<z.ZodString>;
257
- user_id: z.ZodOptional<z.ZodString>;
258
- username: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
259
- avatar_path: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
260
- bio: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
261
- urls: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
262
- value: z.ZodString;
263
- }, "strip", z.ZodTypeAny, {
264
- value: string;
265
- }, {
266
- value: string;
267
- }>, "many">>>;
268
- post_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
269
- last_active: z.ZodOptional<z.ZodString>;
270
- }, "strip", z.ZodTypeAny, {
271
- id?: string | undefined;
272
- user_id?: string | undefined;
273
- avatar_path?: string | null | undefined;
274
- urls?: {
275
- value: string;
276
- }[] | undefined;
277
- username?: string | null | undefined;
278
- bio?: string | null | undefined;
279
- post_id?: string | null | undefined;
280
- last_active?: string | undefined;
281
- }, {
282
- id?: string | undefined;
283
- user_id?: string | undefined;
284
- avatar_path?: string | null | undefined;
285
- urls?: {
286
- value: string;
287
- }[] | undefined;
288
- username?: string | null | undefined;
289
- bio?: string | null | undefined;
290
- post_id?: string | null | undefined;
291
- last_active?: string | undefined;
292
- }>>>;
293
- org_id: z.ZodOptional<z.ZodString>;
294
- organization: z.ZodOptional<z.ZodOptional<z.ZodObject<{
295
- id: z.ZodOptional<z.ZodString>;
296
- name: z.ZodOptional<z.ZodString>;
297
- avatar_path: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
298
- mission: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
299
- size: z.ZodOptional<z.ZodString>;
300
- email: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
301
- domain: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
302
- urls: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
303
- value: z.ZodString;
304
- }, "strip", z.ZodTypeAny, {
305
- value: string;
306
- }, {
307
- value: string;
308
- }>, "many">>>>;
309
- base_role: z.ZodOptional<z.ZodDefault<z.ZodEnum<["admin", "read", "write", "none"]>>>;
310
- }, "strip", z.ZodTypeAny, {
311
- id?: string | undefined;
312
- name?: string | undefined;
313
- avatar_path?: string | null | undefined;
314
- mission?: string | null | undefined;
315
- size?: string | undefined;
316
- email?: string | null | undefined;
317
- domain?: string | null | undefined;
318
- urls?: {
319
- value: string;
320
- }[] | null | undefined;
321
- base_role?: "admin" | "read" | "write" | "none" | undefined;
322
- }, {
323
- id?: string | undefined;
324
- name?: string | undefined;
325
- avatar_path?: string | null | undefined;
326
- mission?: string | null | undefined;
327
- size?: string | undefined;
328
- email?: string | null | undefined;
329
- domain?: string | null | undefined;
330
- urls?: {
331
- value: string;
332
- }[] | null | undefined;
333
- base_role?: "admin" | "read" | "write" | "none" | undefined;
334
- }>>>;
335
- team_id: z.ZodOptional<z.ZodString>;
336
- team: z.ZodOptional<z.ZodOptional<z.ZodObject<{
337
- id: z.ZodOptional<z.ZodString>;
338
- org_id: z.ZodOptional<z.ZodString>;
339
- name: z.ZodOptional<z.ZodString>;
340
- description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
341
- default_role: z.ZodOptional<z.ZodEnum<["admin", "read", "write", "none"]>>;
342
- visibility: z.ZodOptional<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>;
343
- created_at: z.ZodOptional<z.ZodString>;
344
- }, "strip", z.ZodTypeAny, {
345
- id?: string | undefined;
346
- org_id?: string | undefined;
347
- created_at?: string | undefined;
348
- name?: string | undefined;
349
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
350
- description?: string | null | undefined;
351
- default_role?: "admin" | "read" | "write" | "none" | undefined;
352
- }, {
353
- id?: string | undefined;
354
- org_id?: string | undefined;
355
- created_at?: string | undefined;
356
- name?: string | undefined;
357
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
358
- description?: string | null | undefined;
359
- default_role?: "admin" | "read" | "write" | "none" | undefined;
360
- }>>>;
361
- parent_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
362
- parent: z.ZodOptional<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
363
- asset_type: z.ZodOptional<z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>>;
364
- name: z.ZodOptional<z.ZodString>;
365
- name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
366
- slug: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
367
- description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
368
- visibility: z.ZodOptional<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>;
369
- monetization: z.ZodOptional<z.ZodEnum<["none", "pay-to-unlock", "pay-per-use"]>>;
370
- price: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
371
- unit_cost: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
372
- cost_accounting: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<["fixed", "variable"]>>>>;
373
- cost_unit: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
374
- product_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
375
- price_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
376
- metadata: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
377
- preview: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">>>>;
378
- state: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>>;
379
- created_at: z.ZodOptional<z.ZodString>;
380
- last_updated: z.ZodOptional<z.ZodString>;
381
- }, {
382
- id: z.ZodDefault<z.ZodString>;
383
- team_id: z.ZodDefault<z.ZodString>;
384
- org_id: z.ZodDefault<z.ZodString>;
385
- name_url_slug: z.ZodString;
386
- metadata: z.ZodObject<{
387
- edges: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
388
- nodes: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
389
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
390
- edges: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
391
- nodes: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
392
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
393
- edges: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
394
- nodes: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
395
- }, z.ZodTypeAny, "passthrough">>;
396
- }>, "strip", z.ZodTypeAny, {
397
- id: string;
398
- org_id: string;
399
- metadata: {
400
- edges: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
401
- nodes: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
402
- } & {
403
- [k: string]: unknown;
404
- };
405
- team_id: string;
406
- name_url_slug: string;
407
- user?: {
408
- id?: string | undefined;
409
- user_id?: string | undefined;
410
- avatar_path?: string | null | undefined;
411
- urls?: {
412
- value: string;
413
- }[] | undefined;
414
- username?: string | null | undefined;
415
- bio?: string | null | undefined;
416
- post_id?: string | null | undefined;
417
- last_active?: string | undefined;
418
- } | undefined;
419
- organization?: {
420
- id?: string | undefined;
421
- name?: string | undefined;
422
- avatar_path?: string | null | undefined;
423
- mission?: string | null | undefined;
424
- size?: string | undefined;
425
- email?: string | null | undefined;
426
- domain?: string | null | undefined;
427
- urls?: {
428
- value: string;
429
- }[] | null | undefined;
430
- base_role?: "admin" | "read" | "write" | "none" | undefined;
431
- } | undefined;
432
- team?: {
433
- id?: string | undefined;
434
- org_id?: string | undefined;
435
- created_at?: string | undefined;
436
- name?: string | undefined;
437
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
438
- description?: string | null | undefined;
439
- default_role?: "admin" | "read" | "write" | "none" | undefined;
440
- } | undefined;
441
- user_id?: string | undefined;
442
- asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
443
- created_at?: string | undefined;
444
- last_updated?: string | undefined;
445
- name?: string | undefined;
446
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
447
- description?: string | null | undefined;
448
- parent_id?: string | null | undefined;
449
- parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
450
- slug?: string | null | undefined;
451
- monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
452
- price?: number | null | undefined;
453
- unit_cost?: number | null | undefined;
454
- cost_accounting?: "fixed" | "variable" | null | undefined;
455
- cost_unit?: string | null | undefined;
456
- product_id?: string | null | undefined;
457
- price_id?: string | null | undefined;
458
- preview?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
459
- state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
460
- }, {
461
- metadata: {
462
- edges: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
463
- nodes: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
464
- } & {
465
- [k: string]: unknown;
466
- };
467
- name_url_slug: string;
468
- user?: {
469
- id?: string | undefined;
470
- user_id?: string | undefined;
471
- avatar_path?: string | null | undefined;
472
- urls?: {
473
- value: string;
474
- }[] | undefined;
475
- username?: string | null | undefined;
476
- bio?: string | null | undefined;
477
- post_id?: string | null | undefined;
478
- last_active?: string | undefined;
479
- } | undefined;
480
- organization?: {
481
- id?: string | undefined;
482
- name?: string | undefined;
483
- avatar_path?: string | null | undefined;
484
- mission?: string | null | undefined;
485
- size?: string | undefined;
486
- email?: string | null | undefined;
487
- domain?: string | null | undefined;
488
- urls?: {
489
- value: string;
490
- }[] | null | undefined;
491
- base_role?: "admin" | "read" | "write" | "none" | undefined;
492
- } | undefined;
493
- team?: {
494
- id?: string | undefined;
495
- org_id?: string | undefined;
496
- created_at?: string | undefined;
497
- name?: string | undefined;
498
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
499
- description?: string | null | undefined;
500
- default_role?: "admin" | "read" | "write" | "none" | undefined;
501
- } | undefined;
502
- id?: string | undefined;
503
- user_id?: string | undefined;
504
- org_id?: string | undefined;
505
- asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
506
- created_at?: string | undefined;
507
- last_updated?: string | undefined;
508
- name?: string | undefined;
509
- team_id?: string | undefined;
510
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
511
- description?: string | null | undefined;
512
- parent_id?: string | null | undefined;
513
- parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
514
- slug?: string | null | undefined;
515
- monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
516
- price?: number | null | undefined;
517
- unit_cost?: number | null | undefined;
518
- cost_accounting?: "fixed" | "variable" | null | undefined;
519
- cost_unit?: string | null | undefined;
520
- product_id?: string | null | undefined;
521
- price_id?: string | null | undefined;
522
- preview?: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
523
- state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
524
- }>;
525
- declare const UpdateBlueprintSchema: z.ZodObject<{
526
- team_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
527
- name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
528
- name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
529
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
530
- visibility: z.ZodOptional<z.ZodNullable<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>>;
531
- metadata: z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
532
- last_updated: z.ZodDefault<z.ZodString>;
533
- }, "strip", z.ZodTypeAny, {
534
- last_updated: string;
535
- metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
536
- name?: string | null | undefined;
537
- team_id?: string | null | undefined;
538
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | null | undefined;
539
- description?: string | null | undefined;
540
- name_url_slug?: string | null | undefined;
541
- }, {
542
- metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
543
- last_updated?: string | undefined;
544
- name?: string | null | undefined;
545
- team_id?: string | null | undefined;
546
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | null | undefined;
547
- description?: string | null | undefined;
548
- name_url_slug?: string | null | undefined;
549
- }>;
550
- export { BlueprintSchema, CreateBlueprintSchema, UpdateBlueprintSchema };
551
- export type Blueprint = z.infer<typeof BlueprintSchema>;
552
- export type CreateBlueprint = z.infer<typeof CreateBlueprintSchema>;
553
- export type UpdateBlueprint = z.infer<typeof UpdateBlueprintSchema>;
@@ -1,2 +0,0 @@
1
- import{uuidv7 as t}from"uuidv7";import{z as a}from"zod";import{AssetSchema as e}from"./assets.esm.js";import{AssetTypeSchema as i,VisibilitySchema as o}from"./common.esm.js";const l=e.extend({asset_type:i.refine((t=>"blueprint"===t))}),n=e.partial().extend({id:a.string().uuid().default((()=>t())),team_id:a.string().uuid().default("00000000-0000-0000-0000-000000000000"),org_id:a.string().uuid().default("00000000-0000-0000-0000-000000000000"),name_url_slug:a.string(),metadata:a.object({edges:a.array(a.object({}).passthrough()),nodes:a.array(a.object({}).passthrough())}).passthrough()}),r=a.object({team_id:a.string().uuid().nullable().optional(),name_url_slug:a.string().nullable().optional(),name:a.string().nullable().optional(),description:a.string().nullable().optional(),visibility:o.nullable().optional(),metadata:a.object({}).passthrough().optional().nullable(),last_updated:a.string().default((()=>(new Date).toISOString()))});export{l as BlueprintSchema,n as CreateBlueprintSchema,r as UpdateBlueprintSchema};
2
- //# sourceMappingURL=blueprints.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blueprints.esm.js","sources":["../../src/schema/blueprints.ts"],"sourcesContent":["import { uuidv7 } from \"uuidv7\";\nimport { z } from \"zod\";\n\nimport { AssetSchema } from \"./assets\";\nimport {\n AssetTypeSchema,\n MonetizationSchema,\n VisibilitySchema,\n} from \"./common\";\n\nconst BlueprintSchema = AssetSchema.extend({\n asset_type: AssetTypeSchema.refine((val) => val === \"blueprint\"),\n});\n\nconst CreateBlueprintSchema = AssetSchema.partial().extend({\n id: z\n .string()\n .uuid()\n .default(() => uuidv7()),\n team_id: z.string().uuid().default(\"00000000-0000-0000-0000-000000000000\"),\n org_id: z.string().uuid().default(\"00000000-0000-0000-0000-000000000000\"),\n name_url_slug: z.string(),\n metadata: z\n .object({\n edges: z.array(z.object({}).passthrough()),\n nodes: z.array(z.object({}).passthrough()),\n })\n .passthrough(),\n});\n\nconst UpdateBlueprintSchema = z.object({\n team_id: z.string().uuid().nullable().optional(),\n name_url_slug: z.string().nullable().optional(),\n name: z.string().nullable().optional(),\n description: z.string().nullable().optional(),\n visibility: VisibilitySchema.nullable().optional(),\n metadata: z.object({}).passthrough().optional().nullable(),\n last_updated: z.string().default(() => new Date().toISOString()),\n});\n\nexport { BlueprintSchema, CreateBlueprintSchema, UpdateBlueprintSchema };\nexport type Blueprint = z.infer<typeof BlueprintSchema>;\nexport type CreateBlueprint = z.infer<typeof CreateBlueprintSchema>;\nexport type UpdateBlueprint = z.infer<typeof UpdateBlueprintSchema>;\n"],"names":["BlueprintSchema","AssetSchema","extend","asset_type","AssetTypeSchema","refine","val","CreateBlueprintSchema","partial","id","z","string","uuid","default","uuidv7","team_id","org_id","name_url_slug","metadata","object","edges","array","passthrough","nodes","UpdateBlueprintSchema","nullable","optional","name","description","visibility","VisibilitySchema","last_updated","Date","toISOString"],"mappings":"8KAUA,MAAMA,EAAkBC,EAAYC,OAAO,CACzCC,WAAYC,EAAgBC,QAAQC,GAAgB,cAARA,MAGxCC,EAAwBN,EAAYO,UAAUN,OAAO,CACzDO,GAAIC,EACDC,SACAC,OACAC,SAAQ,IAAMC,MACjBC,QAASL,EAAEC,SAASC,OAAOC,QAAQ,wCACnCG,OAAQN,EAAEC,SAASC,OAAOC,QAAQ,wCAClCI,cAAeP,EAAEC,SACjBO,SAAUR,EACPS,OAAO,CACNC,MAAOV,EAAEW,MAAMX,EAAES,OAAO,CAAE,GAAEG,eAC5BC,MAAOb,EAAEW,MAAMX,EAAES,OAAO,CAAE,GAAEG,iBAE7BA,gBAGCE,EAAwBd,EAAES,OAAO,CACrCJ,QAASL,EAAEC,SAASC,OAAOa,WAAWC,WACtCT,cAAeP,EAAEC,SAASc,WAAWC,WACrCC,KAAMjB,EAAEC,SAASc,WAAWC,WAC5BE,YAAalB,EAAEC,SAASc,WAAWC,WACnCG,WAAYC,EAAiBL,WAAWC,WACxCR,SAAUR,EAAES,OAAO,CAAE,GAAEG,cAAcI,WAAWD,WAChDM,aAAcrB,EAAEC,SAASE,SAAQ,KAAM,IAAImB,MAAOC"}
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("uuidv7"),t=require("zod"),a=require("./assets.js"),i=require("./common.js");const s=a.AssetSchema.extend({asset_type:i.AssetTypeSchema.refine((e=>"blueprint"===e))}),r=a.AssetSchema.partial().extend({id:t.z.string().uuid().default((()=>e.uuidv7())),team_id:t.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),org_id:t.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),name_url_slug:t.z.string(),metadata:t.z.object({edges:t.z.array(t.z.object({}).passthrough()),nodes:t.z.array(t.z.object({}).passthrough())}).passthrough()}),l=t.z.object({team_id:t.z.string().uuid().nullable().optional(),name_url_slug:t.z.string().nullable().optional(),name:t.z.string().nullable().optional(),description:t.z.string().nullable().optional(),visibility:i.VisibilitySchema.nullable().optional(),metadata:t.z.object({}).passthrough().optional().nullable(),last_updated:t.z.string().default((()=>(new Date).toISOString()))});exports.BlueprintSchema=s,exports.CreateBlueprintSchema=r,exports.UpdateBlueprintSchema=l;
2
- //# sourceMappingURL=blueprints.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blueprints.js","sources":["../../src/schema/blueprints.ts"],"sourcesContent":["import { uuidv7 } from \"uuidv7\";\nimport { z } from \"zod\";\n\nimport { AssetSchema } from \"./assets\";\nimport {\n AssetTypeSchema,\n MonetizationSchema,\n VisibilitySchema,\n} from \"./common\";\n\nconst BlueprintSchema = AssetSchema.extend({\n asset_type: AssetTypeSchema.refine((val) => val === \"blueprint\"),\n});\n\nconst CreateBlueprintSchema = AssetSchema.partial().extend({\n id: z\n .string()\n .uuid()\n .default(() => uuidv7()),\n team_id: z.string().uuid().default(\"00000000-0000-0000-0000-000000000000\"),\n org_id: z.string().uuid().default(\"00000000-0000-0000-0000-000000000000\"),\n name_url_slug: z.string(),\n metadata: z\n .object({\n edges: z.array(z.object({}).passthrough()),\n nodes: z.array(z.object({}).passthrough()),\n })\n .passthrough(),\n});\n\nconst UpdateBlueprintSchema = z.object({\n team_id: z.string().uuid().nullable().optional(),\n name_url_slug: z.string().nullable().optional(),\n name: z.string().nullable().optional(),\n description: z.string().nullable().optional(),\n visibility: VisibilitySchema.nullable().optional(),\n metadata: z.object({}).passthrough().optional().nullable(),\n last_updated: z.string().default(() => new Date().toISOString()),\n});\n\nexport { BlueprintSchema, CreateBlueprintSchema, UpdateBlueprintSchema };\nexport type Blueprint = z.infer<typeof BlueprintSchema>;\nexport type CreateBlueprint = z.infer<typeof CreateBlueprintSchema>;\nexport type UpdateBlueprint = z.infer<typeof UpdateBlueprintSchema>;\n"],"names":["BlueprintSchema","AssetSchema","extend","asset_type","AssetTypeSchema","refine","val","CreateBlueprintSchema","partial","id","z","string","uuid","default","uuidv7","team_id","org_id","name_url_slug","metadata","object","edges","array","passthrough","nodes","UpdateBlueprintSchema","nullable","optional","name","description","visibility","VisibilitySchema","last_updated","Date","toISOString"],"mappings":"wGAUA,MAAMA,EAAkBC,EAAWA,YAACC,OAAO,CACzCC,WAAYC,EAAeA,gBAACC,QAAQC,GAAgB,cAARA,MAGxCC,EAAwBN,EAAWA,YAACO,UAAUN,OAAO,CACzDO,GAAIC,EAAAA,EACDC,SACAC,OACAC,SAAQ,IAAMC,EAAAA,WACjBC,QAASL,EAACA,EAACC,SAASC,OAAOC,QAAQ,wCACnCG,OAAQN,EAACA,EAACC,SAASC,OAAOC,QAAQ,wCAClCI,cAAeP,EAACA,EAACC,SACjBO,SAAUR,EAAAA,EACPS,OAAO,CACNC,MAAOV,EAACA,EAACW,MAAMX,EAAAA,EAAES,OAAO,CAAE,GAAEG,eAC5BC,MAAOb,EAACA,EAACW,MAAMX,EAAAA,EAAES,OAAO,CAAE,GAAEG,iBAE7BA,gBAGCE,EAAwBd,EAACA,EAACS,OAAO,CACrCJ,QAASL,EAACA,EAACC,SAASC,OAAOa,WAAWC,WACtCT,cAAeP,EAAAA,EAAEC,SAASc,WAAWC,WACrCC,KAAMjB,EAAAA,EAAEC,SAASc,WAAWC,WAC5BE,YAAalB,EAAAA,EAAEC,SAASc,WAAWC,WACnCG,WAAYC,EAAgBA,iBAACL,WAAWC,WACxCR,SAAUR,EAAAA,EAAES,OAAO,CAAE,GAAEG,cAAcI,WAAWD,WAChDM,aAAcrB,EAAAA,EAAEC,SAASE,SAAQ,KAAM,IAAImB,MAAOC"}