@tscircuit/fake-snippets 0.0.108 → 0.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/bun-formatcheck.yml +2 -2
- package/.github/workflows/bun-pver-release.yml +3 -3
- package/.github/workflows/bun-test.yml +1 -1
- package/.github/workflows/bun-typecheck.yml +2 -2
- package/.github/workflows/update-snapshots.yml +1 -1
- package/README.md +4 -0
- package/api/generated-index.js +37 -3
- package/biome.json +2 -1
- package/bun-tests/fake-snippets-api/fixtures/get-test-server.ts +31 -3
- package/bun-tests/fake-snippets-api/fixtures/preload.ts +18 -0
- package/bun-tests/fake-snippets-api/routes/orgs/add_member.test.ts +26 -0
- package/bun-tests/fake-snippets-api/routes/orgs/create.test.ts +37 -0
- package/bun-tests/fake-snippets-api/routes/orgs/get.test.ts +52 -0
- package/bun-tests/fake-snippets-api/routes/orgs/list.test.ts +17 -0
- package/bun-tests/fake-snippets-api/routes/orgs/list_members.test.ts +23 -0
- package/bun-tests/fake-snippets-api/routes/orgs/remove_member.test.ts +81 -0
- package/bun-tests/fake-snippets-api/routes/orgs/update.test.ts +99 -0
- package/bun-tests/fake-snippets-api/routes/package_builds/get.test.ts +1 -1
- package/bun-tests/fake-snippets-api/routes/package_files/create.test.ts +15 -13
- package/bun-tests/fake-snippets-api/routes/package_files/create_or_update.test.ts +26 -24
- package/bun-tests/fake-snippets-api/routes/package_files/delete.test.ts +9 -9
- package/bun-tests/fake-snippets-api/routes/package_files/download.test.ts +4 -4
- package/bun-tests/fake-snippets-api/routes/package_files/get.test.ts +38 -28
- package/bun-tests/fake-snippets-api/routes/package_files/list.test.ts +23 -15
- package/bun-tests/fake-snippets-api/routes/package_releases/create.test.ts +33 -0
- package/bun-tests/fake-snippets-api/routes/package_releases/get.test.ts +4 -4
- package/bun-tests/fake-snippets-api/routes/package_releases/get_image_generation_fields.test.ts +38 -0
- package/bun-tests/fake-snippets-api/routes/packages/create.test.ts +19 -0
- package/bun-tests/fake-snippets-api/routes/packages/fork.test.ts +3 -4
- package/bun-tests/fake-snippets-api/routes/packages/get.test.ts +30 -0
- package/bun-tests/fake-snippets-api/routes/packages/images.test.ts +4 -2
- package/bun-tests/fake-snippets-api/routes/packages/list-1.test.ts +34 -0
- package/bun.lock +389 -450
- package/bunfig.toml +2 -1
- package/dist/bundle.js +1255 -625
- package/dist/index.d.ts +296 -4
- package/dist/index.js +325 -24
- package/dist/schema.d.ts +282 -1
- package/dist/schema.js +54 -2
- package/fake-snippets-api/lib/db/autoload-dev-packages.ts +31 -20
- package/fake-snippets-api/lib/db/db-client.ts +214 -3
- package/fake-snippets-api/lib/db/schema.ts +62 -0
- package/fake-snippets-api/lib/db/seed.ts +100 -0
- package/fake-snippets-api/lib/middleware/with-session-auth.ts +1 -1
- package/fake-snippets-api/lib/package_file/get-package-file-id-from-file-descriptor.ts +2 -2
- package/fake-snippets-api/lib/public-mapping/public-map-org.ts +32 -0
- package/fake-snippets-api/lib/public-mapping/public-map-package-build.ts +10 -0
- package/fake-snippets-api/lib/public-mapping/public-map-package-release.ts +17 -0
- package/fake-snippets-api/routes/api/orgs/add_member.ts +52 -0
- package/fake-snippets-api/routes/api/orgs/create.ts +46 -0
- package/fake-snippets-api/routes/api/orgs/get.ts +39 -0
- package/fake-snippets-api/routes/api/orgs/list.ts +31 -0
- package/fake-snippets-api/routes/api/orgs/list_members.ts +67 -0
- package/fake-snippets-api/routes/api/orgs/remove_member.ts +46 -0
- package/fake-snippets-api/routes/api/orgs/update.ts +93 -0
- package/fake-snippets-api/routes/api/package_files/get.ts +3 -6
- package/fake-snippets-api/routes/api/package_files/list.ts +7 -4
- package/fake-snippets-api/routes/api/packages/create.ts +54 -10
- package/fake-snippets-api/routes/api/packages/get.ts +23 -0
- package/fake-snippets-api/routes/api/packages/images/[owner_github_username]/[unscoped_name]/[view_format].ts +13 -11
- package/fake-snippets-api/routes/api/packages/list.ts +29 -2
- package/fake-snippets-api/routes/api/packages/update_ai_description.ts +37 -0
- package/package.json +27 -24
- package/renovate.json +1 -1
- package/scripts/generate-sitemap.ts +1 -1
- package/src/App.tsx +29 -10
- package/src/ContextProviders.tsx +25 -2
- package/src/components/CircuitJsonImportDialog.tsx +1 -1
- package/src/components/CmdKMenu.tsx +281 -247
- package/src/components/DownloadButtonAndMenu.tsx +133 -36
- package/src/components/FileSidebar.tsx +41 -50
- package/src/components/Footer.tsx +8 -10
- package/src/components/Header.tsx +19 -32
- package/src/components/Header2.tsx +16 -32
- package/src/components/HeaderDropdown.tsx +13 -8
- package/src/components/HeaderLogin.tsx +44 -16
- package/src/components/HiddenFilesDropdown.tsx +0 -2
- package/src/components/NotFound.tsx +5 -5
- package/src/components/PackageBreadcrumb.tsx +6 -12
- package/src/components/PackageCard.tsx +0 -1
- package/src/components/PackageSearchResults.tsx +1 -1
- package/src/components/PrefetchPageLink.tsx +7 -1
- package/src/components/ProfileRouter.tsx +32 -0
- package/src/components/SearchComponent.tsx +12 -8
- package/src/components/UserCard.tsx +80 -0
- package/src/components/ViewPackagePage/components/ShikiCodeViewer.tsx +20 -11
- package/src/components/ViewPackagePage/components/build-status.tsx +1 -1
- package/src/components/ViewPackagePage/components/important-files-view.tsx +174 -87
- package/src/components/ViewPackagePage/components/main-content-header.tsx +8 -4
- package/src/components/ViewPackagePage/components/main-content-view-selector.tsx +1 -2
- package/src/components/ViewPackagePage/components/mobile-sidebar.tsx +54 -20
- package/src/components/ViewPackagePage/components/package-header.tsx +26 -37
- package/src/components/ViewPackagePage/components/preview-image-squares.tsx +11 -19
- package/src/components/ViewPackagePage/components/repo-page-content.tsx +33 -25
- package/src/components/ViewPackagePage/components/sidebar-about-section.tsx +16 -10
- package/src/components/ViewPackagePage/components/sidebar-releases-section.tsx +11 -11
- package/src/components/ViewPackagePage/components/sidebar.tsx +0 -2
- package/src/components/ViewPackagePage/components/tab-views/files-view.tsx +18 -17
- package/src/components/ViewPackagePage/components/tab-views/pcb-view.tsx +1 -2
- package/src/components/ViewPackagePage/components/tab-views/schematic-view.tsx +2 -1
- package/src/components/ViewPackagePage/components/theme-toggle.tsx +0 -2
- package/src/components/ViewPackagePage/hooks/use-toast.tsx +0 -1
- package/src/components/dialogs/GitHubRepositorySelector.tsx +56 -49
- package/src/components/dialogs/edit-package-details-dialog.tsx +5 -6
- package/src/components/dialogs/import-component-dialog.tsx +16 -9
- package/src/components/dialogs/import-package-dialog.tsx +3 -2
- package/src/components/dialogs/new-package-save-prompt-dialog.tsx +190 -0
- package/src/components/organization/OrganizationCard.tsx +204 -0
- package/src/components/organization/OrganizationCardSkeleton.tsx +55 -0
- package/src/components/organization/OrganizationHeader.tsx +154 -0
- package/src/components/organization/OrganizationMembers.tsx +146 -0
- package/src/components/package-port/CodeAndPreview.tsx +32 -46
- package/src/components/package-port/CodeEditor.tsx +28 -31
- package/src/components/package-port/CodeEditorHeader.tsx +128 -63
- package/src/components/package-port/EditorNav.tsx +32 -49
- package/src/components/preview/ConnectedPackagesList.tsx +8 -8
- package/src/components/preview/ConnectedRepoOverview.tsx +102 -2
- package/src/components/preview/PackageReleasesDashboard.tsx +53 -36
- package/src/components/ui/tree-view.tsx +6 -3
- package/src/hooks/use-add-org-member-mutation.ts +51 -0
- package/src/hooks/use-create-org-mutation.ts +38 -0
- package/src/hooks/use-create-package-mutation.ts +3 -0
- package/src/hooks/use-current-package-id.ts +5 -30
- package/src/hooks/use-current-package-info.ts +29 -5
- package/src/hooks/use-current-package-release.ts +4 -3
- package/src/hooks/use-download-zip.ts +2 -2
- package/src/hooks/use-global-store.ts +6 -4
- package/src/hooks/use-jlcpcb-component-import.tsx +164 -0
- package/src/hooks/use-list-org-members.ts +27 -0
- package/src/hooks/use-list-user-orgs.ts +25 -0
- package/src/hooks/use-org-by-github-handle.ts +26 -0
- package/src/hooks/use-org.ts +24 -0
- package/src/hooks/use-organization.ts +42 -0
- package/src/hooks/use-package-as-snippet.ts +4 -2
- package/src/hooks/use-package-builds.ts +6 -2
- package/src/hooks/use-package-files.ts +5 -3
- package/src/hooks/use-package-release-by-id-or-version.ts +29 -20
- package/src/hooks/use-package-release-images.ts +105 -0
- package/src/hooks/use-package-release.ts +2 -2
- package/src/hooks/use-package-stars.ts +80 -4
- package/src/hooks/use-preview-images.ts +6 -3
- package/src/hooks/use-remove-org-member-mutation.ts +32 -0
- package/src/hooks/use-update-ai-description-mutation.ts +42 -0
- package/src/hooks/use-update-org-mutation.ts +41 -0
- package/src/hooks/use-warn-user-on-page-change.ts +71 -4
- package/src/hooks/useFileManagement.ts +183 -35
- package/src/hooks/useOptimizedPackageFilesLoader.ts +136 -0
- package/src/hooks/usePackageFilesLoader.ts +2 -2
- package/src/hooks/useUpdatePackageFilesMutation.ts +15 -1
- package/src/lib/download-fns/download-circuit-png.ts +11 -3
- package/src/lib/download-fns/download-gltf-from-circuit-json.ts +44 -0
- package/src/lib/download-fns/download-kicad-files.ts +12 -11
- package/src/lib/normalize-svg-for-tile.ts +50 -0
- package/src/lib/posthog.ts +11 -9
- package/src/lib/react-query-api-failure-tracking.ts +148 -0
- package/src/lib/sentry.ts +14 -0
- package/src/lib/templates/blank-circuit-board-template.ts +0 -4
- package/src/lib/ts-lib-cache.ts +122 -7
- package/src/lib/utils/checkIfManualEditsImported.ts +4 -4
- package/src/lib/utils/findTargetFile.ts +45 -10
- package/src/lib/utils/isComponentExported.ts +10 -0
- package/src/main.tsx +2 -1
- package/src/pages/authorize.tsx +0 -2
- package/src/pages/create-organization.tsx +168 -0
- package/src/pages/dashboard.tsx +38 -6
- package/src/pages/datasheet.tsx +1 -1
- package/src/pages/datasheets.tsx +3 -3
- package/src/pages/editor.tsx +4 -6
- package/src/pages/landing.tsx +6 -7
- package/src/pages/latest.tsx +3 -0
- package/src/pages/organization-profile.tsx +199 -0
- package/src/pages/organization-settings.tsx +566 -0
- package/src/pages/package-editor.tsx +21 -21
- package/src/pages/preview-release.tsx +76 -136
- package/src/pages/quickstart.tsx +159 -123
- package/src/pages/release-detail.tsx +119 -31
- package/src/pages/search.tsx +192 -57
- package/src/pages/settings-redirect.tsx +44 -0
- package/src/pages/trending.tsx +29 -20
- package/src/pages/user-profile.tsx +58 -7
- package/src/pages/view-package.tsx +21 -26
- package/vite.config.ts +9 -0
- package/fake-snippets-api/routes/api/autocomplete/create_autocomplete.ts +0 -133
- package/src/components/Footer2.tsx +0 -100
- package/src/components/JLCPCBImportDialog.tsx +0 -280
- package/src/components/PackageBuildsPage/LogContent.tsx +0 -72
- package/src/components/PackageBuildsPage/PackageBuildDetailsPage.tsx +0 -115
- package/src/components/PackageBuildsPage/build-preview-content.tsx +0 -27
- package/src/components/PackageBuildsPage/collapsible-section.tsx +0 -63
- package/src/components/PackageBuildsPage/package-build-details-panel.tsx +0 -166
- package/src/components/PackageBuildsPage/package-build-header.tsx +0 -79
- package/src/components/PageSearchComponent.tsx +0 -148
- package/src/components/ShippingInformationForm.tsx +0 -423
- package/src/components/StaticViewSnippetHeader.tsx +0 -70
- package/src/components/ViewPackagePage/components/file-explorer.tsx +0 -67
- package/src/components/ViewPackagePage/components/readme-view.tsx +0 -58
- package/src/components/ViewPackagePage/components/repo-header-button.tsx +0 -36
- package/src/components/ViewPackagePage/components/repo-header.tsx +0 -4
- package/src/components/ViewPackagePage/components/sidebar-contributors-section.tsx +0 -31
- package/src/components/ViewSnippetHeader.tsx +0 -181
- package/src/components/ui/input-otp.tsx +0 -69
- package/src/pages/package-builds.tsx +0 -33
- package/src/pages/settings.tsx +0 -25
package/dist/schema.d.ts
CHANGED
|
@@ -218,6 +218,7 @@ declare const accountSchema: z.ZodObject<{
|
|
|
218
218
|
companyName?: string | undefined;
|
|
219
219
|
apartment?: string | undefined;
|
|
220
220
|
}>>;
|
|
221
|
+
personal_org_id: z.ZodOptional<z.ZodString>;
|
|
221
222
|
}, "strip", z.ZodTypeAny, {
|
|
222
223
|
account_id: string;
|
|
223
224
|
github_username: string;
|
|
@@ -233,6 +234,7 @@ declare const accountSchema: z.ZodObject<{
|
|
|
233
234
|
companyName?: string | undefined;
|
|
234
235
|
apartment?: string | undefined;
|
|
235
236
|
} | undefined;
|
|
237
|
+
personal_org_id?: string | undefined;
|
|
236
238
|
}, {
|
|
237
239
|
account_id: string;
|
|
238
240
|
github_username: string;
|
|
@@ -248,6 +250,7 @@ declare const accountSchema: z.ZodObject<{
|
|
|
248
250
|
companyName?: string | undefined;
|
|
249
251
|
apartment?: string | undefined;
|
|
250
252
|
} | undefined;
|
|
253
|
+
personal_org_id?: string | undefined;
|
|
251
254
|
}>;
|
|
252
255
|
type Account = z.infer<typeof accountSchema>;
|
|
253
256
|
declare const orderSchema: z.ZodObject<{
|
|
@@ -685,6 +688,14 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
685
688
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
686
689
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
687
690
|
circuit_json_build_is_stale: z.ZodDefault<z.ZodBoolean>;
|
|
691
|
+
image_generation_display_status: z.ZodDefault<z.ZodEnum<["pending", "building", "complete", "error"]>>;
|
|
692
|
+
image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
693
|
+
image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
694
|
+
image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
695
|
+
image_generation_logs: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodAny, "many">>>;
|
|
696
|
+
image_generation_is_stale: z.ZodDefault<z.ZodBoolean>;
|
|
697
|
+
image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
698
|
+
image_generation_error_last_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
688
699
|
ai_review_text: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
|
|
689
700
|
ai_review_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
690
701
|
ai_review_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -714,6 +725,10 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
714
725
|
circuit_json_build_in_progress: boolean;
|
|
715
726
|
circuit_json_build_logs: any[];
|
|
716
727
|
circuit_json_build_is_stale: boolean;
|
|
728
|
+
image_generation_display_status: "error" | "pending" | "building" | "complete";
|
|
729
|
+
image_generation_in_progress: boolean;
|
|
730
|
+
image_generation_logs: any[] | null;
|
|
731
|
+
image_generation_is_stale: boolean;
|
|
717
732
|
ai_review_requested: boolean;
|
|
718
733
|
is_pr_preview: boolean;
|
|
719
734
|
ai_review_text?: string | null | undefined;
|
|
@@ -728,6 +743,10 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
728
743
|
transpilation_completed_at?: string | null | undefined;
|
|
729
744
|
circuit_json_build_started_at?: string | null | undefined;
|
|
730
745
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
746
|
+
image_generation_started_at?: string | null | undefined;
|
|
747
|
+
image_generation_completed_at?: string | null | undefined;
|
|
748
|
+
image_generation_error?: string | null | undefined;
|
|
749
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
731
750
|
ai_review_started_at?: string | null | undefined;
|
|
732
751
|
ai_review_completed_at?: string | null | undefined;
|
|
733
752
|
ai_review_error?: any;
|
|
@@ -766,6 +785,14 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
766
785
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
767
786
|
circuit_json_build_logs?: any[] | undefined;
|
|
768
787
|
circuit_json_build_is_stale?: boolean | undefined;
|
|
788
|
+
image_generation_display_status?: "error" | "pending" | "building" | "complete" | undefined;
|
|
789
|
+
image_generation_in_progress?: boolean | undefined;
|
|
790
|
+
image_generation_started_at?: string | null | undefined;
|
|
791
|
+
image_generation_completed_at?: string | null | undefined;
|
|
792
|
+
image_generation_logs?: any[] | null | undefined;
|
|
793
|
+
image_generation_is_stale?: boolean | undefined;
|
|
794
|
+
image_generation_error?: string | null | undefined;
|
|
795
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
769
796
|
ai_review_started_at?: string | null | undefined;
|
|
770
797
|
ai_review_completed_at?: string | null | undefined;
|
|
771
798
|
ai_review_error?: any;
|
|
@@ -840,6 +867,7 @@ declare const packageSchema: z.ZodObject<{
|
|
|
840
867
|
latest_package_release_fs_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
841
868
|
default_view: z.ZodOptional<z.ZodDefault<z.ZodEnum<["files", "3d", "pcb", "schematic"]>>>;
|
|
842
869
|
allow_pr_previews: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
870
|
+
is_starred: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
843
871
|
}, "strip", z.ZodTypeAny, {
|
|
844
872
|
name: string;
|
|
845
873
|
unscoped_name: string;
|
|
@@ -868,6 +896,7 @@ declare const packageSchema: z.ZodObject<{
|
|
|
868
896
|
website: string | null;
|
|
869
897
|
ai_usage_instructions: string | null;
|
|
870
898
|
latest_package_release_fs_sha: string | null;
|
|
899
|
+
is_starred?: boolean | undefined;
|
|
871
900
|
snippet_type?: "board" | "package" | "model" | "footprint" | undefined;
|
|
872
901
|
latest_license?: string | null | undefined;
|
|
873
902
|
default_view?: "files" | "3d" | "pcb" | "schematic" | undefined;
|
|
@@ -888,6 +917,7 @@ declare const packageSchema: z.ZodObject<{
|
|
|
888
917
|
latest_package_release_id: string | null;
|
|
889
918
|
latest_version: string | null;
|
|
890
919
|
ai_usage_instructions: string | null;
|
|
920
|
+
is_starred?: boolean | undefined;
|
|
891
921
|
snippet_type?: "board" | "package" | "model" | "footprint" | undefined;
|
|
892
922
|
star_count?: number | undefined;
|
|
893
923
|
is_private?: boolean | null | undefined;
|
|
@@ -1020,6 +1050,11 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1020
1050
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1021
1051
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1022
1052
|
circuit_json_build_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1053
|
+
image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
1054
|
+
image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1055
|
+
image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1056
|
+
image_generation_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1057
|
+
image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1023
1058
|
build_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
1024
1059
|
build_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1025
1060
|
build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1034,6 +1069,8 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1034
1069
|
transpilation_logs: any[];
|
|
1035
1070
|
circuit_json_build_in_progress: boolean;
|
|
1036
1071
|
circuit_json_build_logs: any[];
|
|
1072
|
+
image_generation_in_progress: boolean;
|
|
1073
|
+
image_generation_logs: any[];
|
|
1037
1074
|
package_build_id: string;
|
|
1038
1075
|
build_in_progress: boolean;
|
|
1039
1076
|
build_error_last_updated_at: string;
|
|
@@ -1043,6 +1080,9 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1043
1080
|
transpilation_completed_at?: string | null | undefined;
|
|
1044
1081
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1045
1082
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1083
|
+
image_generation_started_at?: string | null | undefined;
|
|
1084
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1085
|
+
image_generation_error?: string | null | undefined;
|
|
1046
1086
|
build_started_at?: string | null | undefined;
|
|
1047
1087
|
build_completed_at?: string | null | undefined;
|
|
1048
1088
|
build_error?: string | null | undefined;
|
|
@@ -1063,6 +1103,11 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1063
1103
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1064
1104
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1065
1105
|
circuit_json_build_logs?: any[] | undefined;
|
|
1106
|
+
image_generation_in_progress?: boolean | undefined;
|
|
1107
|
+
image_generation_started_at?: string | null | undefined;
|
|
1108
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1109
|
+
image_generation_logs?: any[] | undefined;
|
|
1110
|
+
image_generation_error?: string | null | undefined;
|
|
1066
1111
|
build_in_progress?: boolean | undefined;
|
|
1067
1112
|
build_started_at?: string | null | undefined;
|
|
1068
1113
|
build_completed_at?: string | null | undefined;
|
|
@@ -1071,6 +1116,96 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1071
1116
|
build_logs?: string | null | undefined;
|
|
1072
1117
|
}>;
|
|
1073
1118
|
type PackageBuild = z.infer<typeof packageBuildSchema>;
|
|
1119
|
+
declare const orgSchema: z.ZodObject<{
|
|
1120
|
+
org_id: z.ZodString;
|
|
1121
|
+
github_handle: z.ZodString;
|
|
1122
|
+
owner_account_id: z.ZodString;
|
|
1123
|
+
is_personal_org: z.ZodDefault<z.ZodBoolean>;
|
|
1124
|
+
created_at: z.ZodString;
|
|
1125
|
+
org_display_name: z.ZodOptional<z.ZodString>;
|
|
1126
|
+
}, "strip", z.ZodTypeAny, {
|
|
1127
|
+
created_at: string;
|
|
1128
|
+
org_id: string;
|
|
1129
|
+
github_handle: string;
|
|
1130
|
+
owner_account_id: string;
|
|
1131
|
+
is_personal_org: boolean;
|
|
1132
|
+
org_display_name?: string | undefined;
|
|
1133
|
+
}, {
|
|
1134
|
+
created_at: string;
|
|
1135
|
+
org_id: string;
|
|
1136
|
+
github_handle: string;
|
|
1137
|
+
owner_account_id: string;
|
|
1138
|
+
is_personal_org?: boolean | undefined;
|
|
1139
|
+
org_display_name?: string | undefined;
|
|
1140
|
+
}>;
|
|
1141
|
+
type Organization = z.infer<typeof orgSchema>;
|
|
1142
|
+
declare const orgAccountSchema: z.ZodObject<{
|
|
1143
|
+
org_account_id: z.ZodString;
|
|
1144
|
+
org_id: z.ZodString;
|
|
1145
|
+
account_id: z.ZodString;
|
|
1146
|
+
is_owner: z.ZodDefault<z.ZodBoolean>;
|
|
1147
|
+
created_at: z.ZodString;
|
|
1148
|
+
}, "strip", z.ZodTypeAny, {
|
|
1149
|
+
created_at: string;
|
|
1150
|
+
account_id: string;
|
|
1151
|
+
org_id: string;
|
|
1152
|
+
org_account_id: string;
|
|
1153
|
+
is_owner: boolean;
|
|
1154
|
+
}, {
|
|
1155
|
+
created_at: string;
|
|
1156
|
+
account_id: string;
|
|
1157
|
+
org_id: string;
|
|
1158
|
+
org_account_id: string;
|
|
1159
|
+
is_owner?: boolean | undefined;
|
|
1160
|
+
}>;
|
|
1161
|
+
type OrgAccount = z.infer<typeof orgAccountSchema>;
|
|
1162
|
+
declare const publicOrgSchema: z.ZodObject<{
|
|
1163
|
+
org_id: z.ZodString;
|
|
1164
|
+
owner_account_id: z.ZodString;
|
|
1165
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1166
|
+
member_count: z.ZodNumber;
|
|
1167
|
+
is_personal_org: z.ZodBoolean;
|
|
1168
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
1169
|
+
package_count: z.ZodNumber;
|
|
1170
|
+
created_at: z.ZodString;
|
|
1171
|
+
user_permissions: z.ZodOptional<z.ZodObject<{
|
|
1172
|
+
can_manage_org: z.ZodOptional<z.ZodBoolean>;
|
|
1173
|
+
can_manage_package: z.ZodOptional<z.ZodBoolean>;
|
|
1174
|
+
}, "strip", z.ZodTypeAny, {
|
|
1175
|
+
can_manage_org?: boolean | undefined;
|
|
1176
|
+
can_manage_package?: boolean | undefined;
|
|
1177
|
+
}, {
|
|
1178
|
+
can_manage_org?: boolean | undefined;
|
|
1179
|
+
can_manage_package?: boolean | undefined;
|
|
1180
|
+
}>>;
|
|
1181
|
+
}, "strip", z.ZodTypeAny, {
|
|
1182
|
+
name: string | null;
|
|
1183
|
+
created_at: string;
|
|
1184
|
+
org_id: string;
|
|
1185
|
+
owner_account_id: string;
|
|
1186
|
+
is_personal_org: boolean;
|
|
1187
|
+
member_count: number;
|
|
1188
|
+
package_count: number;
|
|
1189
|
+
display_name?: string | undefined;
|
|
1190
|
+
user_permissions?: {
|
|
1191
|
+
can_manage_org?: boolean | undefined;
|
|
1192
|
+
can_manage_package?: boolean | undefined;
|
|
1193
|
+
} | undefined;
|
|
1194
|
+
}, {
|
|
1195
|
+
name: string | null;
|
|
1196
|
+
created_at: string;
|
|
1197
|
+
org_id: string;
|
|
1198
|
+
owner_account_id: string;
|
|
1199
|
+
is_personal_org: boolean;
|
|
1200
|
+
member_count: number;
|
|
1201
|
+
package_count: number;
|
|
1202
|
+
display_name?: string | undefined;
|
|
1203
|
+
user_permissions?: {
|
|
1204
|
+
can_manage_org?: boolean | undefined;
|
|
1205
|
+
can_manage_package?: boolean | undefined;
|
|
1206
|
+
} | undefined;
|
|
1207
|
+
}>;
|
|
1208
|
+
type PublicOrgSchema = z.infer<typeof publicOrgSchema>;
|
|
1074
1209
|
declare const databaseSchema: z.ZodObject<{
|
|
1075
1210
|
idCounter: z.ZodDefault<z.ZodNumber>;
|
|
1076
1211
|
snippets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1171,6 +1306,14 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1171
1306
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1172
1307
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1173
1308
|
circuit_json_build_is_stale: z.ZodDefault<z.ZodBoolean>;
|
|
1309
|
+
image_generation_display_status: z.ZodDefault<z.ZodEnum<["pending", "building", "complete", "error"]>>;
|
|
1310
|
+
image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
1311
|
+
image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1312
|
+
image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1313
|
+
image_generation_logs: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodAny, "many">>>;
|
|
1314
|
+
image_generation_is_stale: z.ZodDefault<z.ZodBoolean>;
|
|
1315
|
+
image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1316
|
+
image_generation_error_last_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1174
1317
|
ai_review_text: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
|
|
1175
1318
|
ai_review_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1176
1319
|
ai_review_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1200,6 +1343,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1200
1343
|
circuit_json_build_in_progress: boolean;
|
|
1201
1344
|
circuit_json_build_logs: any[];
|
|
1202
1345
|
circuit_json_build_is_stale: boolean;
|
|
1346
|
+
image_generation_display_status: "error" | "pending" | "building" | "complete";
|
|
1347
|
+
image_generation_in_progress: boolean;
|
|
1348
|
+
image_generation_logs: any[] | null;
|
|
1349
|
+
image_generation_is_stale: boolean;
|
|
1203
1350
|
ai_review_requested: boolean;
|
|
1204
1351
|
is_pr_preview: boolean;
|
|
1205
1352
|
ai_review_text?: string | null | undefined;
|
|
@@ -1214,6 +1361,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1214
1361
|
transpilation_completed_at?: string | null | undefined;
|
|
1215
1362
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1216
1363
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1364
|
+
image_generation_started_at?: string | null | undefined;
|
|
1365
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1366
|
+
image_generation_error?: string | null | undefined;
|
|
1367
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
1217
1368
|
ai_review_started_at?: string | null | undefined;
|
|
1218
1369
|
ai_review_completed_at?: string | null | undefined;
|
|
1219
1370
|
ai_review_error?: any;
|
|
@@ -1252,6 +1403,14 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1252
1403
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1253
1404
|
circuit_json_build_logs?: any[] | undefined;
|
|
1254
1405
|
circuit_json_build_is_stale?: boolean | undefined;
|
|
1406
|
+
image_generation_display_status?: "error" | "pending" | "building" | "complete" | undefined;
|
|
1407
|
+
image_generation_in_progress?: boolean | undefined;
|
|
1408
|
+
image_generation_started_at?: string | null | undefined;
|
|
1409
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1410
|
+
image_generation_logs?: any[] | null | undefined;
|
|
1411
|
+
image_generation_is_stale?: boolean | undefined;
|
|
1412
|
+
image_generation_error?: string | null | undefined;
|
|
1413
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
1255
1414
|
ai_review_started_at?: string | null | undefined;
|
|
1256
1415
|
ai_review_completed_at?: string | null | undefined;
|
|
1257
1416
|
ai_review_error?: any;
|
|
@@ -1367,6 +1526,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1367
1526
|
companyName?: string | undefined;
|
|
1368
1527
|
apartment?: string | undefined;
|
|
1369
1528
|
}>>;
|
|
1529
|
+
personal_org_id: z.ZodOptional<z.ZodString>;
|
|
1370
1530
|
}, "strip", z.ZodTypeAny, {
|
|
1371
1531
|
account_id: string;
|
|
1372
1532
|
github_username: string;
|
|
@@ -1382,6 +1542,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1382
1542
|
companyName?: string | undefined;
|
|
1383
1543
|
apartment?: string | undefined;
|
|
1384
1544
|
} | undefined;
|
|
1545
|
+
personal_org_id?: string | undefined;
|
|
1385
1546
|
}, {
|
|
1386
1547
|
account_id: string;
|
|
1387
1548
|
github_username: string;
|
|
@@ -1397,6 +1558,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1397
1558
|
companyName?: string | undefined;
|
|
1398
1559
|
apartment?: string | undefined;
|
|
1399
1560
|
} | undefined;
|
|
1561
|
+
personal_org_id?: string | undefined;
|
|
1400
1562
|
}>, "many">>;
|
|
1401
1563
|
packages: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1402
1564
|
package_id: z.ZodString;
|
|
@@ -1430,6 +1592,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1430
1592
|
latest_package_release_fs_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1431
1593
|
default_view: z.ZodOptional<z.ZodDefault<z.ZodEnum<["files", "3d", "pcb", "schematic"]>>>;
|
|
1432
1594
|
allow_pr_previews: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
1595
|
+
is_starred: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
1433
1596
|
}, "strip", z.ZodTypeAny, {
|
|
1434
1597
|
name: string;
|
|
1435
1598
|
unscoped_name: string;
|
|
@@ -1458,6 +1621,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1458
1621
|
website: string | null;
|
|
1459
1622
|
ai_usage_instructions: string | null;
|
|
1460
1623
|
latest_package_release_fs_sha: string | null;
|
|
1624
|
+
is_starred?: boolean | undefined;
|
|
1461
1625
|
snippet_type?: "board" | "package" | "model" | "footprint" | undefined;
|
|
1462
1626
|
latest_license?: string | null | undefined;
|
|
1463
1627
|
default_view?: "files" | "3d" | "pcb" | "schematic" | undefined;
|
|
@@ -1478,6 +1642,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1478
1642
|
latest_package_release_id: string | null;
|
|
1479
1643
|
latest_version: string | null;
|
|
1480
1644
|
ai_usage_instructions: string | null;
|
|
1645
|
+
is_starred?: boolean | undefined;
|
|
1481
1646
|
snippet_type?: "board" | "package" | "model" | "footprint" | undefined;
|
|
1482
1647
|
star_count?: number | undefined;
|
|
1483
1648
|
is_private?: boolean | null | undefined;
|
|
@@ -1547,6 +1712,47 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1547
1712
|
completed_at: string | null;
|
|
1548
1713
|
circuit_json?: any;
|
|
1549
1714
|
}>, "many">>;
|
|
1715
|
+
organizations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1716
|
+
org_id: z.ZodString;
|
|
1717
|
+
github_handle: z.ZodString;
|
|
1718
|
+
owner_account_id: z.ZodString;
|
|
1719
|
+
is_personal_org: z.ZodDefault<z.ZodBoolean>;
|
|
1720
|
+
created_at: z.ZodString;
|
|
1721
|
+
org_display_name: z.ZodOptional<z.ZodString>;
|
|
1722
|
+
}, "strip", z.ZodTypeAny, {
|
|
1723
|
+
created_at: string;
|
|
1724
|
+
org_id: string;
|
|
1725
|
+
github_handle: string;
|
|
1726
|
+
owner_account_id: string;
|
|
1727
|
+
is_personal_org: boolean;
|
|
1728
|
+
org_display_name?: string | undefined;
|
|
1729
|
+
}, {
|
|
1730
|
+
created_at: string;
|
|
1731
|
+
org_id: string;
|
|
1732
|
+
github_handle: string;
|
|
1733
|
+
owner_account_id: string;
|
|
1734
|
+
is_personal_org?: boolean | undefined;
|
|
1735
|
+
org_display_name?: string | undefined;
|
|
1736
|
+
}>, "many">>;
|
|
1737
|
+
orgAccounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1738
|
+
org_account_id: z.ZodString;
|
|
1739
|
+
org_id: z.ZodString;
|
|
1740
|
+
account_id: z.ZodString;
|
|
1741
|
+
is_owner: z.ZodDefault<z.ZodBoolean>;
|
|
1742
|
+
created_at: z.ZodString;
|
|
1743
|
+
}, "strip", z.ZodTypeAny, {
|
|
1744
|
+
created_at: string;
|
|
1745
|
+
account_id: string;
|
|
1746
|
+
org_id: string;
|
|
1747
|
+
org_account_id: string;
|
|
1748
|
+
is_owner: boolean;
|
|
1749
|
+
}, {
|
|
1750
|
+
created_at: string;
|
|
1751
|
+
account_id: string;
|
|
1752
|
+
org_id: string;
|
|
1753
|
+
org_account_id: string;
|
|
1754
|
+
is_owner?: boolean | undefined;
|
|
1755
|
+
}>, "many">>;
|
|
1550
1756
|
orderFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1551
1757
|
order_file_id: z.ZodString;
|
|
1552
1758
|
order_id: z.ZodString;
|
|
@@ -1953,6 +2159,11 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1953
2159
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1954
2160
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1955
2161
|
circuit_json_build_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2162
|
+
image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
2163
|
+
image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2164
|
+
image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2165
|
+
image_generation_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
2166
|
+
image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1956
2167
|
build_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
1957
2168
|
build_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1958
2169
|
build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1967,6 +2178,8 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1967
2178
|
transpilation_logs: any[];
|
|
1968
2179
|
circuit_json_build_in_progress: boolean;
|
|
1969
2180
|
circuit_json_build_logs: any[];
|
|
2181
|
+
image_generation_in_progress: boolean;
|
|
2182
|
+
image_generation_logs: any[];
|
|
1970
2183
|
package_build_id: string;
|
|
1971
2184
|
build_in_progress: boolean;
|
|
1972
2185
|
build_error_last_updated_at: string;
|
|
@@ -1976,6 +2189,9 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1976
2189
|
transpilation_completed_at?: string | null | undefined;
|
|
1977
2190
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1978
2191
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2192
|
+
image_generation_started_at?: string | null | undefined;
|
|
2193
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2194
|
+
image_generation_error?: string | null | undefined;
|
|
1979
2195
|
build_started_at?: string | null | undefined;
|
|
1980
2196
|
build_completed_at?: string | null | undefined;
|
|
1981
2197
|
build_error?: string | null | undefined;
|
|
@@ -1996,6 +2212,11 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1996
2212
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1997
2213
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1998
2214
|
circuit_json_build_logs?: any[] | undefined;
|
|
2215
|
+
image_generation_in_progress?: boolean | undefined;
|
|
2216
|
+
image_generation_started_at?: string | null | undefined;
|
|
2217
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2218
|
+
image_generation_logs?: any[] | undefined;
|
|
2219
|
+
image_generation_error?: string | null | undefined;
|
|
1999
2220
|
build_in_progress?: boolean | undefined;
|
|
2000
2221
|
build_started_at?: string | null | undefined;
|
|
2001
2222
|
build_completed_at?: string | null | undefined;
|
|
@@ -2046,6 +2267,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2046
2267
|
circuit_json_build_in_progress: boolean;
|
|
2047
2268
|
circuit_json_build_logs: any[];
|
|
2048
2269
|
circuit_json_build_is_stale: boolean;
|
|
2270
|
+
image_generation_display_status: "error" | "pending" | "building" | "complete";
|
|
2271
|
+
image_generation_in_progress: boolean;
|
|
2272
|
+
image_generation_logs: any[] | null;
|
|
2273
|
+
image_generation_is_stale: boolean;
|
|
2049
2274
|
ai_review_requested: boolean;
|
|
2050
2275
|
is_pr_preview: boolean;
|
|
2051
2276
|
ai_review_text?: string | null | undefined;
|
|
@@ -2060,6 +2285,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2060
2285
|
transpilation_completed_at?: string | null | undefined;
|
|
2061
2286
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2062
2287
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2288
|
+
image_generation_started_at?: string | null | undefined;
|
|
2289
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2290
|
+
image_generation_error?: string | null | undefined;
|
|
2291
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
2063
2292
|
ai_review_started_at?: string | null | undefined;
|
|
2064
2293
|
ai_review_completed_at?: string | null | undefined;
|
|
2065
2294
|
ai_review_error?: any;
|
|
@@ -2109,6 +2338,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2109
2338
|
companyName?: string | undefined;
|
|
2110
2339
|
apartment?: string | undefined;
|
|
2111
2340
|
} | undefined;
|
|
2341
|
+
personal_org_id?: string | undefined;
|
|
2112
2342
|
}[];
|
|
2113
2343
|
packages: {
|
|
2114
2344
|
name: string;
|
|
@@ -2138,6 +2368,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2138
2368
|
website: string | null;
|
|
2139
2369
|
ai_usage_instructions: string | null;
|
|
2140
2370
|
latest_package_release_fs_sha: string | null;
|
|
2371
|
+
is_starred?: boolean | undefined;
|
|
2141
2372
|
snippet_type?: "board" | "package" | "model" | "footprint" | undefined;
|
|
2142
2373
|
latest_license?: string | null | undefined;
|
|
2143
2374
|
default_view?: "files" | "3d" | "pcb" | "schematic" | undefined;
|
|
@@ -2159,6 +2390,21 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2159
2390
|
completed_at: string | null;
|
|
2160
2391
|
circuit_json?: any;
|
|
2161
2392
|
}[];
|
|
2393
|
+
organizations: {
|
|
2394
|
+
created_at: string;
|
|
2395
|
+
org_id: string;
|
|
2396
|
+
github_handle: string;
|
|
2397
|
+
owner_account_id: string;
|
|
2398
|
+
is_personal_org: boolean;
|
|
2399
|
+
org_display_name?: string | undefined;
|
|
2400
|
+
}[];
|
|
2401
|
+
orgAccounts: {
|
|
2402
|
+
created_at: string;
|
|
2403
|
+
account_id: string;
|
|
2404
|
+
org_id: string;
|
|
2405
|
+
org_account_id: string;
|
|
2406
|
+
is_owner: boolean;
|
|
2407
|
+
}[];
|
|
2162
2408
|
orderFiles: {
|
|
2163
2409
|
order_id: string;
|
|
2164
2410
|
order_file_id: string;
|
|
@@ -2290,6 +2536,8 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2290
2536
|
transpilation_logs: any[];
|
|
2291
2537
|
circuit_json_build_in_progress: boolean;
|
|
2292
2538
|
circuit_json_build_logs: any[];
|
|
2539
|
+
image_generation_in_progress: boolean;
|
|
2540
|
+
image_generation_logs: any[];
|
|
2293
2541
|
package_build_id: string;
|
|
2294
2542
|
build_in_progress: boolean;
|
|
2295
2543
|
build_error_last_updated_at: string;
|
|
@@ -2299,6 +2547,9 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2299
2547
|
transpilation_completed_at?: string | null | undefined;
|
|
2300
2548
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2301
2549
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2550
|
+
image_generation_started_at?: string | null | undefined;
|
|
2551
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2552
|
+
image_generation_error?: string | null | undefined;
|
|
2302
2553
|
build_started_at?: string | null | undefined;
|
|
2303
2554
|
build_completed_at?: string | null | undefined;
|
|
2304
2555
|
build_error?: string | null | undefined;
|
|
@@ -2360,6 +2611,14 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2360
2611
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2361
2612
|
circuit_json_build_logs?: any[] | undefined;
|
|
2362
2613
|
circuit_json_build_is_stale?: boolean | undefined;
|
|
2614
|
+
image_generation_display_status?: "error" | "pending" | "building" | "complete" | undefined;
|
|
2615
|
+
image_generation_in_progress?: boolean | undefined;
|
|
2616
|
+
image_generation_started_at?: string | null | undefined;
|
|
2617
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2618
|
+
image_generation_logs?: any[] | null | undefined;
|
|
2619
|
+
image_generation_is_stale?: boolean | undefined;
|
|
2620
|
+
image_generation_error?: string | null | undefined;
|
|
2621
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
2363
2622
|
ai_review_started_at?: string | null | undefined;
|
|
2364
2623
|
ai_review_completed_at?: string | null | undefined;
|
|
2365
2624
|
ai_review_error?: any;
|
|
@@ -2411,6 +2670,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2411
2670
|
companyName?: string | undefined;
|
|
2412
2671
|
apartment?: string | undefined;
|
|
2413
2672
|
} | undefined;
|
|
2673
|
+
personal_org_id?: string | undefined;
|
|
2414
2674
|
}[] | undefined;
|
|
2415
2675
|
packages?: {
|
|
2416
2676
|
name: string;
|
|
@@ -2428,6 +2688,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2428
2688
|
latest_package_release_id: string | null;
|
|
2429
2689
|
latest_version: string | null;
|
|
2430
2690
|
ai_usage_instructions: string | null;
|
|
2691
|
+
is_starred?: boolean | undefined;
|
|
2431
2692
|
snippet_type?: "board" | "package" | "model" | "footprint" | undefined;
|
|
2432
2693
|
star_count?: number | undefined;
|
|
2433
2694
|
is_private?: boolean | null | undefined;
|
|
@@ -2461,6 +2722,21 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2461
2722
|
completed_at: string | null;
|
|
2462
2723
|
circuit_json?: any;
|
|
2463
2724
|
}[] | undefined;
|
|
2725
|
+
organizations?: {
|
|
2726
|
+
created_at: string;
|
|
2727
|
+
org_id: string;
|
|
2728
|
+
github_handle: string;
|
|
2729
|
+
owner_account_id: string;
|
|
2730
|
+
is_personal_org?: boolean | undefined;
|
|
2731
|
+
org_display_name?: string | undefined;
|
|
2732
|
+
}[] | undefined;
|
|
2733
|
+
orgAccounts?: {
|
|
2734
|
+
created_at: string;
|
|
2735
|
+
account_id: string;
|
|
2736
|
+
org_id: string;
|
|
2737
|
+
org_account_id: string;
|
|
2738
|
+
is_owner?: boolean | undefined;
|
|
2739
|
+
}[] | undefined;
|
|
2464
2740
|
orderFiles?: {
|
|
2465
2741
|
order_id: string;
|
|
2466
2742
|
order_file_id: string;
|
|
@@ -2600,6 +2876,11 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2600
2876
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2601
2877
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2602
2878
|
circuit_json_build_logs?: any[] | undefined;
|
|
2879
|
+
image_generation_in_progress?: boolean | undefined;
|
|
2880
|
+
image_generation_started_at?: string | null | undefined;
|
|
2881
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2882
|
+
image_generation_logs?: any[] | undefined;
|
|
2883
|
+
image_generation_error?: string | null | undefined;
|
|
2603
2884
|
build_in_progress?: boolean | undefined;
|
|
2604
2885
|
build_started_at?: string | null | undefined;
|
|
2605
2886
|
build_completed_at?: string | null | undefined;
|
|
@@ -2610,4 +2891,4 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2610
2891
|
}>;
|
|
2611
2892
|
type DatabaseSchema = z.infer<typeof databaseSchema>;
|
|
2612
2893
|
|
|
2613
|
-
export { type Account, type AccountPackage, type AccountSnippet, type AiReview, type DatabaseSchema, type Datasheet, type GithubInstallation, type JlcpcbOrderState, type JlcpcbOrderStepRun, type LoginPage, type Order, type OrderFile, type OrderQuote, type Package, type PackageBuild, type PackageFile, type PackageRelease, type QuotedComponent, type Session, type ShippingOption, type Snippet, accountPackageSchema, accountSchema, accountSnippetSchema, aiReviewSchema, databaseSchema, datasheetPinInformationSchema, datasheetSchema, errorResponseSchema, errorSchema, githubInstallationSchema, jlcpcbOrderStateSchema, jlcpcbOrderStepRunSchema, loginPageSchema, orderFileSchema, orderQuoteSchema, orderSchema, packageBuildSchema, packageFileSchema, packageReleaseSchema, packageSchema, quotedComponentSchema, sessionSchema, shippingInfoSchema, snippetSchema };
|
|
2894
|
+
export { type Account, type AccountPackage, type AccountSnippet, type AiReview, type DatabaseSchema, type Datasheet, type GithubInstallation, type JlcpcbOrderState, type JlcpcbOrderStepRun, type LoginPage, type Order, type OrderFile, type OrderQuote, type OrgAccount, type Organization, type Package, type PackageBuild, type PackageFile, type PackageRelease, type PublicOrgSchema, type QuotedComponent, type Session, type ShippingOption, type Snippet, accountPackageSchema, accountSchema, accountSnippetSchema, aiReviewSchema, databaseSchema, datasheetPinInformationSchema, datasheetSchema, errorResponseSchema, errorSchema, githubInstallationSchema, jlcpcbOrderStateSchema, jlcpcbOrderStepRunSchema, loginPageSchema, orderFileSchema, orderQuoteSchema, orderSchema, orgAccountSchema, orgSchema, packageBuildSchema, packageFileSchema, packageReleaseSchema, packageSchema, publicOrgSchema, quotedComponentSchema, sessionSchema, shippingInfoSchema, snippetSchema };
|
package/dist/schema.js
CHANGED
|
@@ -60,7 +60,8 @@ var shippingInfoSchema = z.object({
|
|
|
60
60
|
var accountSchema = z.object({
|
|
61
61
|
account_id: z.string(),
|
|
62
62
|
github_username: z.string(),
|
|
63
|
-
shippingInfo: shippingInfoSchema.optional()
|
|
63
|
+
shippingInfo: shippingInfoSchema.optional(),
|
|
64
|
+
personal_org_id: z.string().optional()
|
|
64
65
|
});
|
|
65
66
|
var orderSchema = z.object({
|
|
66
67
|
order_id: z.string(),
|
|
@@ -198,6 +199,15 @@ var packageReleaseSchema = z.object({
|
|
|
198
199
|
circuit_json_build_completed_at: z.string().datetime().nullable().optional(),
|
|
199
200
|
circuit_json_build_logs: z.array(z.any()).default([]),
|
|
200
201
|
circuit_json_build_is_stale: z.boolean().default(false),
|
|
202
|
+
// Image Generation Process
|
|
203
|
+
image_generation_display_status: z.enum(["pending", "building", "complete", "error"]).default("pending"),
|
|
204
|
+
image_generation_in_progress: z.boolean().default(false),
|
|
205
|
+
image_generation_started_at: z.string().datetime().nullable().optional(),
|
|
206
|
+
image_generation_completed_at: z.string().datetime().nullable().optional(),
|
|
207
|
+
image_generation_logs: z.array(z.any()).nullable().default(null),
|
|
208
|
+
image_generation_is_stale: z.boolean().default(false),
|
|
209
|
+
image_generation_error: z.string().nullable().optional(),
|
|
210
|
+
image_generation_error_last_updated_at: z.string().datetime().nullable().optional(),
|
|
201
211
|
// AI Review
|
|
202
212
|
ai_review_text: z.string().nullable().default(null).optional(),
|
|
203
213
|
ai_review_started_at: z.string().datetime().nullable().optional(),
|
|
@@ -255,7 +265,8 @@ var packageSchema = z.object({
|
|
|
255
265
|
ai_usage_instructions: z.string().nullable(),
|
|
256
266
|
latest_package_release_fs_sha: z.string().nullable().default(null),
|
|
257
267
|
default_view: z.enum(["files", "3d", "pcb", "schematic"]).default("files").optional(),
|
|
258
|
-
allow_pr_previews: z.boolean().default(false).optional()
|
|
268
|
+
allow_pr_previews: z.boolean().default(false).optional(),
|
|
269
|
+
is_starred: z.boolean().default(false).optional()
|
|
259
270
|
});
|
|
260
271
|
var jlcpcbOrderStateSchema = z.object({
|
|
261
272
|
jlcpcb_order_state_id: z.string(),
|
|
@@ -305,6 +316,11 @@ var packageBuildSchema = z.object({
|
|
|
305
316
|
circuit_json_build_completed_at: z.string().datetime().nullable().optional(),
|
|
306
317
|
circuit_json_build_logs: z.array(z.any()).default([]),
|
|
307
318
|
circuit_json_build_error: z.string().nullable().optional(),
|
|
319
|
+
image_generation_in_progress: z.boolean().default(false),
|
|
320
|
+
image_generation_started_at: z.string().datetime().nullable().optional(),
|
|
321
|
+
image_generation_completed_at: z.string().datetime().nullable().optional(),
|
|
322
|
+
image_generation_logs: z.array(z.any()).default([]),
|
|
323
|
+
image_generation_error: z.string().nullable().optional(),
|
|
308
324
|
build_in_progress: z.boolean().default(false),
|
|
309
325
|
build_started_at: z.string().datetime().nullable().optional(),
|
|
310
326
|
build_completed_at: z.string().datetime().nullable().optional(),
|
|
@@ -313,6 +329,37 @@ var packageBuildSchema = z.object({
|
|
|
313
329
|
preview_url: z.string().nullable().optional(),
|
|
314
330
|
build_logs: z.string().nullable().optional()
|
|
315
331
|
});
|
|
332
|
+
var orgSchema = z.object({
|
|
333
|
+
org_id: z.string(),
|
|
334
|
+
github_handle: z.string(),
|
|
335
|
+
owner_account_id: z.string(),
|
|
336
|
+
is_personal_org: z.boolean().default(false),
|
|
337
|
+
created_at: z.string().datetime(),
|
|
338
|
+
org_display_name: z.string().optional()
|
|
339
|
+
});
|
|
340
|
+
var orgAccountSchema = z.object({
|
|
341
|
+
org_account_id: z.string(),
|
|
342
|
+
org_id: z.string(),
|
|
343
|
+
account_id: z.string(),
|
|
344
|
+
is_owner: z.boolean().default(false),
|
|
345
|
+
created_at: z.string().datetime()
|
|
346
|
+
});
|
|
347
|
+
var publicOrgSchema = z.object({
|
|
348
|
+
org_id: z.string(),
|
|
349
|
+
//.uuid(),
|
|
350
|
+
owner_account_id: z.string(),
|
|
351
|
+
//.uuid(),
|
|
352
|
+
name: z.string().nullable(),
|
|
353
|
+
member_count: z.number(),
|
|
354
|
+
is_personal_org: z.boolean(),
|
|
355
|
+
display_name: z.string().optional(),
|
|
356
|
+
package_count: z.number(),
|
|
357
|
+
created_at: z.string(),
|
|
358
|
+
user_permissions: z.object({
|
|
359
|
+
can_manage_org: z.boolean().optional(),
|
|
360
|
+
can_manage_package: z.boolean().optional()
|
|
361
|
+
}).optional()
|
|
362
|
+
});
|
|
316
363
|
var databaseSchema = z.object({
|
|
317
364
|
idCounter: z.number().default(0),
|
|
318
365
|
snippets: z.array(snippetSchema).default([]),
|
|
@@ -323,6 +370,8 @@ var databaseSchema = z.object({
|
|
|
323
370
|
accounts: z.array(accountSchema).default([]),
|
|
324
371
|
packages: z.array(packageSchema).default([]),
|
|
325
372
|
orders: z.array(orderSchema).default([]),
|
|
373
|
+
organizations: z.array(orgSchema).default([]),
|
|
374
|
+
orgAccounts: z.array(orgAccountSchema).default([]),
|
|
326
375
|
orderFiles: z.array(orderFileSchema).default([]),
|
|
327
376
|
accountSnippets: z.array(accountSnippetSchema).default([]),
|
|
328
377
|
accountPackages: z.array(accountPackageSchema).default([]),
|
|
@@ -351,10 +400,13 @@ export {
|
|
|
351
400
|
orderFileSchema,
|
|
352
401
|
orderQuoteSchema,
|
|
353
402
|
orderSchema,
|
|
403
|
+
orgAccountSchema,
|
|
404
|
+
orgSchema,
|
|
354
405
|
packageBuildSchema,
|
|
355
406
|
packageFileSchema,
|
|
356
407
|
packageReleaseSchema,
|
|
357
408
|
packageSchema,
|
|
409
|
+
publicOrgSchema,
|
|
358
410
|
quotedComponentSchema,
|
|
359
411
|
sessionSchema,
|
|
360
412
|
shippingInfoSchema,
|