rivet-design 0.26.0 → 0.26.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/bin/rivet.js +13 -0
  2. package/dist/agent-variants/WorkerExecutorService.d.ts +0 -2
  3. package/dist/agent-variants/WorkerExecutorService.js +0 -18
  4. package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js +0 -8
  5. package/dist/agent-variants/contracts.d.ts +1099 -4966
  6. package/dist/agent-variants/contracts.js +1 -121
  7. package/dist/agent-variants/index.d.ts +1 -1
  8. package/dist/agent-variants/variantsTelemetry.d.ts +0 -8
  9. package/dist/agent-variants/workItemInput.d.ts +464 -464
  10. package/dist/cli/commands/contextRequest.js +1 -1
  11. package/dist/cli/commands/guidanceReferences.d.ts +2 -2
  12. package/dist/cli/commands/guidanceVerifierPackage.d.ts +2 -2
  13. package/dist/cli/editorSession.d.ts +1 -13
  14. package/dist/cli/runtimeInterruption.d.ts +2 -16
  15. package/dist/config/pluginMetrics.js +0 -1
  16. package/dist/hosts/workerDefaults.d.ts +0 -11
  17. package/dist/hosts/workerDefaults.js +1 -30
  18. package/dist/index-core.d.ts +0 -1
  19. package/dist/index.js +1 -1
  20. package/dist/install/automaticCliUpdate.d.ts +1 -0
  21. package/dist/install/automaticCliUpdate.js +32 -22
  22. package/dist/install/channelCli.d.ts +1 -1
  23. package/dist/install/channelCli.js +11 -6
  24. package/dist/install/channelManager.d.ts +5 -2
  25. package/dist/install/globalBootstrap.d.ts +5 -3
  26. package/dist/install/globalBootstrap.js +21 -9
  27. package/dist/install/npmCommand.d.ts +15 -0
  28. package/dist/install/npmCommand.js +59 -0
  29. package/dist/routes/agentVariants.js +3 -14
  30. package/dist/routes/library/browserAccess.js +6 -2
  31. package/dist/routes/library/guidance.js +3 -1
  32. package/dist/routes/library/middleware.js +4 -4
  33. package/dist/routes/library/navigation.js +3 -1
  34. package/dist/routes/library/profiles.js +5 -5
  35. package/dist/routes/library/projects.js +17 -7
  36. package/dist/routes/library/referenceOnboarding.js +4 -2
  37. package/dist/routes/library/schemas.d.ts +2 -15
  38. package/dist/routes/telemetry.js +1 -1
  39. package/dist/routes/variantRequestSchema.d.ts +8 -8
  40. package/dist/routes/variantRequestSchema.js +7 -2
  41. package/dist/services/AuthService.d.ts +3 -56
  42. package/dist/services/AuthService.js +0 -28
  43. package/dist/services/ConfigManager.d.ts +0 -2
  44. package/dist/services/ConfigManager.js +0 -14
  45. package/dist/services/GuidanceVerifierRunner.js +13 -2
  46. package/dist/services/HubDiscovery.d.ts +1 -9
  47. package/dist/services/IntegrationsClient.d.ts +16 -16
  48. package/dist/services/MCPOnboardingTelemetry.d.ts +0 -14
  49. package/dist/services/MCPOnboardingTelemetry.js +0 -62
  50. package/dist/services/ProjectRegistry.d.ts +5 -24
  51. package/dist/services/TelemetryService.d.ts +1 -62
  52. package/dist/services/TelemetryService.js +0 -113
  53. package/dist/services/TreeStore.d.ts +0 -2
  54. package/dist/services/TreeStore.js +0 -24
  55. package/dist/services/profiles/DesignProfiles.d.ts +180 -125
  56. package/dist/services/profiles/ProfilePlanning.d.ts +38 -38
  57. package/dist/services/profiles/ReferenceReader.d.ts +14 -14
  58. package/dist/services/profiles/modelContract.js +4 -4
  59. package/dist/storage/library/ProjectPreviewCache.d.ts +1 -13
  60. package/dist/storage/profiles/ProfilePlans.d.ts +137 -137
  61. package/dist/storage/profiles/ProfileRecords.d.ts +62 -37
  62. package/dist/storage/profiles/planSchema.d.ts +40 -40
  63. package/dist/storage/profiles/schema.d.ts +16 -16
  64. package/dist/types/api-responses.d.ts +174 -0
  65. package/dist/types/api-responses.js +108 -0
  66. package/dist/types/cosmos-profile.d.ts +17 -105
  67. package/dist/types/cosmos.d.ts +48 -266
  68. package/dist/types/design-library.d.ts +230 -61
  69. package/dist/types/design-library.js +38 -1
  70. package/dist/types/design-profile.d.ts +220 -529
  71. package/dist/types/design-profile.js +5 -1
  72. package/dist/types/guidance-references.d.ts +68 -316
  73. package/dist/types/guidance-verifier.d.ts +103 -197
  74. package/dist/types/guidance-verifier.js +36 -13
  75. package/dist/types/guidance.d.ts +182 -1643
  76. package/dist/types/guidance.js +4 -1
  77. package/dist/types/project-library.d.ts +60 -30
  78. package/dist/types/project-library.js +32 -1
  79. package/dist/types/reference-connectors.d.ts +38 -162
  80. package/dist/types/reference-onboarding.d.ts +144 -878
  81. package/dist/types/reference-pages.d.ts +27 -139
  82. package/dist/types/x-bookmarks.d.ts +40 -296
  83. package/dist/utils/displayLocale.d.ts +0 -1
  84. package/dist/utils/displayLocale.js +1 -3
  85. package/dist/utils/skills/cli-guidance.d.ts +1 -1
  86. package/dist/utils/skills/cli-guidance.js +2 -2
  87. package/package.json +4 -4
  88. package/src/ui/dist/assets/LibraryEntry-92R_T-Xa.js +37 -0
  89. package/src/ui/dist/assets/main-D0UmAaUe.css +1 -0
  90. package/src/ui/dist/assets/main-DgEfJvYu.js +497 -0
  91. package/src/ui/dist/index.html +2 -2
  92. package/dist/types/change-types.d.ts +0 -66
  93. package/dist/types/change-types.js +0 -3
  94. package/src/ui/dist/assets/LibraryEntry-CFkd6v_O.js +0 -37
  95. package/src/ui/dist/assets/main-B_jie9r3.js +0 -439
  96. package/src/ui/dist/assets/main-W3oTuTTl.css +0 -1
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VariantsUiStateUpdateSchema = exports.VariantsUiStateResponseSchema = exports.VariantsUiStateSchema = exports.AccountResponseSchema = exports.ReferenceImportPlanSummarySchema = exports.ReferenceProfileStatusResponseSchema = exports.NavigationAcknowledgementResponseSchema = exports.ViewNavigationsResponseSchema = exports.ViewNavigationSchema = exports.DirectionUpdateResponseSchema = exports.DirectionPreviewResponseSchema = exports.ProjectRuntimeResponseSchema = exports.FolderSelectionResponseSchema = exports.LibraryProjectPreviewResponseSchema = exports.LibraryProjectRemovalResponseSchema = exports.LibraryProjectResponseSchema = exports.LibraryProjectListResponseSchema = exports.LibraryViewLaunchResponseSchema = exports.BrowserSessionResponseSchema = exports.SupportTicketErrorResponseSchema = exports.VariantsErrorResponseSchema = exports.ErrorResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const design_profile_1 = require("./design-profile");
6
+ const project_library_1 = require("./project-library");
7
+ exports.ErrorResponseSchema = zod_1.z.object({ error: zod_1.z.string() });
8
+ exports.VariantsErrorResponseSchema = zod_1.z.object({
9
+ errorCode: zod_1.z.string(),
10
+ message: zod_1.z.string(),
11
+ });
12
+ exports.SupportTicketErrorResponseSchema = zod_1.z.object({
13
+ error: zod_1.z.string().optional(),
14
+ details: zod_1.z
15
+ .union([
16
+ zod_1.z.string(),
17
+ zod_1.z.object({
18
+ formErrors: zod_1.z.array(zod_1.z.string()).optional(),
19
+ fieldErrors: zod_1.z
20
+ .record(zod_1.z.string(), zod_1.z.array(zod_1.z.string()).optional())
21
+ .optional(),
22
+ }),
23
+ ])
24
+ .optional(),
25
+ });
26
+ exports.BrowserSessionResponseSchema = zod_1.z.object({
27
+ token: zod_1.z.string().min(1),
28
+ });
29
+ exports.LibraryViewLaunchResponseSchema = zod_1.z.object({
30
+ url: zod_1.z.string().url(),
31
+ });
32
+ exports.LibraryProjectListResponseSchema = zod_1.z.object({
33
+ projects: zod_1.z.array(project_library_1.LibraryProjectSchema),
34
+ });
35
+ exports.LibraryProjectResponseSchema = zod_1.z.object({
36
+ project: project_library_1.LibraryProjectSchema,
37
+ });
38
+ exports.LibraryProjectRemovalResponseSchema = zod_1.z.object({
39
+ projectId: zod_1.z.string(),
40
+ });
41
+ exports.LibraryProjectPreviewResponseSchema = zod_1.z.object({
42
+ preview: project_library_1.LibraryProjectPreviewSchema.nullable(),
43
+ });
44
+ exports.FolderSelectionResponseSchema = zod_1.z.object({
45
+ projectPath: zod_1.z.string().nullable(),
46
+ });
47
+ exports.ProjectRuntimeResponseSchema = zod_1.z.object({
48
+ editorUrl: zod_1.z.string(),
49
+ });
50
+ exports.DirectionPreviewResponseSchema = zod_1.z.object({ url: zod_1.z.string() });
51
+ exports.DirectionUpdateResponseSchema = zod_1.z.object({
52
+ saved: zod_1.z.literal(true),
53
+ });
54
+ exports.ViewNavigationSchema = zod_1.z.object({
55
+ requestId: zod_1.z.string(),
56
+ sequence: zod_1.z.number(),
57
+ projectId: zod_1.z.string().optional(),
58
+ sessionId: zod_1.z.string().optional(),
59
+ variantId: zod_1.z.string().optional(),
60
+ });
61
+ exports.ViewNavigationsResponseSchema = zod_1.z.object({
62
+ navigations: zod_1.z.array(exports.ViewNavigationSchema),
63
+ });
64
+ exports.NavigationAcknowledgementResponseSchema = zod_1.z.object({
65
+ acknowledged: zod_1.z.boolean(),
66
+ });
67
+ exports.ReferenceProfileStatusResponseSchema = zod_1.z.object({
68
+ profile: zod_1.z.object({ isEnabled: zod_1.z.boolean() }),
69
+ sources: zod_1.z.array(zod_1.z.object({
70
+ provider: design_profile_1.ProfileProviderSchema,
71
+ title: zod_1.z.string(),
72
+ url: zod_1.z.string().nullable(),
73
+ })),
74
+ });
75
+ exports.ReferenceImportPlanSummarySchema = zod_1.z.object({
76
+ id: zod_1.z.string(),
77
+ revision: zod_1.z.string(),
78
+ collectionCount: zod_1.z.number(),
79
+ referenceCount: zod_1.z.number(),
80
+ imageCount: zod_1.z.number(),
81
+ reusableCount: zod_1.z.number(),
82
+ unsupportedCount: zod_1.z.number(),
83
+ scopeDisclosure: zod_1.z.string(),
84
+ usageDisclosure: zod_1.z.string(),
85
+ });
86
+ exports.AccountResponseSchema = zod_1.z.object({
87
+ isAuthenticated: zod_1.z.boolean(),
88
+ email: zod_1.z.string().optional(),
89
+ name: zod_1.z.string().optional(),
90
+ userId: zod_1.z.string().optional(),
91
+ });
92
+ const VariantsUiStateKeySchema = zod_1.z.string().min(1).max(500);
93
+ exports.VariantsUiStateSchema = zod_1.z.object({
94
+ pinned: zod_1.z.array(VariantsUiStateKeySchema).max(1000),
95
+ order: zod_1.z.object({
96
+ groups: zod_1.z.array(VariantsUiStateKeySchema).max(1000),
97
+ rows: zod_1.z.record(zod_1.z.string(), zod_1.z.array(VariantsUiStateKeySchema).max(1000)),
98
+ }),
99
+ });
100
+ exports.VariantsUiStateResponseSchema = zod_1.z.object({
101
+ projectPath: zod_1.z.string(),
102
+ uiState: exports.VariantsUiStateSchema,
103
+ });
104
+ exports.VariantsUiStateUpdateSchema = zod_1.z.object({
105
+ uiState: exports.VariantsUiStateSchema,
106
+ projectPath: zod_1.z.string().optional(),
107
+ });
108
+ //# sourceMappingURL=api-responses.js.map
@@ -1,126 +1,38 @@
1
1
  import { z } from 'zod';
