@tscircuit/fake-snippets 0.0.109 → 0.0.111
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 +32 -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 +151 -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 +361 -453
- package/bunfig.toml +2 -1
- package/dist/bundle.js +1313 -639
- package/dist/index.d.ts +313 -6
- package/dist/index.js +328 -24
- package/dist/schema.d.ts +290 -1
- package/dist/schema.js +54 -1
- package/fake-snippets-api/lib/db/autoload-dev-packages.ts +31 -20
- package/fake-snippets-api/lib/db/db-client.ts +219 -4
- package/fake-snippets-api/lib/db/schema.ts +63 -1
- package/fake-snippets-api/lib/db/seed.ts +100 -0
- package/fake-snippets-api/lib/middleware/with-session-auth.ts +60 -8
- 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 +33 -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 +48 -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 +60 -0
- package/fake-snippets-api/routes/api/orgs/remove_member.ts +46 -0
- package/fake-snippets-api/routes/api/orgs/update.ts +118 -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 +57 -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 +25 -19
- package/renovate.json +1 -1
- package/scripts/generate-sitemap.ts +1 -1
- package/src/App.tsx +27 -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 +17 -5
- 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/SentryNotFoundReporter.tsx +44 -0
- 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 +206 -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-hydration.ts +30 -0
- 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 +22 -11
- package/src/lib/download-fns/download-step.ts +12 -0
- 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 +169 -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 +569 -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 +197 -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/user-settings.tsx +161 -0
- package/src/pages/view-package.tsx +30 -16
- 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,9 +218,12 @@ 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>;
|
|
222
|
+
is_tscircuit_staff: z.ZodDefault<z.ZodBoolean>;
|
|
221
223
|
}, "strip", z.ZodTypeAny, {
|
|
222
224
|
account_id: string;
|
|
223
225
|
github_username: string;
|
|
226
|
+
is_tscircuit_staff: boolean;
|
|
224
227
|
shippingInfo?: {
|
|
225
228
|
firstName: string;
|
|
226
229
|
lastName: string;
|
|
@@ -233,6 +236,7 @@ declare const accountSchema: z.ZodObject<{
|
|
|
233
236
|
companyName?: string | undefined;
|
|
234
237
|
apartment?: string | undefined;
|
|
235
238
|
} | undefined;
|
|
239
|
+
personal_org_id?: string | undefined;
|
|
236
240
|
}, {
|
|
237
241
|
account_id: string;
|
|
238
242
|
github_username: string;
|
|
@@ -248,6 +252,8 @@ declare const accountSchema: z.ZodObject<{
|
|
|
248
252
|
companyName?: string | undefined;
|
|
249
253
|
apartment?: string | undefined;
|
|
250
254
|
} | undefined;
|
|
255
|
+
personal_org_id?: string | undefined;
|
|
256
|
+
is_tscircuit_staff?: boolean | undefined;
|
|
251
257
|
}>;
|
|
252
258
|
type Account = z.infer<typeof accountSchema>;
|
|
253
259
|
declare const orderSchema: z.ZodObject<{
|
|
@@ -685,6 +691,14 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
685
691
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
686
692
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
687
693
|
circuit_json_build_is_stale: z.ZodDefault<z.ZodBoolean>;
|
|
694
|
+
image_generation_display_status: z.ZodDefault<z.ZodEnum<["pending", "building", "complete", "error"]>>;
|
|
695
|
+
image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
696
|
+
image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
697
|
+
image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
698
|
+
image_generation_logs: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodAny, "many">>>;
|
|
699
|
+
image_generation_is_stale: z.ZodDefault<z.ZodBoolean>;
|
|
700
|
+
image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
701
|
+
image_generation_error_last_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
688
702
|
ai_review_text: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
|
|
689
703
|
ai_review_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
690
704
|
ai_review_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -714,6 +728,10 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
714
728
|
circuit_json_build_in_progress: boolean;
|
|
715
729
|
circuit_json_build_logs: any[];
|
|
716
730
|
circuit_json_build_is_stale: boolean;
|
|
731
|
+
image_generation_display_status: "error" | "pending" | "building" | "complete";
|
|
732
|
+
image_generation_in_progress: boolean;
|
|
733
|
+
image_generation_logs: any[] | null;
|
|
734
|
+
image_generation_is_stale: boolean;
|
|
717
735
|
ai_review_requested: boolean;
|
|
718
736
|
is_pr_preview: boolean;
|
|
719
737
|
ai_review_text?: string | null | undefined;
|
|
@@ -728,6 +746,10 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
728
746
|
transpilation_completed_at?: string | null | undefined;
|
|
729
747
|
circuit_json_build_started_at?: string | null | undefined;
|
|
730
748
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
749
|
+
image_generation_started_at?: string | null | undefined;
|
|
750
|
+
image_generation_completed_at?: string | null | undefined;
|
|
751
|
+
image_generation_error?: string | null | undefined;
|
|
752
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
731
753
|
ai_review_started_at?: string | null | undefined;
|
|
732
754
|
ai_review_completed_at?: string | null | undefined;
|
|
733
755
|
ai_review_error?: any;
|
|
@@ -766,6 +788,14 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
766
788
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
767
789
|
circuit_json_build_logs?: any[] | undefined;
|
|
768
790
|
circuit_json_build_is_stale?: boolean | undefined;
|
|
791
|
+
image_generation_display_status?: "error" | "pending" | "building" | "complete" | undefined;
|
|
792
|
+
image_generation_in_progress?: boolean | undefined;
|
|
793
|
+
image_generation_started_at?: string | null | undefined;
|
|
794
|
+
image_generation_completed_at?: string | null | undefined;
|
|
795
|
+
image_generation_logs?: any[] | null | undefined;
|
|
796
|
+
image_generation_is_stale?: boolean | undefined;
|
|
797
|
+
image_generation_error?: string | null | undefined;
|
|
798
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
769
799
|
ai_review_started_at?: string | null | undefined;
|
|
770
800
|
ai_review_completed_at?: string | null | undefined;
|
|
771
801
|
ai_review_error?: any;
|
|
@@ -1023,6 +1053,11 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1023
1053
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1024
1054
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1025
1055
|
circuit_json_build_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1056
|
+
image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
1057
|
+
image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1058
|
+
image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1059
|
+
image_generation_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1060
|
+
image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1026
1061
|
build_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
1027
1062
|
build_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1028
1063
|
build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1037,6 +1072,8 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1037
1072
|
transpilation_logs: any[];
|
|
1038
1073
|
circuit_json_build_in_progress: boolean;
|
|
1039
1074
|
circuit_json_build_logs: any[];
|
|
1075
|
+
image_generation_in_progress: boolean;
|
|
1076
|
+
image_generation_logs: any[];
|
|
1040
1077
|
package_build_id: string;
|
|
1041
1078
|
build_in_progress: boolean;
|
|
1042
1079
|
build_error_last_updated_at: string;
|
|
@@ -1046,6 +1083,9 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1046
1083
|
transpilation_completed_at?: string | null | undefined;
|
|
1047
1084
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1048
1085
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1086
|
+
image_generation_started_at?: string | null | undefined;
|
|
1087
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1088
|
+
image_generation_error?: string | null | undefined;
|
|
1049
1089
|
build_started_at?: string | null | undefined;
|
|
1050
1090
|
build_completed_at?: string | null | undefined;
|
|
1051
1091
|
build_error?: string | null | undefined;
|
|
@@ -1066,6 +1106,11 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1066
1106
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1067
1107
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1068
1108
|
circuit_json_build_logs?: any[] | undefined;
|
|
1109
|
+
image_generation_in_progress?: boolean | undefined;
|
|
1110
|
+
image_generation_started_at?: string | null | undefined;
|
|
1111
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1112
|
+
image_generation_logs?: any[] | undefined;
|
|
1113
|
+
image_generation_error?: string | null | undefined;
|
|
1069
1114
|
build_in_progress?: boolean | undefined;
|
|
1070
1115
|
build_started_at?: string | null | undefined;
|
|
1071
1116
|
build_completed_at?: string | null | undefined;
|
|
@@ -1074,6 +1119,99 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
1074
1119
|
build_logs?: string | null | undefined;
|
|
1075
1120
|
}>;
|
|
1076
1121
|
type PackageBuild = z.infer<typeof packageBuildSchema>;
|
|
1122
|
+
declare const orgSchema: z.ZodObject<{
|
|
1123
|
+
org_id: z.ZodString;
|
|
1124
|
+
github_handle: z.ZodOptional<z.ZodString>;
|
|
1125
|
+
owner_account_id: z.ZodString;
|
|
1126
|
+
is_personal_org: z.ZodDefault<z.ZodBoolean>;
|
|
1127
|
+
created_at: z.ZodString;
|
|
1128
|
+
org_display_name: z.ZodOptional<z.ZodString>;
|
|
1129
|
+
org_name: z.ZodString;
|
|
1130
|
+
}, "strip", z.ZodTypeAny, {
|
|
1131
|
+
created_at: string;
|
|
1132
|
+
org_id: string;
|
|
1133
|
+
owner_account_id: string;
|
|
1134
|
+
is_personal_org: boolean;
|
|
1135
|
+
org_name: string;
|
|
1136
|
+
github_handle?: string | undefined;
|
|
1137
|
+
org_display_name?: string | undefined;
|
|
1138
|
+
}, {
|
|
1139
|
+
created_at: string;
|
|
1140
|
+
org_id: string;
|
|
1141
|
+
owner_account_id: string;
|
|
1142
|
+
org_name: string;
|
|
1143
|
+
github_handle?: string | undefined;
|
|
1144
|
+
is_personal_org?: boolean | undefined;
|
|
1145
|
+
org_display_name?: string | undefined;
|
|
1146
|
+
}>;
|
|
1147
|
+
type Organization = z.infer<typeof orgSchema>;
|
|
1148
|
+
declare const orgAccountSchema: z.ZodObject<{
|
|
1149
|
+
org_account_id: z.ZodString;
|
|
1150
|
+
org_id: z.ZodString;
|
|
1151
|
+
account_id: z.ZodString;
|
|
1152
|
+
is_owner: z.ZodDefault<z.ZodBoolean>;
|
|
1153
|
+
created_at: z.ZodString;
|
|
1154
|
+
}, "strip", z.ZodTypeAny, {
|
|
1155
|
+
created_at: string;
|
|
1156
|
+
account_id: string;
|
|
1157
|
+
org_id: string;
|
|
1158
|
+
org_account_id: string;
|
|
1159
|
+
is_owner: boolean;
|
|
1160
|
+
}, {
|
|
1161
|
+
created_at: string;
|
|
1162
|
+
account_id: string;
|
|
1163
|
+
org_id: string;
|
|
1164
|
+
org_account_id: string;
|
|
1165
|
+
is_owner?: boolean | undefined;
|
|
1166
|
+
}>;
|
|
1167
|
+
type OrgAccount = z.infer<typeof orgAccountSchema>;
|
|
1168
|
+
declare const publicOrgSchema: z.ZodObject<{
|
|
1169
|
+
org_id: z.ZodString;
|
|
1170
|
+
owner_account_id: z.ZodString;
|
|
1171
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1172
|
+
member_count: z.ZodNumber;
|
|
1173
|
+
is_personal_org: z.ZodBoolean;
|
|
1174
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
1175
|
+
package_count: z.ZodNumber;
|
|
1176
|
+
created_at: z.ZodString;
|
|
1177
|
+
user_permissions: z.ZodOptional<z.ZodObject<{
|
|
1178
|
+
can_manage_org: z.ZodOptional<z.ZodBoolean>;
|
|
1179
|
+
can_manage_package: z.ZodOptional<z.ZodBoolean>;
|
|
1180
|
+
}, "strip", z.ZodTypeAny, {
|
|
1181
|
+
can_manage_org?: boolean | undefined;
|
|
1182
|
+
can_manage_package?: boolean | undefined;
|
|
1183
|
+
}, {
|
|
1184
|
+
can_manage_org?: boolean | undefined;
|
|
1185
|
+
can_manage_package?: boolean | undefined;
|
|
1186
|
+
}>>;
|
|
1187
|
+
}, "strip", z.ZodTypeAny, {
|
|
1188
|
+
name: string | null;
|
|
1189
|
+
created_at: string;
|
|
1190
|
+
org_id: string;
|
|
1191
|
+
owner_account_id: string;
|
|
1192
|
+
is_personal_org: boolean;
|
|
1193
|
+
member_count: number;
|
|
1194
|
+
package_count: number;
|
|
1195
|
+
display_name?: string | undefined;
|
|
1196
|
+
user_permissions?: {
|
|
1197
|
+
can_manage_org?: boolean | undefined;
|
|
1198
|
+
can_manage_package?: boolean | undefined;
|
|
1199
|
+
} | undefined;
|
|
1200
|
+
}, {
|
|
1201
|
+
name: string | null;
|
|
1202
|
+
created_at: string;
|
|
1203
|
+
org_id: string;
|
|
1204
|
+
owner_account_id: string;
|
|
1205
|
+
is_personal_org: boolean;
|
|
1206
|
+
member_count: number;
|
|
1207
|
+
package_count: number;
|
|
1208
|
+
display_name?: string | undefined;
|
|
1209
|
+
user_permissions?: {
|
|
1210
|
+
can_manage_org?: boolean | undefined;
|
|
1211
|
+
can_manage_package?: boolean | undefined;
|
|
1212
|
+
} | undefined;
|
|
1213
|
+
}>;
|
|
1214
|
+
type PublicOrgSchema = z.infer<typeof publicOrgSchema>;
|
|
1077
1215
|
declare const databaseSchema: z.ZodObject<{
|
|
1078
1216
|
idCounter: z.ZodDefault<z.ZodNumber>;
|
|
1079
1217
|
snippets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1174,6 +1312,14 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1174
1312
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1175
1313
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1176
1314
|
circuit_json_build_is_stale: z.ZodDefault<z.ZodBoolean>;
|
|
1315
|
+
image_generation_display_status: z.ZodDefault<z.ZodEnum<["pending", "building", "complete", "error"]>>;
|
|
1316
|
+
image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
1317
|
+
image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1318
|
+
image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1319
|
+
image_generation_logs: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodAny, "many">>>;
|
|
1320
|
+
image_generation_is_stale: z.ZodDefault<z.ZodBoolean>;
|
|
1321
|
+
image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1322
|
+
image_generation_error_last_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1177
1323
|
ai_review_text: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
|
|
1178
1324
|
ai_review_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1179
1325
|
ai_review_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1203,6 +1349,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1203
1349
|
circuit_json_build_in_progress: boolean;
|
|
1204
1350
|
circuit_json_build_logs: any[];
|
|
1205
1351
|
circuit_json_build_is_stale: boolean;
|
|
1352
|
+
image_generation_display_status: "error" | "pending" | "building" | "complete";
|
|
1353
|
+
image_generation_in_progress: boolean;
|
|
1354
|
+
image_generation_logs: any[] | null;
|
|
1355
|
+
image_generation_is_stale: boolean;
|
|
1206
1356
|
ai_review_requested: boolean;
|
|
1207
1357
|
is_pr_preview: boolean;
|
|
1208
1358
|
ai_review_text?: string | null | undefined;
|
|
@@ -1217,6 +1367,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1217
1367
|
transpilation_completed_at?: string | null | undefined;
|
|
1218
1368
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1219
1369
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1370
|
+
image_generation_started_at?: string | null | undefined;
|
|
1371
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1372
|
+
image_generation_error?: string | null | undefined;
|
|
1373
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
1220
1374
|
ai_review_started_at?: string | null | undefined;
|
|
1221
1375
|
ai_review_completed_at?: string | null | undefined;
|
|
1222
1376
|
ai_review_error?: any;
|
|
@@ -1255,6 +1409,14 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1255
1409
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1256
1410
|
circuit_json_build_logs?: any[] | undefined;
|
|
1257
1411
|
circuit_json_build_is_stale?: boolean | undefined;
|
|
1412
|
+
image_generation_display_status?: "error" | "pending" | "building" | "complete" | undefined;
|
|
1413
|
+
image_generation_in_progress?: boolean | undefined;
|
|
1414
|
+
image_generation_started_at?: string | null | undefined;
|
|
1415
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1416
|
+
image_generation_logs?: any[] | null | undefined;
|
|
1417
|
+
image_generation_is_stale?: boolean | undefined;
|
|
1418
|
+
image_generation_error?: string | null | undefined;
|
|
1419
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
1258
1420
|
ai_review_started_at?: string | null | undefined;
|
|
1259
1421
|
ai_review_completed_at?: string | null | undefined;
|
|
1260
1422
|
ai_review_error?: any;
|
|
@@ -1370,9 +1532,12 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1370
1532
|
companyName?: string | undefined;
|
|
1371
1533
|
apartment?: string | undefined;
|
|
1372
1534
|
}>>;
|
|
1535
|
+
personal_org_id: z.ZodOptional<z.ZodString>;
|
|
1536
|
+
is_tscircuit_staff: z.ZodDefault<z.ZodBoolean>;
|
|
1373
1537
|
}, "strip", z.ZodTypeAny, {
|
|
1374
1538
|
account_id: string;
|
|
1375
1539
|
github_username: string;
|
|
1540
|
+
is_tscircuit_staff: boolean;
|
|
1376
1541
|
shippingInfo?: {
|
|
1377
1542
|
firstName: string;
|
|
1378
1543
|
lastName: string;
|
|
@@ -1385,6 +1550,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1385
1550
|
companyName?: string | undefined;
|
|
1386
1551
|
apartment?: string | undefined;
|
|
1387
1552
|
} | undefined;
|
|
1553
|
+
personal_org_id?: string | undefined;
|
|
1388
1554
|
}, {
|
|
1389
1555
|
account_id: string;
|
|
1390
1556
|
github_username: string;
|
|
@@ -1400,6 +1566,8 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1400
1566
|
companyName?: string | undefined;
|
|
1401
1567
|
apartment?: string | undefined;
|
|
1402
1568
|
} | undefined;
|
|
1569
|
+
personal_org_id?: string | undefined;
|
|
1570
|
+
is_tscircuit_staff?: boolean | undefined;
|
|
1403
1571
|
}>, "many">>;
|
|
1404
1572
|
packages: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1405
1573
|
package_id: z.ZodString;
|
|
@@ -1553,6 +1721,50 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1553
1721
|
completed_at: string | null;
|
|
1554
1722
|
circuit_json?: any;
|
|
1555
1723
|
}>, "many">>;
|
|
1724
|
+
organizations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1725
|
+
org_id: z.ZodString;
|
|
1726
|
+
github_handle: z.ZodOptional<z.ZodString>;
|
|
1727
|
+
owner_account_id: z.ZodString;
|
|
1728
|
+
is_personal_org: z.ZodDefault<z.ZodBoolean>;
|
|
1729
|
+
created_at: z.ZodString;
|
|
1730
|
+
org_display_name: z.ZodOptional<z.ZodString>;
|
|
1731
|
+
org_name: z.ZodString;
|
|
1732
|
+
}, "strip", z.ZodTypeAny, {
|
|
1733
|
+
created_at: string;
|
|
1734
|
+
org_id: string;
|
|
1735
|
+
owner_account_id: string;
|
|
1736
|
+
is_personal_org: boolean;
|
|
1737
|
+
org_name: string;
|
|
1738
|
+
github_handle?: string | undefined;
|
|
1739
|
+
org_display_name?: string | undefined;
|
|
1740
|
+
}, {
|
|
1741
|
+
created_at: string;
|
|
1742
|
+
org_id: string;
|
|
1743
|
+
owner_account_id: string;
|
|
1744
|
+
org_name: string;
|
|
1745
|
+
github_handle?: string | undefined;
|
|
1746
|
+
is_personal_org?: boolean | undefined;
|
|
1747
|
+
org_display_name?: string | undefined;
|
|
1748
|
+
}>, "many">>;
|
|
1749
|
+
orgAccounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1750
|
+
org_account_id: z.ZodString;
|
|
1751
|
+
org_id: z.ZodString;
|
|
1752
|
+
account_id: z.ZodString;
|
|
1753
|
+
is_owner: z.ZodDefault<z.ZodBoolean>;
|
|
1754
|
+
created_at: z.ZodString;
|
|
1755
|
+
}, "strip", z.ZodTypeAny, {
|
|
1756
|
+
created_at: string;
|
|
1757
|
+
account_id: string;
|
|
1758
|
+
org_id: string;
|
|
1759
|
+
org_account_id: string;
|
|
1760
|
+
is_owner: boolean;
|
|
1761
|
+
}, {
|
|
1762
|
+
created_at: string;
|
|
1763
|
+
account_id: string;
|
|
1764
|
+
org_id: string;
|
|
1765
|
+
org_account_id: string;
|
|
1766
|
+
is_owner?: boolean | undefined;
|
|
1767
|
+
}>, "many">>;
|
|
1556
1768
|
orderFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1557
1769
|
order_file_id: z.ZodString;
|
|
1558
1770
|
order_id: z.ZodString;
|
|
@@ -1959,6 +2171,11 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1959
2171
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1960
2172
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
1961
2173
|
circuit_json_build_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2174
|
+
image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
2175
|
+
image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2176
|
+
image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2177
|
+
image_generation_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
2178
|
+
image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1962
2179
|
build_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
1963
2180
|
build_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1964
2181
|
build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1973,6 +2190,8 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1973
2190
|
transpilation_logs: any[];
|
|
1974
2191
|
circuit_json_build_in_progress: boolean;
|
|
1975
2192
|
circuit_json_build_logs: any[];
|
|
2193
|
+
image_generation_in_progress: boolean;
|
|
2194
|
+
image_generation_logs: any[];
|
|
1976
2195
|
package_build_id: string;
|
|
1977
2196
|
build_in_progress: boolean;
|
|
1978
2197
|
build_error_last_updated_at: string;
|
|
@@ -1982,6 +2201,9 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1982
2201
|
transpilation_completed_at?: string | null | undefined;
|
|
1983
2202
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1984
2203
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2204
|
+
image_generation_started_at?: string | null | undefined;
|
|
2205
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2206
|
+
image_generation_error?: string | null | undefined;
|
|
1985
2207
|
build_started_at?: string | null | undefined;
|
|
1986
2208
|
build_completed_at?: string | null | undefined;
|
|
1987
2209
|
build_error?: string | null | undefined;
|
|
@@ -2002,6 +2224,11 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2002
2224
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2003
2225
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2004
2226
|
circuit_json_build_logs?: any[] | undefined;
|
|
2227
|
+
image_generation_in_progress?: boolean | undefined;
|
|
2228
|
+
image_generation_started_at?: string | null | undefined;
|
|
2229
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2230
|
+
image_generation_logs?: any[] | undefined;
|
|
2231
|
+
image_generation_error?: string | null | undefined;
|
|
2005
2232
|
build_in_progress?: boolean | undefined;
|
|
2006
2233
|
build_started_at?: string | null | undefined;
|
|
2007
2234
|
build_completed_at?: string | null | undefined;
|
|
@@ -2052,6 +2279,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2052
2279
|
circuit_json_build_in_progress: boolean;
|
|
2053
2280
|
circuit_json_build_logs: any[];
|
|
2054
2281
|
circuit_json_build_is_stale: boolean;
|
|
2282
|
+
image_generation_display_status: "error" | "pending" | "building" | "complete";
|
|
2283
|
+
image_generation_in_progress: boolean;
|
|
2284
|
+
image_generation_logs: any[] | null;
|
|
2285
|
+
image_generation_is_stale: boolean;
|
|
2055
2286
|
ai_review_requested: boolean;
|
|
2056
2287
|
is_pr_preview: boolean;
|
|
2057
2288
|
ai_review_text?: string | null | undefined;
|
|
@@ -2066,6 +2297,10 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2066
2297
|
transpilation_completed_at?: string | null | undefined;
|
|
2067
2298
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2068
2299
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2300
|
+
image_generation_started_at?: string | null | undefined;
|
|
2301
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2302
|
+
image_generation_error?: string | null | undefined;
|
|
2303
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
2069
2304
|
ai_review_started_at?: string | null | undefined;
|
|
2070
2305
|
ai_review_completed_at?: string | null | undefined;
|
|
2071
2306
|
ai_review_error?: any;
|
|
@@ -2103,6 +2338,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2103
2338
|
accounts: {
|
|
2104
2339
|
account_id: string;
|
|
2105
2340
|
github_username: string;
|
|
2341
|
+
is_tscircuit_staff: boolean;
|
|
2106
2342
|
shippingInfo?: {
|
|
2107
2343
|
firstName: string;
|
|
2108
2344
|
lastName: string;
|
|
@@ -2115,6 +2351,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2115
2351
|
companyName?: string | undefined;
|
|
2116
2352
|
apartment?: string | undefined;
|
|
2117
2353
|
} | undefined;
|
|
2354
|
+
personal_org_id?: string | undefined;
|
|
2118
2355
|
}[];
|
|
2119
2356
|
packages: {
|
|
2120
2357
|
name: string;
|
|
@@ -2166,6 +2403,22 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2166
2403
|
completed_at: string | null;
|
|
2167
2404
|
circuit_json?: any;
|
|
2168
2405
|
}[];
|
|
2406
|
+
organizations: {
|
|
2407
|
+
created_at: string;
|
|
2408
|
+
org_id: string;
|
|
2409
|
+
owner_account_id: string;
|
|
2410
|
+
is_personal_org: boolean;
|
|
2411
|
+
org_name: string;
|
|
2412
|
+
github_handle?: string | undefined;
|
|
2413
|
+
org_display_name?: string | undefined;
|
|
2414
|
+
}[];
|
|
2415
|
+
orgAccounts: {
|
|
2416
|
+
created_at: string;
|
|
2417
|
+
account_id: string;
|
|
2418
|
+
org_id: string;
|
|
2419
|
+
org_account_id: string;
|
|
2420
|
+
is_owner: boolean;
|
|
2421
|
+
}[];
|
|
2169
2422
|
orderFiles: {
|
|
2170
2423
|
order_id: string;
|
|
2171
2424
|
order_file_id: string;
|
|
@@ -2297,6 +2550,8 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2297
2550
|
transpilation_logs: any[];
|
|
2298
2551
|
circuit_json_build_in_progress: boolean;
|
|
2299
2552
|
circuit_json_build_logs: any[];
|
|
2553
|
+
image_generation_in_progress: boolean;
|
|
2554
|
+
image_generation_logs: any[];
|
|
2300
2555
|
package_build_id: string;
|
|
2301
2556
|
build_in_progress: boolean;
|
|
2302
2557
|
build_error_last_updated_at: string;
|
|
@@ -2306,6 +2561,9 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2306
2561
|
transpilation_completed_at?: string | null | undefined;
|
|
2307
2562
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2308
2563
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2564
|
+
image_generation_started_at?: string | null | undefined;
|
|
2565
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2566
|
+
image_generation_error?: string | null | undefined;
|
|
2309
2567
|
build_started_at?: string | null | undefined;
|
|
2310
2568
|
build_completed_at?: string | null | undefined;
|
|
2311
2569
|
build_error?: string | null | undefined;
|
|
@@ -2367,6 +2625,14 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2367
2625
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2368
2626
|
circuit_json_build_logs?: any[] | undefined;
|
|
2369
2627
|
circuit_json_build_is_stale?: boolean | undefined;
|
|
2628
|
+
image_generation_display_status?: "error" | "pending" | "building" | "complete" | undefined;
|
|
2629
|
+
image_generation_in_progress?: boolean | undefined;
|
|
2630
|
+
image_generation_started_at?: string | null | undefined;
|
|
2631
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2632
|
+
image_generation_logs?: any[] | null | undefined;
|
|
2633
|
+
image_generation_is_stale?: boolean | undefined;
|
|
2634
|
+
image_generation_error?: string | null | undefined;
|
|
2635
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
2370
2636
|
ai_review_started_at?: string | null | undefined;
|
|
2371
2637
|
ai_review_completed_at?: string | null | undefined;
|
|
2372
2638
|
ai_review_error?: any;
|
|
@@ -2418,6 +2684,8 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2418
2684
|
companyName?: string | undefined;
|
|
2419
2685
|
apartment?: string | undefined;
|
|
2420
2686
|
} | undefined;
|
|
2687
|
+
personal_org_id?: string | undefined;
|
|
2688
|
+
is_tscircuit_staff?: boolean | undefined;
|
|
2421
2689
|
}[] | undefined;
|
|
2422
2690
|
packages?: {
|
|
2423
2691
|
name: string;
|
|
@@ -2469,6 +2737,22 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2469
2737
|
completed_at: string | null;
|
|
2470
2738
|
circuit_json?: any;
|
|
2471
2739
|
}[] | undefined;
|
|
2740
|
+
organizations?: {
|
|
2741
|
+
created_at: string;
|
|
2742
|
+
org_id: string;
|
|
2743
|
+
owner_account_id: string;
|
|
2744
|
+
org_name: string;
|
|
2745
|
+
github_handle?: string | undefined;
|
|
2746
|
+
is_personal_org?: boolean | undefined;
|
|
2747
|
+
org_display_name?: string | undefined;
|
|
2748
|
+
}[] | undefined;
|
|
2749
|
+
orgAccounts?: {
|
|
2750
|
+
created_at: string;
|
|
2751
|
+
account_id: string;
|
|
2752
|
+
org_id: string;
|
|
2753
|
+
org_account_id: string;
|
|
2754
|
+
is_owner?: boolean | undefined;
|
|
2755
|
+
}[] | undefined;
|
|
2472
2756
|
orderFiles?: {
|
|
2473
2757
|
order_id: string;
|
|
2474
2758
|
order_file_id: string;
|
|
@@ -2608,6 +2892,11 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2608
2892
|
circuit_json_build_started_at?: string | null | undefined;
|
|
2609
2893
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
2610
2894
|
circuit_json_build_logs?: any[] | undefined;
|
|
2895
|
+
image_generation_in_progress?: boolean | undefined;
|
|
2896
|
+
image_generation_started_at?: string | null | undefined;
|
|
2897
|
+
image_generation_completed_at?: string | null | undefined;
|
|
2898
|
+
image_generation_logs?: any[] | undefined;
|
|
2899
|
+
image_generation_error?: string | null | undefined;
|
|
2611
2900
|
build_in_progress?: boolean | undefined;
|
|
2612
2901
|
build_started_at?: string | null | undefined;
|
|
2613
2902
|
build_completed_at?: string | null | undefined;
|
|
@@ -2618,4 +2907,4 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2618
2907
|
}>;
|
|
2619
2908
|
type DatabaseSchema = z.infer<typeof databaseSchema>;
|
|
2620
2909
|
|
|
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 };
|
|
2910
|
+
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,9 @@ 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(),
|
|
65
|
+
is_tscircuit_staff: z.boolean().default(false)
|
|
64
66
|
});
|
|
65
67
|
var orderSchema = z.object({
|
|
66
68
|
order_id: z.string(),
|
|
@@ -198,6 +200,15 @@ var packageReleaseSchema = z.object({
|
|
|
198
200
|
circuit_json_build_completed_at: z.string().datetime().nullable().optional(),
|
|
199
201
|
circuit_json_build_logs: z.array(z.any()).default([]),
|
|
200
202
|
circuit_json_build_is_stale: z.boolean().default(false),
|
|
203
|
+
// Image Generation Process
|
|
204
|
+
image_generation_display_status: z.enum(["pending", "building", "complete", "error"]).default("pending"),
|
|
205
|
+
image_generation_in_progress: z.boolean().default(false),
|
|
206
|
+
image_generation_started_at: z.string().datetime().nullable().optional(),
|
|
207
|
+
image_generation_completed_at: z.string().datetime().nullable().optional(),
|
|
208
|
+
image_generation_logs: z.array(z.any()).nullable().default(null),
|
|
209
|
+
image_generation_is_stale: z.boolean().default(false),
|
|
210
|
+
image_generation_error: z.string().nullable().optional(),
|
|
211
|
+
image_generation_error_last_updated_at: z.string().datetime().nullable().optional(),
|
|
201
212
|
// AI Review
|
|
202
213
|
ai_review_text: z.string().nullable().default(null).optional(),
|
|
203
214
|
ai_review_started_at: z.string().datetime().nullable().optional(),
|
|
@@ -306,6 +317,11 @@ var packageBuildSchema = z.object({
|
|
|
306
317
|
circuit_json_build_completed_at: z.string().datetime().nullable().optional(),
|
|
307
318
|
circuit_json_build_logs: z.array(z.any()).default([]),
|
|
308
319
|
circuit_json_build_error: z.string().nullable().optional(),
|
|
320
|
+
image_generation_in_progress: z.boolean().default(false),
|
|
321
|
+
image_generation_started_at: z.string().datetime().nullable().optional(),
|
|
322
|
+
image_generation_completed_at: z.string().datetime().nullable().optional(),
|
|
323
|
+
image_generation_logs: z.array(z.any()).default([]),
|
|
324
|
+
image_generation_error: z.string().nullable().optional(),
|
|
309
325
|
build_in_progress: z.boolean().default(false),
|
|
310
326
|
build_started_at: z.string().datetime().nullable().optional(),
|
|
311
327
|
build_completed_at: z.string().datetime().nullable().optional(),
|
|
@@ -314,6 +330,38 @@ var packageBuildSchema = z.object({
|
|
|
314
330
|
preview_url: z.string().nullable().optional(),
|
|
315
331
|
build_logs: z.string().nullable().optional()
|
|
316
332
|
});
|
|
333
|
+
var orgSchema = z.object({
|
|
334
|
+
org_id: z.string(),
|
|
335
|
+
github_handle: z.string().optional(),
|
|
336
|
+
owner_account_id: z.string(),
|
|
337
|
+
is_personal_org: z.boolean().default(false),
|
|
338
|
+
created_at: z.string().datetime(),
|
|
339
|
+
org_display_name: z.string().optional(),
|
|
340
|
+
org_name: z.string()
|
|
341
|
+
});
|
|
342
|
+
var orgAccountSchema = z.object({
|
|
343
|
+
org_account_id: z.string(),
|
|
344
|
+
org_id: z.string(),
|
|
345
|
+
account_id: z.string(),
|
|
346
|
+
is_owner: z.boolean().default(false),
|
|
347
|
+
created_at: z.string().datetime()
|
|
348
|
+
});
|
|
349
|
+
var publicOrgSchema = z.object({
|
|
350
|
+
org_id: z.string(),
|
|
351
|
+
//.uuid(),
|
|
352
|
+
owner_account_id: z.string(),
|
|
353
|
+
//.uuid(),
|
|
354
|
+
name: z.string().nullable(),
|
|
355
|
+
member_count: z.number(),
|
|
356
|
+
is_personal_org: z.boolean(),
|
|
357
|
+
display_name: z.string().optional(),
|
|
358
|
+
package_count: z.number(),
|
|
359
|
+
created_at: z.string(),
|
|
360
|
+
user_permissions: z.object({
|
|
361
|
+
can_manage_org: z.boolean().optional(),
|
|
362
|
+
can_manage_package: z.boolean().optional()
|
|
363
|
+
}).optional()
|
|
364
|
+
});
|
|
317
365
|
var databaseSchema = z.object({
|
|
318
366
|
idCounter: z.number().default(0),
|
|
319
367
|
snippets: z.array(snippetSchema).default([]),
|
|
@@ -324,6 +372,8 @@ var databaseSchema = z.object({
|
|
|
324
372
|
accounts: z.array(accountSchema).default([]),
|
|
325
373
|
packages: z.array(packageSchema).default([]),
|
|
326
374
|
orders: z.array(orderSchema).default([]),
|
|
375
|
+
organizations: z.array(orgSchema).default([]),
|
|
376
|
+
orgAccounts: z.array(orgAccountSchema).default([]),
|
|
327
377
|
orderFiles: z.array(orderFileSchema).default([]),
|
|
328
378
|
accountSnippets: z.array(accountSnippetSchema).default([]),
|
|
329
379
|
accountPackages: z.array(accountPackageSchema).default([]),
|
|
@@ -352,10 +402,13 @@ export {
|
|
|
352
402
|
orderFileSchema,
|
|
353
403
|
orderQuoteSchema,
|
|
354
404
|
orderSchema,
|
|
405
|
+
orgAccountSchema,
|
|
406
|
+
orgSchema,
|
|
355
407
|
packageBuildSchema,
|
|
356
408
|
packageFileSchema,
|
|
357
409
|
packageReleaseSchema,
|
|
358
410
|
packageSchema,
|
|
411
|
+
publicOrgSchema,
|
|
359
412
|
quotedComponentSchema,
|
|
360
413
|
sessionSchema,
|
|
361
414
|
shippingInfoSchema,
|