@ourofoundation/ouro-js 1.1.1 → 1.1.2

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 (96) hide show
  1. package/dist/index.d.ts +18 -19
  2. package/dist/index.esm.js +2 -0
  3. package/dist/index.esm.js.map +1 -0
  4. package/dist/index.js +2 -81
  5. package/dist/index.js.map +1 -1
  6. package/dist/schema/assets.d.ts +100 -100
  7. package/dist/schema/assets.esm.js +2 -0
  8. package/dist/schema/assets.esm.js.map +1 -0
  9. package/dist/schema/assets.js +2 -95
  10. package/dist/schema/assets.js.map +1 -1
  11. package/dist/schema/blueprints.d.ts +95 -95
  12. package/dist/schema/blueprints.esm.js +2 -0
  13. package/dist/schema/blueprints.esm.js.map +1 -0
  14. package/dist/schema/blueprints.js +2 -38
  15. package/dist/schema/blueprints.js.map +1 -1
  16. package/dist/schema/comments.d.ts +81 -81
  17. package/dist/schema/comments.esm.js +2 -0
  18. package/dist/schema/comments.esm.js.map +1 -0
  19. package/dist/schema/comments.js +2 -32
  20. package/dist/schema/comments.js.map +1 -1
  21. package/dist/schema/common.d.ts +32 -32
  22. package/dist/schema/common.esm.js +2 -0
  23. package/dist/schema/common.esm.js.map +1 -0
  24. package/dist/schema/common.js +2 -87
  25. package/dist/schema/common.js.map +1 -1
  26. package/dist/schema/conversations.d.ts +139 -139
  27. package/dist/schema/conversations.esm.js +2 -0
  28. package/dist/schema/conversations.esm.js.map +1 -0
  29. package/dist/schema/conversations.js +2 -54
  30. package/dist/schema/conversations.js.map +1 -1
  31. package/dist/schema/datasets.d.ts +202 -202
  32. package/dist/schema/datasets.esm.js +2 -0
  33. package/dist/schema/datasets.esm.js.map +1 -0
  34. package/dist/schema/datasets.js +2 -49
  35. package/dist/schema/datasets.js.map +1 -1
  36. package/dist/schema/files.d.ts +185 -185
  37. package/dist/schema/files.esm.js +2 -0
  38. package/dist/schema/files.esm.js.map +1 -0
  39. package/dist/schema/files.js +2 -50
  40. package/dist/schema/files.js.map +1 -1
  41. package/dist/schema/index.d.ts +14 -80
  42. package/dist/schema/notifications.d.ts +22 -22
  43. package/dist/schema/notifications.esm.js +2 -0
  44. package/dist/schema/notifications.esm.js.map +1 -0
  45. package/dist/schema/notifications.js +2 -46
  46. package/dist/schema/notifications.js.map +1 -1
  47. package/dist/schema/organizations.d.ts +11 -11
  48. package/dist/schema/organizations.esm.js +2 -0
  49. package/dist/schema/organizations.esm.js.map +1 -0
  50. package/dist/schema/organizations.js +2 -33
  51. package/dist/schema/organizations.js.map +1 -1
  52. package/dist/schema/posts.d.ts +298 -298
  53. package/dist/schema/posts.esm.js +2 -0
  54. package/dist/schema/posts.esm.js.map +1 -0
  55. package/dist/schema/posts.js +2 -81
  56. package/dist/schema/posts.js.map +1 -1
  57. package/dist/schema/replications.d.ts +115 -115
  58. package/dist/schema/replications.esm.js +2 -0
  59. package/dist/schema/replications.esm.js.map +1 -0
  60. package/dist/schema/replications.js +2 -42
  61. package/dist/schema/replications.js.map +1 -1
  62. package/dist/schema/services.d.ts +14 -14
  63. package/dist/schema/services.esm.js +2 -0
  64. package/dist/schema/services.esm.js.map +1 -0
  65. package/dist/schema/services.js +2 -39
  66. package/dist/schema/services.js.map +1 -1
  67. package/dist/schema/teams.d.ts +85 -85
  68. package/dist/schema/teams.esm.js +2 -0
  69. package/dist/schema/teams.esm.js.map +1 -0
  70. package/dist/schema/teams.js +2 -57
  71. package/dist/schema/teams.js.map +1 -1
  72. package/dist/schema/users.d.ts +4 -4
  73. package/dist/schema/users.esm.js +2 -0
  74. package/dist/schema/users.esm.js.map +1 -0
  75. package/dist/schema/users.js +2 -35
  76. package/dist/schema/users.js.map +1 -1
  77. package/dist/types/index.d.ts +14 -0
  78. package/dist/utils/air/index.d.ts +1 -1
  79. package/dist/utils/air/index.esm.js +2 -0
  80. package/dist/utils/air/index.esm.js.map +1 -0
  81. package/dist/utils/air/index.js +2 -51
  82. package/dist/utils/air/index.js.map +1 -1
  83. package/dist/utils/air/markdown-parser.esm.js +2 -0
  84. package/dist/utils/air/markdown-parser.esm.js.map +1 -0
  85. package/dist/utils/air/markdown-parser.js +2 -118
  86. package/dist/utils/air/markdown-parser.js.map +1 -1
  87. package/dist/utils/dataset.esm.js +2 -0
  88. package/dist/utils/dataset.esm.js.map +1 -0
  89. package/dist/utils/dataset.js +2 -19
  90. package/dist/utils/dataset.js.map +1 -1
  91. package/dist/utils/navigate.esm.js +2 -0
  92. package/dist/utils/navigate.esm.js.map +1 -0
  93. package/dist/utils/navigate.js +2 -56
  94. package/dist/utils/navigate.js.map +1 -1
  95. package/package.json +21 -4
  96. package/rollup.config.js +52 -0