2
2
  export declare const CosmosProfileSchema: z.ZodObject<{
3
- id: z.ZodEffects<z.ZodString, string, string>;
3
+ id: z.ZodString;
4
4
  username: z.ZodString;
5
5
  title: z.ZodString;
6
- url: z.ZodEffects<z.ZodString, string, string>;
7
- }, "strip", z.ZodTypeAny, {
8
- url: string;
9
- title: string;
10
- id: string;
11
- username: string;
12
- }, {
13
- url: string;
14
- title: string;
15
- id: string;
16
- username: string;
17
- }>;
6
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
7
+ }, z.core.$strip>;
18
8
  export declare const CosmosProfileCollectionSchema: z.ZodObject<{
19
- id: z.ZodEffects<z.ZodString, string, string>;
9
+ id: z.ZodString;
20
10
  title: z.ZodString;
21
11
  description: z.ZodNullable<z.ZodString>;
22
- url: z.ZodEffects<z.ZodString, string, string>;
12
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
23
13
  total: z.ZodNumber;
24
- parentId: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
25
- children: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
26
- }, "strip", z.ZodTypeAny, {
27
- description: string | null;
28
- url: string;
29
- title: string;
30
- id: string;
31
- children: string[];
32
- total: number;
33
- parentId: string | null;
34
- }, {
35
- description: string | null;
36
- url: string;
37
- title: string;
38
- id: string;
39
- children: string[];
40
- total: number;
41
- parentId: string | null;
42
- }>;
14
+ parentId: z.ZodNullable<z.ZodString>;
15
+ children: z.ZodArray<z.ZodString>;
16
+ }, z.core.$strip>;
43
17
  export declare const CosmosProfilePageSchema: z.ZodObject<{
44
18
  profile: z.ZodObject<{
45
- id: z.ZodEffects<z.ZodString, string, string>;
19
+ id: z.ZodString;
46
20
  username: z.ZodString;
47
21
  title: z.ZodString;
48
- url: z.ZodEffects<z.ZodString, string, string>;
49
- }, "strip", z.ZodTypeAny, {
50
- url: string;
51
- title: string;
52
- id: string;
53
- username: string;
54
- }, {
55
- url: string;
56
- title: string;
57
- id: string;
58
- username: string;
59
- }>;
22
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
23
+ }, z.core.$strip>;
60
24
  collections: z.ZodArray<z.ZodObject<{
61
- id: z.ZodEffects<z.ZodString, string, string>;
25
+ id: z.ZodString;
62
26
  title: z.ZodString;
63
27
  description: z.ZodNullable<z.ZodString>;
64
- url: z.ZodEffects<z.ZodString, string, string>;
28
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
65
29
  total: z.ZodNumber;
66
- parentId: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
67
- children: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
68
- }, "strip", z.ZodTypeAny, {
69
- description: string | null;
70
- url: string;
71
- title: string;
72
- id: string;
73
- children: string[];
74
- total: number;
75
- parentId: string | null;
76
- }, {
77
- description: string | null;
78
- url: string;
79
- title: string;
80
- id: string;
81
- children: string[];
82
- total: number;
83
- parentId: string | null;
84
- }>, "many">;
30
+ parentId: z.ZodNullable<z.ZodString>;
31
+ children: z.ZodArray<z.ZodString>;
32
+ }, z.core.$strip>>;
85
33
  total: z.ZodNumber;
