@tscircuit/fake-snippets 0.0.109 → 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 +349 -453
- package/bunfig.toml +2 -1
- package/dist/bundle.js +1253 -624
- package/dist/index.d.ts +291 -4
- package/dist/index.js +323 -23
- package/dist/schema.d.ts +274 -1
- package/dist/schema.js +52 -1
- 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 +61 -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 +24 -20
- package/renovate.json +1 -1
- package/scripts/generate-sitemap.ts +1 -1
- package/src/App.tsx +29 -8
- 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 +3 -4
- package/src/components/FileSidebar.tsx +11 -17
- package/src/components/Footer.tsx +8 -9
- 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 +43 -15
- package/src/components/NotFound.tsx +5 -5
- package/src/components/PackageBreadcrumb.tsx +6 -12
- 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/build-status.tsx +1 -1
- package/src/components/ViewPackagePage/components/important-files-view.tsx +105 -34
- package/src/components/ViewPackagePage/components/main-content-header.tsx +10 -6
- package/src/components/ViewPackagePage/components/main-content-view-selector.tsx +1 -1
- package/src/components/ViewPackagePage/components/mobile-sidebar.tsx +54 -19
- package/src/components/ViewPackagePage/components/package-header.tsx +25 -33
- package/src/components/ViewPackagePage/components/preview-image-squares.tsx +11 -18
- package/src/components/ViewPackagePage/components/repo-page-content.tsx +12 -5
- 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/tab-views/pcb-view.tsx +1 -2
- package/src/components/ViewPackagePage/components/tab-views/schematic-view.tsx +2 -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 +15 -12
- package/src/components/package-port/CodeEditor.tsx +4 -30
- package/src/components/package-port/CodeEditorHeader.tsx +123 -61
- 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 +23 -11
- 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-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 +51 -22
- package/src/hooks/useOptimizedPackageFilesLoader.ts +11 -24
- package/src/hooks/usePackageFilesLoader.ts +2 -2
- package/src/hooks/useUpdatePackageFilesMutation.ts +13 -1
- package/src/lib/download-fns/download-gltf-from-circuit-json.ts +1 -1
- 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 +2 -1
- package/src/main.tsx +2 -1
- 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 -6
- 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 +75 -145
- 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 +7 -13
- package/vite.config.ts +9 -0
- package/fake-snippets-api/routes/api/autocomplete/create_autocomplete.ts +0 -133
- package/src/components/JLCPCBImportDialog.tsx +0 -280
- package/src/components/PackageBuildsPage/LogContent.tsx +0 -72
- package/src/components/PackageBuildsPage/PackageBuildDetailsPage.tsx +0 -113
- package/src/components/PackageBuildsPage/build-preview-content.tsx +0 -56
- 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/pages/package-builds.tsx +0 -33
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;
|
|
@@ -1023,6 +1050,11 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1023
1050
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1024
1051
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1025
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>>;
|
|
1026
1058
|
build_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
1027
1059
|
build_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1028
1060
|
build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1037,6 +1069,8 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1037
1069
|
transpilation_logs: any[];
|
|
1038
1070
|
circuit_json_build_in_progress: boolean;
|
|
1039
1071
|
circuit_json_build_logs: any[];
|
|
1072
|
+
image_generation_in_progress: boolean;
|
|
1073
|
+
image_generation_logs: any[];
|
|
1040
1074
|
package_build_id: string;
|
|
1041
1075
|
build_in_progress: boolean;
|
|
1042
1076
|
build_error_last_updated_at: string;
|
|
@@ -1046,6 +1080,9 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1046
1080
|
transpilation_completed_at?: string | null | undefined;
|
|
1047
1081
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1048
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;
|
|
1049
1086
|
build_started_at?: string | null | undefined;
|
|
1050
1087
|
build_completed_at?: string | null | undefined;
|
|
1051
1088
|
build_error?: string | null | undefined;
|
|
@@ -1066,6 +1103,11 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1066
1103
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1067
1104
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1068
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;
|
|
1069
1111
|
build_in_progress?: boolean | undefined;
|
|
1070
1112
|
build_started_at?: string | null | undefined;
|
|
1071
1113
|
build_completed_at?: string | null | undefined;
|
|
@@ -1074,6 +1116,96 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1074
1116
|
build_logs?: string | null | undefined;
|
|
1075
1117
|
}>;
|
|
1076
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>;
|
|
1077
1209
|
declare const databaseSchema: z.ZodObject<{
|
|
1078
1210
|
idCounter: z.ZodDefault<z.ZodNumber>;
|
|
1079
1211
|
snippets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1174,6 +1306,14 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1174
1306
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1175
1307
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1176
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>>;
|
|
1177
1317
|
ai_review_text: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
|
|
1178
1318
|
ai_review_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1179
1319
|
ai_review_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1203,6 +1343,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1203
1343
|
circuit_json_build_in_progress: boolean;
|
|
1204
1344
|
circuit_json_build_logs: any[];
|
|
1205
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;
|
|
1206
1350
|
ai_review_requested: boolean;
|
|
1207
1351
|
is_pr_preview: boolean;
|
|
1208
1352
|
ai_review_text?: string | null | undefined;
|
|
@@ -1217,6 +1361,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1217
1361
|
transpilation_completed_at?: string | null | undefined;
|
|
1218
1362
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1219
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;
|
|
1220
1368
|
ai_review_started_at?: string | null | undefined;
|
|
1221
1369
|
ai_review_completed_at?: string | null | undefined;
|
|
1222
1370
|
ai_review_error?: any;
|
|
@@ -1255,6 +1403,14 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1255
1403
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1256
1404
|
circuit_json_build_logs?: any[] | undefined;
|
|
1257
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;
|
|
1258
1414
|
ai_review_started_at?: string | null | undefined;
|
|
1259
1415
|
ai_review_completed_at?: string | null | undefined;
|
|
1260
1416
|
ai_review_error?: any;
|
|
@@ -1370,6 +1526,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1370
1526
|
companyName?: string | undefined;
|
|
1371
1527
|
apartment?: string | undefined;
|
|
1372
1528
|
}>>;
|
|
1529
|
+
personal_org_id: z.ZodOptional<z.ZodString>;
|
|
1373
1530
|
}, "strip", z.ZodTypeAny, {
|
|
1374
1531
|
account_id: string;
|
|
1375
1532
|
github_username: string;
|
|
@@ -1385,6 +1542,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1385
1542
|
companyName?: string | undefined;
|
|
1386
1543
|
apartment?: string | undefined;
|
|
1387
1544
|
} | undefined;
|
|
1545
|
+
personal_org_id?: string | undefined;
|
|
1388
1546
|
}, {
|
|
1389
1547
|
account_id: string;
|
|
1390
1548
|
github_username: string;
|
|
@@ -1400,6 +1558,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1400
1558
|
companyName?: string | undefined;
|
|
1401
1559
|
apartment?: string | undefined;
|
|
1402
1560
|
} | undefined;
|
|
1561
|
+
personal_org_id?: string | undefined;
|
|
1403
1562
|
}>, "many">>;
|
|
1404
1563
|
packages: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1405
1564
|
package_id: z.ZodString;
|
|
@@ -1553,6 +1712,47 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1553
1712
|
completed_at: string | null;
|
|
1554
1713
|
circuit_json?: any;
|
|
1555
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">>;
|
|
1556
1756
|
orderFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1557
1757
|
order_file_id: z.ZodString;
|
|
1558
1758
|
order_id: z.ZodString;
|
|
@@ -1959,6 +2159,11 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1959
2159
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1960
2160
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1961
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>>;
|
|
1962
2167
|
build_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
1963
2168
|
build_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1964
2169
|
build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1973,6 +2178,8 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1973
2178
|
transpilation_logs: any[];
|
|
1974
2179
|
circuit_json_build_in_progress: boolean;
|
|
1975
2180
|
circuit_json_build_logs: any[];
|
|
2181
|
+
image_generation_in_progress: boolean;
|
|
2182
|
+
image_generation_logs: any[];
|
|
1976
2183
|
package_build_id: string;
|
|
1977
2184
|
build_in_progress: boolean;
|
|
1978
2185
|
build_error_last_updated_at: string;
|
|
@@ -1982,6 +2189,9 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1982
2189
|
transpilation_completed_at?: string | null | undefined;
|
|
1983
2190
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1984
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;
|
|
1985
2195
|
build_started_at?: string | null | undefined;
|
|
1986
2196
|
build_completed_at?: string | null | undefined;
|
|
1987
2197
|
build_error?: string | null | undefined;
|
|
@@ -2002,6 +2212,11 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2002
2212
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2003
2213
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2004
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;
|
|
2005
2220
|
build_in_progress?: boolean | undefined;
|
|
2006
2221
|
build_started_at?: string | null | undefined;
|
|
2007
2222
|
build_completed_at?: string | null | undefined;
|
|
@@ -2052,6 +2267,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2052
2267
|
circuit_json_build_in_progress: boolean;
|
|
2053
2268
|
circuit_json_build_logs: any[];
|
|
2054
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;
|
|
2055
2274
|
ai_review_requested: boolean;
|
|
2056
2275
|
is_pr_preview: boolean;
|
|
2057
2276
|
ai_review_text?: string | null | undefined;
|
|
@@ -2066,6 +2285,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2066
2285
|
transpilation_completed_at?: string | null | undefined;
|
|
2067
2286
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2068
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;
|
|
2069
2292
|
ai_review_started_at?: string | null | undefined;
|
|
2070
2293
|
ai_review_completed_at?: string | null | undefined;
|
|
2071
2294
|
ai_review_error?: any;
|
|
@@ -2115,6 +2338,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2115
2338
|
companyName?: string | undefined;
|
|
2116
2339
|
apartment?: string | undefined;
|
|
2117
2340
|
} | undefined;
|
|
2341
|
+
personal_org_id?: string | undefined;
|
|
2118
2342
|
}[];
|
|
2119
2343
|
packages: {
|
|
2120
2344
|
name: string;
|
|
@@ -2166,6 +2390,21 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2166
2390
|
completed_at: string | null;
|
|
2167
2391
|
circuit_json?: any;
|
|
2168
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
|
+
}[];
|
|
2169
2408
|
orderFiles: {
|
|
2170
2409
|
order_id: string;
|
|
2171
2410
|
order_file_id: string;
|
|
@@ -2297,6 +2536,8 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2297
2536
|
transpilation_logs: any[];
|
|
2298
2537
|
circuit_json_build_in_progress: boolean;
|
|
2299
2538
|
circuit_json_build_logs: any[];
|
|
2539
|
+
image_generation_in_progress: boolean;
|
|
2540
|
+
image_generation_logs: any[];
|
|
2300
2541
|
package_build_id: string;
|
|
2301
2542
|
build_in_progress: boolean;
|
|
2302
2543
|
build_error_last_updated_at: string;
|
|
@@ -2306,6 +2547,9 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2306
2547
|
transpilation_completed_at?: string | null | undefined;
|
|
2307
2548
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2308
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;
|
|
2309
2553
|
build_started_at?: string | null | undefined;
|
|
2310
2554
|
build_completed_at?: string | null | undefined;
|
|
2311
2555
|
build_error?: string | null | undefined;
|
|
@@ -2367,6 +2611,14 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2367
2611
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2368
2612
|
circuit_json_build_logs?: any[] | undefined;
|
|
2369
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;
|
|
2370
2622
|
ai_review_started_at?: string | null | undefined;
|
|
2371
2623
|
ai_review_completed_at?: string | null | undefined;
|
|
2372
2624
|
ai_review_error?: any;
|
|
@@ -2418,6 +2670,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2418
2670
|
companyName?: string | undefined;
|
|
2419
2671
|
apartment?: string | undefined;
|
|
2420
2672
|
} | undefined;
|
|
2673
|
+
personal_org_id?: string | undefined;
|
|
2421
2674
|
}[] | undefined;
|
|
2422
2675
|
packages?: {
|
|
2423
2676
|
name: string;
|
|
@@ -2469,6 +2722,21 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2469
2722
|
completed_at: string | null;
|
|
2470
2723
|
circuit_json?: any;
|
|
2471
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;
|
|
2472
2740
|
orderFiles?: {
|
|
2473
2741
|
order_id: string;
|
|
2474
2742
|
order_file_id: string;
|
|
@@ -2608,6 +2876,11 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2608
2876
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2609
2877
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2610
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;
|
|
2611
2884
|
build_in_progress?: boolean | undefined;
|
|
2612
2885
|
build_started_at?: string | null | undefined;
|
|
2613
2886
|
build_completed_at?: string | null | undefined;
|
|
@@ -2618,4 +2891,4 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2618
2891
|
}>;
|
|
2619
2892
|
type DatabaseSchema = z.infer<typeof databaseSchema>;
|
|
2620
2893
|
|
|
2621
|
-
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(),
|
|
@@ -306,6 +316,11 @@ var packageBuildSchema = z.object({
|
|
|
306
316
|
circuit_json_build_completed_at: z.string().datetime().nullable().optional(),
|
|
307
317
|
circuit_json_build_logs: z.array(z.any()).default([]),
|
|
308
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(),
|
|
309
324
|
build_in_progress: z.boolean().default(false),
|
|
310
325
|
build_started_at: z.string().datetime().nullable().optional(),
|
|
311
326
|
build_completed_at: z.string().datetime().nullable().optional(),
|
|
@@ -314,6 +329,37 @@ var packageBuildSchema = z.object({
|
|
|
314
329
|
preview_url: z.string().nullable().optional(),
|
|
315
330
|
build_logs: z.string().nullable().optional()
|
|
316
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
|
+
});
|
|
317
363
|
var databaseSchema = z.object({
|
|
318
364
|
idCounter: z.number().default(0),
|
|
319
365
|
snippets: z.array(snippetSchema).default([]),
|
|
@@ -324,6 +370,8 @@ var databaseSchema = z.object({
|
|
|
324
370
|
accounts: z.array(accountSchema).default([]),
|
|
325
371
|
packages: z.array(packageSchema).default([]),
|
|
326
372
|
orders: z.array(orderSchema).default([]),
|
|
373
|
+
organizations: z.array(orgSchema).default([]),
|
|
374
|
+
orgAccounts: z.array(orgAccountSchema).default([]),
|
|
327
375
|
orderFiles: z.array(orderFileSchema).default([]),
|
|
328
376
|
accountSnippets: z.array(accountSnippetSchema).default([]),
|
|
329
377
|
accountPackages: z.array(accountPackageSchema).default([]),
|
|
@@ -352,10 +400,13 @@ export {
|
|
|
352
400
|
orderFileSchema,
|
|
353
401
|
orderQuoteSchema,
|
|
354
402
|
orderSchema,
|
|
403
|
+
orgAccountSchema,
|
|
404
|
+
orgSchema,
|
|
355
405
|
packageBuildSchema,
|
|
356
406
|
packageFileSchema,
|
|
357
407
|
packageReleaseSchema,
|
|
358
408
|
packageSchema,
|
|
409
|
+
publicOrgSchema,
|
|
359
410
|
quotedComponentSchema,
|
|
360
411
|
sessionSchema,
|
|
361
412
|
shippingInfoSchema,
|