@@ -57,27 +57,27 @@ declare const ConversationSchema: z.ZodObject<z.objectUtil.extendShape<{
57
57
  }, "strip", z.ZodTypeAny, {
58
58
  id?: string | undefined;
59
59
  name?: string | undefined;
60
- size?: string | undefined;
61
- email?: string | null | undefined;
62
60
  avatar_path?: string | null | undefined;
63
61
  mission?: string | null | undefined;
62
+ size?: string | undefined;
63
+ email?: string | null | undefined;
64
64
  domain?: string | null | undefined;
65
65
  urls?: {
66
66
  value: string;
67
67
  }[] | null | undefined;
68
- base_role?: "none" | "admin" | "read" | "write" | undefined;
68
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
69
69
  }, {
70
70
  id?: string | undefined;
71
71
  name?: string | undefined;
72
- size?: string | undefined;
73
- email?: string | null | undefined;
74
72
  avatar_path?: string | null | undefined;
75
73
  mission?: string | null | undefined;
74
+ size?: string | undefined;
75
+ email?: string | null | undefined;
76
76
  domain?: string | null | undefined;
77
77
  urls?: {
78
78
  value: string;
79
79
  }[] | null | undefined;
80
- base_role?: "none" | "admin" | "read" | "write" | undefined;
80
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
81
81
  }>>;
82
82
  team_id: z.ZodString;