86
34
  nextCursor: z.ZodNullable<z.ZodString>;
87
- }, "strip", z.ZodTypeAny, {
88
- total: number;
89
- nextCursor: string | null;
90
- collections: {
91
- description: string | null;
92
- url: string;
93
- title: string;
94
- id: string;
95
- children: string[];
96
- total: number;
97
- parentId: string | null;
98
- }[];
99
- profile: {
100
- url: string;
101
- title: string;
102
- id: string;
103
- username: string;
104
- };
105
- }, {
106
- total: number;
107
- nextCursor: string | null;
108
- collections: {
109
- description: string | null;
110
- url: string;
111
- title: string;
112
- id: string;
113
- children: string[];
114
- total: number;
115
- parentId: string | null;
116
- }[];
117
- profile: {
118
- url: string;
119
- title: string;
120
- id: string;
121
- username: string;
122
- };
123
- }>;
35
+ }, z.core.$strip>;
124
36
  export type CosmosProfilePage = z.infer<typeof CosmosProfilePageSchema>;
125
37
  export interface CosmosDiscoveryInput {
126
38
  url: string;
@@ -1,36 +1,26 @@
1
1
  import { z } from 'zod';
2
- export declare const CosmosIdSchema: z.ZodEffects<z.ZodString, string, string>;
2
+ export declare const CosmosIdSchema: z.ZodString;
3
3
  export declare const CosmosCursorSchema: z.ZodString;
4
4
  export declare const parseCosmosProfileUrl: (value: string) => {
5
5
  username: string;
6
6
  url: string;
7
7
  };
8
- export declare const CosmosProfileUrlSchema: z.ZodEffects<z.ZodString, string, string>;
8
+ export declare const CosmosProfileUrlSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
9
9
  export declare const parseCosmosUrl: (value: string) => {
10
10
  ownerUsername: string;
11
11
  slug: string;
12
12
  subcollectionSlug: string;
13
13
  url: string;
14
14
  };
15
- export declare const CosmosMediaUrlSchema: z.ZodEffects<z.ZodString, string, string>;
15
+ export declare const CosmosMediaUrlSchema: z.ZodString;
16
16
  export declare const CosmosCollectionSchema: z.ZodObject<{
17
- id: z.ZodEffects<z.ZodString, string, string>;
17
+ id: z.ZodString;
18
18
  title: z.ZodString;
19
- url: z.ZodEffects<z.ZodString, string, string>;
20
- children: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
21
- }, "strip", z.ZodTypeAny, {
22
- url: string;
23
- title: string;
24
- id: string;
25
- children: string[];
26
- }, {
27
- url: string;
28
- title: string;
29
- id: string;
30
- children: string[];
31
- }>;
19
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
20
+ children: z.ZodArray<z.ZodString>;
21
+ }, z.core.$strip>;
32
22
  export declare const CosmosElementSchema: z.ZodObject<{
33
- id: z.ZodEffects<z.ZodString, string, string>;
23
+ id: z.ZodString;
34
24
  url: z.ZodString;
35
25
  title: z.ZodString;
36
26
  text: z.ZodString;
@@ -38,62 +28,23 @@ export declare const CosmosElementSchema: z.ZodObject<{
38
28
  owner: z.ZodNullable<z.ZodString>;
39
29
  sourceUrl: z.ZodNullable<z.ZodString>;
40
30
  images: z.ZodArray<z.ZodObject<{
41
- url: z.ZodEffects<z.ZodString, string, string>;
42
- representation: z.ZodEnum<["image", "video-cover"]>;
43
- }, "strip", z.ZodTypeAny, {
44
- url: string;
45
- representation: "image" | "video-cover";
46
- }, {
47
- url: string;
48
- representation: "image" | "video-cover";
49
- }>, "many">;
31
+ url: z.ZodString;
32
+ representation: z.ZodEnum<{
33
+ image: "image";
34
+ "video-cover": "video-cover";
35
+ }>;
36
+ }, z.core.$strip>>;
50
37
  unsupportedReason: z.ZodOptional<z.ZodString>;
51
- }, "strip", z.ZodTypeAny, {
52
- url: string;
53
- title: string;
54
- text: string;
55
- id: string;
56
- images: {
57
- url: string;
58
- representation: "image" | "video-cover";
59
- }[];
60
- author: string | null;
61
- owner: string | null;
62
- sourceUrl: string | null;
63
- unsupportedReason?: string | undefined;
64
- }, {
65
- url: string;
66
- title: string;
67
- text: string;
68
- id: string;
69
- images: {
70
- url: string;
71
- representation: "image" | "video-cover";
72
- }[];
73
- author: string | null;
74
- owner: string | null;
75
- sourceUrl: string | null;
76
- unsupportedReason?: string | undefined;
77
- }>;
38
+ }, z.core.$strip>;
78
39
  export declare const CosmosPageSchema: z.ZodObject<{
79
40
  collection: z.ZodObject<{
80
- id: z.ZodEffects<z.ZodString, string, string>;
41
+ id: z.ZodString;
81
42
  title: z.ZodString;
82
- url: z.ZodEffects<z.ZodString, string, string>;
83
- children: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
84
- }, "strip", z.ZodTypeAny, {
85
- url: string;
86
- title: string;
87
- id: string;
88
- children: string[];
89
- }, {
90
- url: string;
91
- title: string;
92
- id: string;
93
- children: string[];
94
- }>;
43
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
44
+ children: z.ZodArray<z.ZodString>;
45
+ }, z.core.$strip>;
95
46
  elements: z.ZodArray<z.ZodObject<{
96
- id: z.ZodEffects<z.ZodString, string, string>;
47
+ id: z.ZodString;
97
48
  url: z.ZodString;
98
49
  title: z.ZodString;
99
50
  text: z.ZodString;
@@ -101,111 +52,26 @@ export declare const CosmosPageSchema: z.ZodObject<{
101
52
  owner: z.ZodNullable<z.ZodString>;
102
53
  sourceUrl: z.ZodNullable<z.ZodString>;
103
54
  images: z.ZodArray<z.ZodObject<{
104
- url: z.ZodEffects<z.ZodString, string, string>;
105
- representation: z.ZodEnum<["image", "video-cover"]>;
106
- }, "strip", z.ZodTypeAny, {
107
- url: string;
108
- representation: "image" | "video-cover";
109
- }, {
110
- url: string;
111
- representation: "image" | "video-cover";
112
- }>, "many">;
55
+ url: z.ZodString;
56
+ representation: z.ZodEnum<{
57
+ image: "image";
58
+ "video-cover": "video-cover";
59
+ }>;
60
+ }, z.core.$strip>>;
113
61
  unsupportedReason: z.ZodOptional<z.ZodString>;
114
- }, "strip", z.ZodTypeAny, {
115
- url: string;
116
- title: string;
117
- text: string;
118
- id: string;
119
- images: {
120
- url: string;
121
- representation: "image" | "video-cover";
122
- }[];
123
- author: string | null;
124
- owner: string | null;
125
- sourceUrl: string | null;
126
- unsupportedReason?: string | undefined;
127
- }, {
128
- url: string;
129
- title: string;
130
- text: string;
131
- id: string;
132
- images: {
133
- url: string;
134
- representation: "image" | "video-cover";
135
- }[];
136
- author: string | null;
137
- owner: string | null;
138
- sourceUrl: string | null;
139
- unsupportedReason?: string | undefined;
140
- }>, "many">;
62
+ }, z.core.$strip>>;
141
63
  total: z.ZodNumber;
142
64
  nextCursor: z.ZodNullable<z.ZodString>;
143
- }, "strip", z.ZodTypeAny, {
144
- collection: {
145
- url: string;
146
- title: string;
147
- id: string;
148
- children: string[];
149
- };
150
- elements: {
151
- url: string;
152
- title: string;
153
- text: string;
154
- id: string;
155
- images: {
156
- url: string;
157
- representation: "image" | "video-cover";
158
- }[];
159
- author: string | null;
160
- owner: string | null;
161
- sourceUrl: string | null;
162
- unsupportedReason?: string | undefined;
163
- }[];
164
- total: number;
165
- nextCursor: string | null;
166
- }, {
167
- collection: {
168
- url: string;
169
- title: string;
170
- id: string;
171
- children: string[];
172
- };
173
- elements: {
174
- url: string;
175
- title: string;
176
- text: string;
177
- id: string;
178
- images: {
179
- url: string;
180
- representation: "image" | "video-cover";
181
- }[];
182
- author: string | null;
183
- owner: string | null;
184
- sourceUrl: string | null;
185
- unsupportedReason?: string | undefined;
186
- }[];
187
- total: number;
188
- nextCursor: string | null;
189
- }>;
190
- export declare const CosmosResultSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
65
+ }, z.core.$strip>;
66
+ export declare const CosmosResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
191
67
  collection: z.ZodObject<{
192
- id: z.ZodEffects<z.ZodString, string, string>;
68
+ id: z.ZodString;
193
69
  title: z.ZodString;
194
- url: z.ZodEffects<z.ZodString, string, string>;
195
- children: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
196
- }, "strip", z.ZodTypeAny, {
197
- url: string;
198
- title: string;
199
- id: string;
200
- children: string[];
201
- }, {
202
- url: string;
203
- title: string;
204
- id: string;
205
- children: string[];
206
- }>;
70
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
71
+ children: z.ZodArray<z.ZodString>;
72
+ }, z.core.$strip>;
207
73
  elements: z.ZodArray<z.ZodObject<{
208
- id: z.ZodEffects<z.ZodString, string, string>;
74
+ id: z.ZodString;
209
75
  url: z.ZodString;
210
76
  title: z.ZodString;
211
77
  text: z.ZodString;
@@ -213,111 +79,27 @@ export declare const CosmosResultSchema: z.ZodDiscriminatedUnion<"status", [z.Zo
213
79
  owner: z.ZodNullable<z.ZodString>;
214
80
  sourceUrl: z.ZodNullable<z.ZodString>;
215
81
  images: z.ZodArray<z.ZodObject<{
216
- url: z.ZodEffects<z.ZodString, string, string>;
217
- representation: z.ZodEnum<["image", "video-cover"]>;
218
- }, "strip", z.ZodTypeAny, {
219
- url: string;
220
- representation: "image" | "video-cover";
221
- }, {
222
- url: string;
223
- representation: "image" | "video-cover";
224
- }>, "many">;
82
+ url: z.ZodString;
83
+ representation: z.ZodEnum<{
84
+ image: "image";
85
+ "video-cover": "video-cover";
86
+ }>;
87
+ }, z.core.$strip>>;
225
88
  unsupportedReason: z.ZodOptional<z.ZodString>;
226
- }, "strip", z.ZodTypeAny, {
227
- url: string;
228
- title: string;
229
- text: string;
230
- id: string;
231
- images: {
232
- url: string;
233
- representation: "image" | "video-cover";
234
- }[];
235
- author: string | null;
236
- owner: string | null;
237
- sourceUrl: string | null;
238
- unsupportedReason?: string | undefined;
239
- }, {
240
- url: string;
241
- title: string;
242
- text: string;
243
- id: string;
244
- images: {
245
- url: string;
246
- representation: "image" | "video-cover";
247
- }[];
248
- author: string | null;
249
- owner: string | null;
250
- sourceUrl: string | null;
251
- unsupportedReason?: string | undefined;
252
- }>, "many">;
89
+ }, z.core.$strip>>;
253
90
  total: z.ZodNumber;