83
83
  team: z.ZodOptional<z.ZodObject<{
@@ -90,20 +90,20 @@ declare const ConversationSchema: z.ZodObject<z.objectUtil.extendShape<{
90
90
  created_at: z.ZodOptional<z.ZodString>;
91
91
  }, "strip", z.ZodTypeAny, {
92
92
  id?: string | undefined;
93
- name?: string | undefined;
94
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
95
- description?: string | null | undefined;
96
93
  org_id?: string | undefined;
97
94
  created_at?: string | undefined;
98
- default_role?: "none" | "admin" | "read" | "write" | undefined;
99
- }, {
100
- id?: string | undefined;
101
95
  name?: string | undefined;
102
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
96
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
103
97
  description?: string | null | undefined;
98
+ default_role?: "admin" | "read" | "write" | "none" | undefined;
99
+ }, {
100
+ id?: string | undefined;
104
101
  org_id?: string | undefined;
105
102
  created_at?: string | undefined;
106
- default_role?: "none" | "admin" | "read" | "write" | undefined;
103
+ name?: string | undefined;
104
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
105
+ description?: string | null | undefined;
106
+ default_role?: "admin" | "read" | "write" | "none" | undefined;
107
107
  }>>;
108
108
  parent_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
109
109
  parent: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
@@ -136,21 +136,18 @@ declare const ConversationSchema: z.ZodObject<z.objectUtil.extendShape<{
136
136
  asset_type: z.ZodDefault<z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>>;
137
137
  }>, "strip", z.ZodTypeAny, {
138
138
  id: string;
139
- name: string;
140
- visibility: "inherit" | "private" | "public" | "organization" | "monetized";
139
+ user_id: string;
140
+ org_id: string;
141
+ asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
141
142
  metadata: {
142
143
  members: string[];
143
144
  };
144
- user_id: string;
145
- org_id: string;
146
- asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
147
145
  created_at: string;
148
146
  last_updated: string;
147
+ name: string;
149
148
  team_id: string;
149
+ visibility: "organization" | "public" | "private" | "monetized" | "inherit";
150
150
  monetization: "none" | "pay-to-unlock" | "pay-per-use";
151
- state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
152
- description?: string | null | undefined;
153
- parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
154
151
  user?: {
155
152
  id?: string | undefined;
156
153
  user_id?: string | undefined;
@@ -165,26 +162,28 @@ declare const ConversationSchema: z.ZodObject<z.objectUtil.extendShape<{
165
162
  organization?: {
166
163
  id?: string | undefined;
167
164
  name?: string | undefined;
168
- size?: string | undefined;
169
- email?: string | null | undefined;
170
165
  avatar_path?: string | null | undefined;
171
166
  mission?: string | null | undefined;
167
+ size?: string | undefined;
168
+ email?: string | null | undefined;
172
169
  domain?: string | null | undefined;
173
170
  urls?: {
174
171
  value: string;
175
172
  }[] | null | undefined;
176
- base_role?: "none" | "admin" | "read" | "write" | undefined;
173
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
177
174
  } | undefined;
178
175
  team?: {
179
176
  id?: string | undefined;
180
- name?: string | undefined;
181
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
182
- description?: string | null | undefined;
183
177
  org_id?: string | undefined;
184
178
  created_at?: string | undefined;
185
- default_role?: "none" | "admin" | "read" | "write" | undefined;
179
+ name?: string | undefined;
180
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
181
+ description?: string | null | undefined;
182
+ default_role?: "admin" | "read" | "write" | "none" | undefined;
186
183
  } | undefined;
184
+ description?: string | null | undefined;
187
185
  parent_id?: string | null | undefined;
186
+ parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
188
187
  name_url_slug?: string | null | undefined;
189
188
  slug?: string | null | undefined;
190
189
  price?: number | null | undefined;
@@ -194,22 +193,20 @@ declare const ConversationSchema: z.ZodObject<z.objectUtil.extendShape<{
194
193
  product_id?: string | null | undefined;
195
194
  price_id?: string | null | undefined;
196
195
  preview?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
196
+ state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
197
197
  }, {
198
198
  id: string;
199
- name: string;
200
- visibility: "inherit" | "private" | "public" | "organization" | "monetized";
199
+ user_id: string;
200
+ org_id: string;
201
201
  metadata: {
202
202
  members: string[];
203
203
  };
204
- user_id: string;
205
- org_id: string;
206
204
  created_at: string;
207
205
  last_updated: string;
206
+ name: string;
208
207
  team_id: string;
208
+ visibility: "organization" | "public" | "private" | "monetized" | "inherit";
209
209
  monetization: "none" | "pay-to-unlock" | "pay-per-use";
210
- state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
211
- description?: string | null | undefined;
212
- parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
213
210
  user?: {
214
211
  id?: string | undefined;
215
212
  user_id?: string | undefined;
@@ -224,27 +221,29 @@ declare const ConversationSchema: z.ZodObject<z.objectUtil.extendShape<{
224
221
  organization?: {
225
222
  id?: string | undefined;
226
223
  name?: string | undefined;
227
- size?: string | undefined;
228
- email?: string | null | undefined;
229
224
  avatar_path?: string | null | undefined;
230
225
  mission?: string | null | undefined;
226
+ size?: string | undefined;
227
+ email?: string | null | undefined;
231
228
  domain?: string | null | undefined;
232
229
  urls?: {
233
230
  value: string;
234
231
  }[] | null | undefined;
235
- base_role?: "none" | "admin" | "read" | "write" | undefined;
232
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
236
233
  } | undefined;
237
234
  team?: {
238
235
  id?: string | undefined;
239
- name?: string | undefined;
240
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
241
- description?: string | null | undefined;
242
236
  org_id?: string | undefined;
243
237
  created_at?: string | undefined;
244
- default_role?: "none" | "admin" | "read" | "write" | undefined;
238
+ name?: string | undefined;
239
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
240
+ description?: string | null | undefined;
241
+ default_role?: "admin" | "read" | "write" | "none" | undefined;
245
242
  } | undefined;
246
- asset_type?: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
243
+ asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
244
+ description?: string | null | undefined;
247
245
  parent_id?: string | null | undefined;
246
+ parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
248
247
  name_url_slug?: string | null | undefined;
249
248
  slug?: string | null | undefined;
250
249
  price?: number | null | undefined;
@@ -254,6 +253,7 @@ declare const ConversationSchema: z.ZodObject<z.objectUtil.extendShape<{
254
253
  product_id?: string | null | undefined;
255
254
  price_id?: string | null | undefined;
256
255
  preview?: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
256
+ state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
257
257
  }>;
258
258
  declare const CreateConversationSchema: z.ZodObject<z.objectUtil.extendShape<Omit<z.objectUtil.extendShape<{
259
259
  id: z.ZodString;
@@ -313,27 +313,27 @@ declare const CreateConversationSchema: z.ZodObject<z.objectUtil.extendShape<Omi
313
313
  }, "strip", z.ZodTypeAny, {
314
314
  id?: string | undefined;
315
315
  name?: string | undefined;
316
- size?: string | undefined;
317
- email?: string | null | undefined;
318
316
  avatar_path?: string | null | undefined;
319
317
  mission?: string | null | undefined;
318
+ size?: string | undefined;
319
+ email?: string | null | undefined;
320
320
  domain?: string | null | undefined;
321
321
  urls?: {
322
322
  value: string;
323
323
  }[] | null | undefined;
324
- base_role?: "none" | "admin" | "read" | "write" | undefined;
324
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
325
325
  }, {
326
326
  id?: string | undefined;
327
327
  name?: string | undefined;
328
- size?: string | undefined;
329
- email?: string | null | undefined;
330
328
  avatar_path?: string | null | undefined;
331
329
  mission?: string | null | undefined;
330
+ size?: string | undefined;
331
+ email?: string | null | undefined;
332
332
  domain?: string | null | undefined;
333
333
  urls?: {
334
334
  value: string;
335
335
  }[] | null | undefined;
336
- base_role?: "none" | "admin" | "read" | "write" | undefined;
336
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
337
337
  }>>;
338
338
  team_id: z.ZodString;
339
339
  team: z.ZodOptional<z.ZodObject<{
@@ -346,20 +346,20 @@ declare const CreateConversationSchema: z.ZodObject<z.objectUtil.extendShape<Omi
346
346
  created_at: z.ZodOptional<z.ZodString>;
347
347
  }, "strip", z.ZodTypeAny, {
348
348
  id?: string | undefined;
349
- name?: string | undefined;
350
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
351
- description?: string | null | undefined;
352
349
  org_id?: string | undefined;
353
350
  created_at?: string | undefined;
354
- default_role?: "none" | "admin" | "read" | "write" | undefined;
355
- }, {
356
- id?: string | undefined;
357
351
  name?: string | undefined;
358
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
352
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
359
353
  description?: string | null | undefined;
354
+ default_role?: "admin" | "read" | "write" | "none" | undefined;
355
+ }, {
356
+ id?: string | undefined;
360
357
  org_id?: string | undefined;
361
358
  created_at?: string | undefined;
362
- default_role?: "none" | "admin" | "read" | "write" | undefined;
359
+ name?: string | undefined;
360
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
361
+ description?: string | null | undefined;
362
+ default_role?: "admin" | "read" | "write" | "none" | undefined;
363
363
  }>>;
364
364
  parent_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
365
365
  parent: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
@@ -398,18 +398,15 @@ declare const CreateConversationSchema: z.ZodObject<z.objectUtil.extendShape<Omi
398
398
  visibility: z.ZodDefault<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>;
399
399
  }>, "strip", z.ZodTypeAny, {
400
400
  id: string;
401
- name: string;
402
- visibility: "inherit" | "private" | "public" | "organization" | "monetized";
401
+ org_id: string;
402
+ asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
403
403
  metadata: {
404
404
  members: string[];
405
405
  };
406
- org_id: string;
407
- asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
406
+ name: string;
408
407
  team_id: string;
408
+ visibility: "organization" | "public" | "private" | "monetized" | "inherit";
409
409
  monetization: "none" | "pay-to-unlock" | "pay-per-use";
410
- state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
411
- description?: string | null | undefined;
412
- parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
413
410
  user?: {
414
411
  id?: string | undefined;
415
412
  user_id?: string | undefined;
@@ -424,26 +421,28 @@ declare const CreateConversationSchema: z.ZodObject<z.objectUtil.extendShape<Omi
424
421
  organization?: {
425
422
  id?: string | undefined;
426
423
  name?: string | undefined;
427
- size?: string | undefined;
428
- email?: string | null | undefined;
429
424
  avatar_path?: string | null | undefined;
430
425
  mission?: string | null | undefined;
426
+ size?: string | undefined;
427
+ email?: string | null | undefined;
431
428
  domain?: string | null | undefined;
432
429
  urls?: {
433
430
  value: string;
434
431
  }[] | null | undefined;
435
- base_role?: "none" | "admin" | "read" | "write" | undefined;
432
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
436
433
  } | undefined;
437
434
  team?: {
438
435
  id?: string | undefined;
439
- name?: string | undefined;
440
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
441
- description?: string | null | undefined;
442
436
  org_id?: string | undefined;
443
437
  created_at?: string | undefined;
444
- default_role?: "none" | "admin" | "read" | "write" | undefined;
438
+ name?: string | undefined;
439
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
440
+ description?: string | null | undefined;
441
+ default_role?: "admin" | "read" | "write" | "none" | undefined;
445
442
  } | undefined;
443
+ description?: string | null | undefined;
446
444
  parent_id?: string | null | undefined;
445
+ parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
447
446
  name_url_slug?: string | null | undefined;
448
447
  slug?: string | null | undefined;
449
448
  price?: number | null | undefined;
@@ -453,16 +452,12 @@ declare const CreateConversationSchema: z.ZodObject<z.objectUtil.extendShape<Omi
453
452
  product_id?: string | null | undefined;
454
453
  price_id?: string | null | undefined;
455
454
  preview?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
455
+ state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
456
456
  }, {
457
- name: string;
458
457
  metadata: {
459
458
  members: string[];
460
459
  };
461
- id?: string | undefined;
462
- state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
463
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
464
- description?: string | null | undefined;
465
- parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
460
+ name: string;
466
461
  user?: {
467
462
  id?: string | undefined;
468
463
  user_id?: string | undefined;
@@ -477,29 +472,33 @@ declare const CreateConversationSchema: z.ZodObject<z.objectUtil.extendShape<Omi
477
472
  organization?: {
478
473
  id?: string | undefined;
479
474
  name?: string | undefined;
480
- size?: string | undefined;
481
- email?: string | null | undefined;
482
475
  avatar_path?: string | null | undefined;
483
476
  mission?: string | null | undefined;
477
+ size?: string | undefined;
478
+ email?: string | null | undefined;
484
479
  domain?: string | null | undefined;
485
480
  urls?: {
486
481
  value: string;
487
482
  }[] | null | undefined;
488
- base_role?: "none" | "admin" | "read" | "write" | undefined;
483
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
489
484
  } | undefined;
490
485
  team?: {
491
486
  id?: string | undefined;
492
- name?: string | undefined;
493
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
494
- description?: string | null | undefined;
495
487
  org_id?: string | undefined;
496
488
  created_at?: string | undefined;
497
- default_role?: "none" | "admin" | "read" | "write" | undefined;
489
+ name?: string | undefined;
490
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
491
+ description?: string | null | undefined;
492
+ default_role?: "admin" | "read" | "write" | "none" | undefined;
498
493
  } | undefined;
494
+ id?: string | undefined;
499
495
  org_id?: string | undefined;
500
- asset_type?: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
496
+ asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
501
497
  team_id?: string | undefined;
498
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
499
+ description?: string | null | undefined;
502
500
  parent_id?: string | null | undefined;
501
+ parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
503
502
  name_url_slug?: string | null | undefined;
504
503
  slug?: string | null | undefined;
505
504
  monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
@@ -510,20 +509,9 @@ declare const CreateConversationSchema: z.ZodObject<z.objectUtil.extendShape<Omi
510
509
  product_id?: string | null | undefined;
511
510
  price_id?: string | null | undefined;
512
511
  preview?: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
512
+ state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
513
513
  }>;
514
514
  declare const UpdateConversationSchema: z.ZodObject<{
515
- state: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>>;
516
- name: z.ZodOptional<z.ZodString>;
517
- visibility: z.ZodOptional<z.ZodDefault<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>>;
518
- metadata: z.ZodOptional<z.ZodObject<{
519
- members: z.ZodArray<z.ZodString, "many">;
520
- }, "strip", z.ZodTypeAny, {
521
- members: string[];
522
- }, {
523
- members: string[];
524
- }>>;
525
- description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
526
- parent: z.ZodOptional<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
527
515
  organization: z.ZodOptional<z.ZodOptional<z.ZodObject<{
528
516
  id: z.ZodOptional<z.ZodString>;
529
517
  name: z.ZodOptional<z.ZodString>;
@@ -543,30 +531,41 @@ declare const UpdateConversationSchema: z.ZodObject<{
543
531
  }, "strip", z.ZodTypeAny, {
544
532
  id?: string | undefined;
545
533
  name?: string | undefined;
546
- size?: string | undefined;
547
- email?: string | null | undefined;
548
534
  avatar_path?: string | null | undefined;
549
535
  mission?: string | null | undefined;
536
+ size?: string | undefined;
537
+ email?: string | null | undefined;
550
538
  domain?: string | null | undefined;
551
539
  urls?: {
552
540
  value: string;
553
541
  }[] | null | undefined;
554
- base_role?: "none" | "admin" | "read" | "write" | undefined;
542
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
555
543
  }, {
556
544
  id?: string | undefined;
557
545
  name?: string | undefined;
558
- size?: string | undefined;
559
- email?: string | null | undefined;
560
546
  avatar_path?: string | null | undefined;
561
547
  mission?: string | null | undefined;
548
+ size?: string | undefined;
549
+ email?: string | null | undefined;
562
550
  domain?: string | null | undefined;
563
551
  urls?: {
564
552
  value: string;
565
553
  }[] | null | undefined;
566
- base_role?: "none" | "admin" | "read" | "write" | undefined;
554
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
567
555
  }>>>;
568
556
  asset_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>>>;
557
+ metadata: z.ZodOptional<z.ZodObject<{
558
+ members: z.ZodArray<z.ZodString, "many">;
559
+ }, "strip", z.ZodTypeAny, {
560
+ members: string[];
561
+ }, {
562
+ members: string[];
563
+ }>>;
564
+ name: z.ZodOptional<z.ZodString>;
565
+ visibility: z.ZodOptional<z.ZodDefault<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>>;
566
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
569
567
  parent_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
568
+ parent: z.ZodOptional<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
570
569
  name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
571
570
  slug: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
572
571
  monetization: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "pay-to-unlock", "pay-per-use"]>>>;
@@ -577,30 +576,30 @@ declare const UpdateConversationSchema: z.ZodObject<{
577
576
  product_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
578
577
  price_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
579
578
  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">>>>;
579
+ state: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>>;
580
580
  }, "strip", z.ZodTypeAny, {
581
- state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
582
- name?: string | undefined;
583
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
584
- metadata?: {
585
- members: string[];
586
- } | undefined;
587
- description?: string | null | undefined;
588
- parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
589
581
  organization?: {
590
582
  id?: string | undefined;
591
583
  name?: string | undefined;
592
- size?: string | undefined;
593
- email?: string | null | undefined;
594
584
  avatar_path?: string | null | undefined;
595
585
  mission?: string | null | undefined;
586
+ size?: string | undefined;
587
+ email?: string | null | undefined;
596
588
  domain?: string | null | undefined;
597
589
  urls?: {
598
590
  value: string;
599
591
  }[] | null | undefined;
600
- base_role?: "none" | "admin" | "read" | "write" | undefined;
592
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
593
+ } | undefined;
594
+ asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
595
+ metadata?: {
596
+ members: string[];
601
597
  } | undefined;
602
- asset_type?: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
598
+ name?: string | undefined;
599
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
600
+ description?: string | null | undefined;
603
601
  parent_id?: string | null | undefined;
602
+ parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
604
603
  name_url_slug?: string | null | undefined;
605
604
  slug?: string | null | undefined;
606
605
  monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
@@ -611,30 +610,30 @@ declare const UpdateConversationSchema: z.ZodObject<{
611
610
  product_id?: string | null | undefined;
612
611
  price_id?: string | null | undefined;
613
612
  preview?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
613
+ state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
614
614
  }, {
615
- state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
616
- name?: string | undefined;
617
- visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
618
- metadata?: {
619
- members: string[];
620
- } | undefined;
621
- description?: string | null | undefined;
622
- parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
623
615
  organization?: {
624
616
  id?: string | undefined;
625
617
  name?: string | undefined;
626
- size?: string | undefined;
627
- email?: string | null | undefined;
628
618
  avatar_path?: string | null | undefined;
629
619
  mission?: string | null | undefined;
620
+ size?: string | undefined;
621
+ email?: string | null | undefined;
630
622
  domain?: string | null | undefined;
631
623
  urls?: {
632
624
  value: string;
633
625
  }[] | null | undefined;
634
- base_role?: "none" | "admin" | "read" | "write" | undefined;
626
+ base_role?: "admin" | "read" | "write" | "none" | undefined;
635
627
  } | undefined;
636
- asset_type?: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
628
+ asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
629
+ metadata?: {
630
+ members: string[];
631
+ } | undefined;
632
+ name?: string | undefined;
633
+ visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
634
+ description?: string | null | undefined;
637
635
  parent_id?: string | null | undefined;
636
+ parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
638
637
  name_url_slug?: string | null | undefined;
639
638
  slug?: string | null | undefined;
640
639
  monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
@@ -645,6 +644,7 @@ declare const UpdateConversationSchema: z.ZodObject<{
645
644
  product_id?: string | null | undefined;
646
645
  price_id?: string | null | undefined;
647
646
  preview?: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
647
+ state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
648
648
  }>;
649
649
  declare const MessageSchema: z.ZodObject<{
650
650
  id: z.ZodString;
@@ -667,33 +667,33 @@ declare const MessageSchema: z.ZodObject<{
667
667
  metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
668
668
  }, "strip", z.ZodTypeAny, {
669
669
  id: string;
670
+ user_id: string;
671
+ created_at: string;
672
+ last_updated: string;
670
673
  text: string;
671
674
  json: {
672
675
  type: "doc";
673
676
  content: any[];
674
677
  };
675
- user_id: string;
676
- created_at: string;
677
- last_updated: string;
678
678
  conversation_id: string;
679
679
  viewers: string[];
680
680
  metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
681
681
  }, {
682
682
  id: string;
683
+ user_id: string;
684
+ created_at: string;
685
+ last_updated: string;
683
686
  text: string;
684
687
  json: {
685
688
  type: "doc";
686
689
  content: any[];
687
690
  };
688
- user_id: string;
689
- created_at: string;
690
- last_updated: string;
691
691
  conversation_id: string;
692
692
  viewers: string[];
693
693
  metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
694
694
  }>;
695
- type Conversation = z.infer<typeof ConversationSchema>;
696
- type CreateConversation = z.infer<typeof CreateConversationSchema>;
697
- type UpdateConversation = z.infer<typeof UpdateConversationSchema>;
698
- type Message = z.infer<typeof MessageSchema>;
699
- export { MessageSchema, UpdateConversationSchema, CreateConversationSchema, ConversationSchema, type Conversation, type CreateConversation, type UpdateConversation, type Message, };
695
+ export { MessageSchema, UpdateConversationSchema, CreateConversationSchema, ConversationSchema, };
696
+ export type Conversation = z.infer<typeof ConversationSchema>;
697
+ export type CreateConversation = z.infer<typeof CreateConversationSchema>;
698
+ export type UpdateConversation = z.infer<typeof UpdateConversationSchema>;
699
+ export type Message = z.infer<typeof MessageSchema>;
@@ -0,0 +1,2 @@
1
+ import{uuidv7 as t}from"uuidv7";import{z as i}from"zod";import{AssetTypeSchema as e,MonetizationSchema as a,VisibilitySchema as r}from"./common.esm.js";import{AssetSchema as d}from"./assets.esm.js";import{TipTapSchema as s}from"./posts.esm.js";const o=d.extend({metadata:i.object({members:i.array(i.string())}),asset_type:e.default("conversation")}),u=o.omit({org_id:!0,team_id:!0,user_id:!0,created_at:!0,last_updated:!0}).extend({id:i.string().uuid().default((()=>t())),org_id:i.string().uuid().default("00000000-0000-0000-0000-000000000000"),team_id:i.string().uuid().default("00000000-0000-0000-0000-000000000000"),monetization:a.default("none"),visibility:r.default("private")}),m=u.omit({id:!0,org_id:!0,team_id:!0,team:!0,user:!0}).partial(),n=i.object({id:i.string().uuid(),conversation_id:i.string().uuid(),user_id:i.string().uuid(),created_at:i.string().datetime(),last_updated:i.string().datetime(),viewers:i.array(i.string().uuid()),json:s,text:i.string(),metadata:i.object({}).passthrough().nullable().optional()});export{o as ConversationSchema,u as CreateConversationSchema,n as MessageSchema,m as UpdateConversationSchema};
2
+ //# sourceMappingURL=conversations.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversations.esm.js","sources":["../../src/schema/conversations.ts"],"sourcesContent":["import { uuidv7 } from \"uuidv7\";\nimport { z } from \"zod\";\n\nimport {\n AssetTypeSchema,\n MonetizationSchema,\n VisibilitySchema,\n} from \"./common\";\nimport { AssetSchema } from \"./assets\";\nimport { TipTapSchema } from \"./posts\";\n\nconst ConversationSchema = AssetSchema.extend({\n metadata: z.object({\n members: z.array(z.string()),\n }),\n asset_type: AssetTypeSchema.default(\"conversation\"),\n});\n\nconst CreateConversationSchema = ConversationSchema.omit({\n org_id: true,\n team_id: true,\n user_id: true,\n created_at: true,\n last_updated: true,\n}).extend({\n id: z\n .string()\n .uuid()\n .default(() => uuidv7()),\n org_id: z.string().uuid().default(\"00000000-0000-0000-0000-000000000000\"),\n team_id: z.string().uuid().default(\"00000000-0000-0000-0000-000000000000\"),\n monetization: MonetizationSchema.default(\"none\"),\n visibility: VisibilitySchema.default(\"private\"),\n});\n\n// Partial because we can make updates to conversations without providing all fields\nconst UpdateConversationSchema = CreateConversationSchema.omit({\n id: true,\n org_id: true,\n team_id: true,\n team: true,\n user: true,\n}).partial();\n\nconst MessageSchema = z.object({\n id: z.string().uuid(),\n conversation_id: z.string().uuid(),\n user_id: z.string().uuid(),\n created_at: z.string().datetime(),\n last_updated: z.string().datetime(),\n viewers: z.array(z.string().uuid()),\n json: TipTapSchema,\n text: z.string(),\n metadata: z.object({}).passthrough().nullable().optional(),\n});\n\nexport {\n MessageSchema,\n UpdateConversationSchema,\n CreateConversationSchema,\n ConversationSchema,\n};\nexport type Conversation = z.infer<typeof ConversationSchema>;\nexport type CreateConversation = z.infer<typeof CreateConversationSchema>;\nexport type UpdateConversation = z.infer<typeof UpdateConversationSchema>;\nexport type Message = z.infer<typeof MessageSchema>;\n"],"names":["ConversationSchema","AssetSchema","extend","metadata","z","object","members","array","string","asset_type","AssetTypeSchema","default","CreateConversationSchema","omit","org_id","team_id","user_id","created_at","last_updated","id","uuid","uuidv7","monetization","MonetizationSchema","visibility","VisibilitySchema","UpdateConversationSchema","team","user","partial","MessageSchema","conversation_id","datetime","viewers","json","TipTapSchema","text","passthrough","nullable","optional"],"mappings":"oPAWA,MAAMA,EAAqBC,EAAYC,OAAO,CAC5CC,SAAUC,EAAEC,OAAO,CACjBC,QAASF,EAAEG,MAAMH,EAAEI,YAErBC,WAAYC,EAAgBC,QAAQ,kBAGhCC,EAA2BZ,EAAmBa,KAAK,CACvDC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,YAAY,EACZC,cAAc,IACbhB,OAAO,CACRiB,GAAIf,EACDI,SACAY,OACAT,SAAQ,IAAMU,MACjBP,OAAQV,EAAEI,SAASY,OAAOT,QAAQ,wCAClCI,QAASX,EAAEI,SAASY,OAAOT,QAAQ,wCACnCW,aAAcC,EAAmBZ,QAAQ,QACzCa,WAAYC,EAAiBd,QAAQ,aAIjCe,EAA2Bd,EAAyBC,KAAK,CAC7DM,IAAI,EACJL,QAAQ,EACRC,SAAS,EACTY,MAAM,EACNC,MAAM,IACLC,UAEGC,EAAgB1B,EAAEC,OAAO,CAC7Bc,GAAIf,EAAEI,SAASY,OACfW,gBAAiB3B,EAAEI,SAASY,OAC5BJ,QAASZ,EAAEI,SAASY,OACpBH,WAAYb,EAAEI,SAASwB,WACvBd,aAAcd,EAAEI,SAASwB,WACzBC,QAAS7B,EAAEG,MAAMH,EAAEI,SAASY,QAC5Bc,KAAMC,EACNC,KAAMhC,EAAEI,SACRL,SAAUC,EAAEC,OAAO,CAAE,GAAEgC,cAAcC,WAAWC"}