254
91
  nextCursor: z.ZodNullable<z.ZodString>;
255
- } & {
256
92
  status: z.ZodLiteral<"ok">;
257
- }, "strip", z.ZodTypeAny, {
258
- status: "ok";
259
- collection: {
260
- url: string;
261
- title: string;
262
- id: string;
263
- children: string[];
264
- };
265
- elements: {
266
- url: string;
267
- title: string;
268
- text: string;
269
- id: string;
270
- images: {
271
- url: string;
272
- representation: "image" | "video-cover";
273
- }[];
274
- author: string | null;
275
- owner: string | null;
276
- sourceUrl: string | null;
277
- unsupportedReason?: string | undefined;
278
- }[];
279
- total: number;
280
- nextCursor: string | null;
281
- }, {
282
- status: "ok";
283
- collection: {
284
- url: string;
285
- title: string;
286
- id: string;
287
- children: string[];
288
- };
289
- elements: {
290
- url: string;
291
- title: string;
292
- text: string;
293
- id: string;
294
- images: {
295
- url: string;
296
- representation: "image" | "video-cover";
297
- }[];
298
- author: string | null;
299
- owner: string | null;
300
- sourceUrl: string | null;
301
- unsupportedReason?: string | undefined;
302
- }[];
303
- total: number;
304
- nextCursor: string | null;
305
- }>, z.ZodObject<{
93
+ }, z.core.$strip>, z.ZodObject<{
306
94
  status: z.ZodLiteral<"error">;
307
95
  message: z.ZodString;
308
- reason: z.ZodOptional<z.ZodEnum<["rate_limited", "provider_unavailable", "collection_unavailable"]>>;
96
+ reason: z.ZodOptional<z.ZodEnum<{
97
+ rate_limited: "rate_limited";
98
+ provider_unavailable: "provider_unavailable";
99
+ collection_unavailable: "collection_unavailable";
100
+ }>>;
309
101
  retryAfterMs: z.ZodOptional<z.ZodNumber>;
310
- }, "strip", z.ZodTypeAny, {
311
- message: string;
312
- status: "error";
313
- reason?: "rate_limited" | "provider_unavailable" | "collection_unavailable" | undefined;
314
- retryAfterMs?: number | undefined;
315
- }, {
316
- message: string;
317
- status: "error";
318
- reason?: "rate_limited" | "provider_unavailable" | "collection_unavailable" | undefined;
319
- retryAfterMs?: number | undefined;
320
- }>]>;
102
+ }, z.core.$strip>], "status">;
321
103
  export type CosmosPage = z.infer<typeof CosmosPageSchema>;
322
104
  export type CosmosResult = z.infer<typeof CosmosResultSchema>;
323
105
  export type CosmosElement = z.infer<typeof CosmosElementSchema>;