@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/index.d.ts
CHANGED
|
@@ -150,6 +150,7 @@ declare const accountSchema: z.ZodObject<{
|
|
|
150
150
|
companyName?: string | undefined;
|
|
151
151
|
apartment?: string | undefined;
|
|
152
152
|
}>>;
|
|
153
|
+
personal_org_id: z.ZodOptional<z.ZodString>;
|
|
153
154
|
}, "strip", z.ZodTypeAny, {
|
|
154
155
|
account_id: string;
|
|
155
156
|
github_username: string;
|
|
@@ -165,6 +166,7 @@ declare const accountSchema: z.ZodObject<{
|
|
|
165
166
|
companyName?: string | undefined;
|
|
166
167
|
apartment?: string | undefined;
|
|
167
168
|
} | undefined;
|
|
169
|
+
personal_org_id?: string | undefined;
|
|
168
170
|
}, {
|
|
169
171
|
account_id: string;
|
|
170
172
|
github_username: string;
|
|
@@ -180,6 +182,7 @@ declare const accountSchema: z.ZodObject<{
|
|
|
180
182
|
companyName?: string | undefined;
|
|
181
183
|
apartment?: string | undefined;
|
|
182
184
|
} | undefined;
|
|
185
|
+
personal_org_id?: string | undefined;
|
|
183
186
|
}>;
|
|
184
187
|
type Account = z.infer<typeof accountSchema>;
|
|
185
188
|
declare const orderSchema: z.ZodObject<{
|
|
@@ -512,6 +515,14 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
512
515
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
513
516
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
514
517
|
circuit_json_build_is_stale: z.ZodDefault<z.ZodBoolean>;
|
|
518
|
+
image_generation_display_status: z.ZodDefault<z.ZodEnum<["pending", "building", "complete", "error"]>>;
|
|
519
|
+
image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
520
|
+
image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
521
|
+
image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
522
|
+
image_generation_logs: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodAny, "many">>>;
|
|
523
|
+
image_generation_is_stale: z.ZodDefault<z.ZodBoolean>;
|
|
524
|
+
image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
525
|
+
image_generation_error_last_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
515
526
|
ai_review_text: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
|
|
516
527
|
ai_review_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
517
528
|
ai_review_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -541,6 +552,10 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
541
552
|
circuit_json_build_in_progress: boolean;
|
|
542
553
|
circuit_json_build_logs: any[];
|
|
543
554
|
circuit_json_build_is_stale: boolean;
|
|
555
|
+
image_generation_display_status: "error" | "pending" | "building" | "complete";
|
|
556
|
+
image_generation_in_progress: boolean;
|
|
557
|
+
image_generation_logs: any[] | null;
|
|
558
|
+
image_generation_is_stale: boolean;
|
|
544
559
|
ai_review_requested: boolean;
|
|
545
560
|
is_pr_preview: boolean;
|
|
546
561
|
ai_review_text?: string | null | undefined;
|
|
@@ -555,6 +570,10 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
555
570
|
transpilation_completed_at?: string | null | undefined;
|
|
556
571
|
circuit_json_build_started_at?: string | null | undefined;
|
|
557
572
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
573
|
+
image_generation_started_at?: string | null | undefined;
|
|
574
|
+
image_generation_completed_at?: string | null | undefined;
|
|
575
|
+
image_generation_error?: string | null | undefined;
|
|
576
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
558
577
|
ai_review_started_at?: string | null | undefined;
|
|
559
578
|
ai_review_completed_at?: string | null | undefined;
|
|
560
579
|
ai_review_error?: any;
|
|
@@ -593,6 +612,14 @@ declare const packageReleaseSchema: z.ZodObject<{
|
|
|
593
612
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
594
613
|
circuit_json_build_logs?: any[] | undefined;
|
|
595
614
|
circuit_json_build_is_stale?: boolean | undefined;
|
|
615
|
+
image_generation_display_status?: "error" | "pending" | "building" | "complete" | undefined;
|
|
616
|
+
image_generation_in_progress?: boolean | undefined;
|
|
617
|
+
image_generation_started_at?: string | null | undefined;
|
|
618
|
+
image_generation_completed_at?: string | null | undefined;
|
|
619
|
+
image_generation_logs?: any[] | null | undefined;
|
|
620
|
+
image_generation_is_stale?: boolean | undefined;
|
|
621
|
+
image_generation_error?: string | null | undefined;
|
|
622
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
596
623
|
ai_review_started_at?: string | null | undefined;
|
|
597
624
|
ai_review_completed_at?: string | null | undefined;
|
|
598
625
|
ai_review_error?: any;
|
|
@@ -850,6 +877,11 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
850
877
|
circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
851
878
|
circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
852
879
|
circuit_json_build_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
880
|
+
image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
881
|
+
image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
882
|
+
image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
883
|
+
image_generation_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
|
|
884
|
+
image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
853
885
|
build_in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
854
886
|
build_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
855
887
|
build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -864,6 +896,8 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
864
896
|
transpilation_logs: any[];
|
|
865
897
|
circuit_json_build_in_progress: boolean;
|
|
866
898
|
circuit_json_build_logs: any[];
|
|
899
|
+
image_generation_in_progress: boolean;
|
|
900
|
+
image_generation_logs: any[];
|
|
867
901
|
package_build_id: string;
|
|
868
902
|
build_in_progress: boolean;
|
|
869
903
|
build_error_last_updated_at: string;
|
|
@@ -873,6 +907,9 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
873
907
|
transpilation_completed_at?: string | null | undefined;
|
|
874
908
|
circuit_json_build_started_at?: string | null | undefined;
|
|
875
909
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
910
|
+
image_generation_started_at?: string | null | undefined;
|
|
911
|
+
image_generation_completed_at?: string | null | undefined;
|
|
912
|
+
image_generation_error?: string | null | undefined;
|
|
876
913
|
build_started_at?: string | null | undefined;
|
|
877
914
|
build_completed_at?: string | null | undefined;
|
|
878
915
|
build_error?: string | null | undefined;
|
|
@@ -893,6 +930,11 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
893
930
|
circuit_json_build_started_at?: string | null | undefined;
|
|
894
931
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
895
932
|
circuit_json_build_logs?: any[] | undefined;
|
|
933
|
+
image_generation_in_progress?: boolean | undefined;
|
|
934
|
+
image_generation_started_at?: string | null | undefined;
|
|
935
|
+
image_generation_completed_at?: string | null | undefined;
|
|
936
|
+
image_generation_logs?: any[] | undefined;
|
|
937
|
+
image_generation_error?: string | null | undefined;
|
|
896
938
|
build_in_progress?: boolean | undefined;
|
|
897
939
|
build_started_at?: string | null | undefined;
|
|
898
940
|
build_completed_at?: string | null | undefined;
|
|
@@ -901,6 +943,49 @@ declare const packageBuildSchema: z.ZodObject<{
|
|
|
901
943
|
build_logs?: string | null | undefined;
|
|
902
944
|
}>;
|
|
903
945
|
type PackageBuild = z.infer<typeof packageBuildSchema>;
|
|
946
|
+
declare const orgSchema: z.ZodObject<{
|
|
947
|
+
org_id: z.ZodString;
|
|
948
|
+
github_handle: z.ZodString;
|
|
949
|
+
owner_account_id: z.ZodString;
|
|
950
|
+
is_personal_org: z.ZodDefault<z.ZodBoolean>;
|
|
951
|
+
created_at: z.ZodString;
|
|
952
|
+
org_display_name: z.ZodOptional<z.ZodString>;
|
|
953
|
+
}, "strip", z.ZodTypeAny, {
|
|
954
|
+
created_at: string;
|
|
955
|
+
org_id: string;
|
|
956
|
+
github_handle: string;
|
|
957
|
+
owner_account_id: string;
|
|
958
|
+
is_personal_org: boolean;
|
|
959
|
+
org_display_name?: string | undefined;
|
|
960
|
+
}, {
|
|
961
|
+
created_at: string;
|
|
962
|
+
org_id: string;
|
|
963
|
+
github_handle: string;
|
|
964
|
+
owner_account_id: string;
|
|
965
|
+
is_personal_org?: boolean | undefined;
|
|
966
|
+
org_display_name?: string | undefined;
|
|
967
|
+
}>;
|
|
968
|
+
type Organization = z.infer<typeof orgSchema>;
|
|
969
|
+
declare const orgAccountSchema: z.ZodObject<{
|
|
970
|
+
org_account_id: z.ZodString;
|
|
971
|
+
org_id: z.ZodString;
|
|
972
|
+
account_id: z.ZodString;
|
|
973
|
+
is_owner: z.ZodDefault<z.ZodBoolean>;
|
|
974
|
+
created_at: z.ZodString;
|
|
975
|
+
}, "strip", z.ZodTypeAny, {
|
|
976
|
+
created_at: string;
|
|
977
|
+
account_id: string;
|
|
978
|
+
org_id: string;
|
|
979
|
+
org_account_id: string;
|
|
980
|
+
is_owner: boolean;
|
|
981
|
+
}, {
|
|
982
|
+
created_at: string;
|
|
983
|
+
account_id: string;
|
|
984
|
+
org_id: string;
|
|
985
|
+
org_account_id: string;
|
|
986
|
+
is_owner?: boolean | undefined;
|
|
987
|
+
}>;
|
|
988
|
+
type OrgAccount = z.infer<typeof orgAccountSchema>;
|
|
904
989
|
|
|
905
990
|
declare const createDatabase: ({ seed }?: {
|
|
906
991
|
seed?: boolean;
|
|
@@ -947,6 +1032,10 @@ declare const createDatabase: ({ seed }?: {
|
|
|
947
1032
|
circuit_json_build_in_progress: boolean;
|
|
948
1033
|
circuit_json_build_logs: any[];
|
|
949
1034
|
circuit_json_build_is_stale: boolean;
|
|
1035
|
+
image_generation_display_status: "error" | "pending" | "building" | "complete";
|
|
1036
|
+
image_generation_in_progress: boolean;
|
|
1037
|
+
image_generation_logs: any[] | null;
|
|
1038
|
+
image_generation_is_stale: boolean;
|
|
950
1039
|
ai_review_requested: boolean;
|
|
951
1040
|
is_pr_preview: boolean;
|
|
952
1041
|
ai_review_text?: string | null | undefined;
|
|
@@ -961,6 +1050,10 @@ declare const createDatabase: ({ seed }?: {
|
|
|
961
1050
|
transpilation_completed_at?: string | null | undefined;
|
|
962
1051
|
circuit_json_build_started_at?: string | null | undefined;
|
|
963
1052
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1053
|
+
image_generation_started_at?: string | null | undefined;
|
|
1054
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1055
|
+
image_generation_error?: string | null | undefined;
|
|
1056
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
964
1057
|
ai_review_started_at?: string | null | undefined;
|
|
965
1058
|
ai_review_completed_at?: string | null | undefined;
|
|
966
1059
|
ai_review_error?: any;
|
|
@@ -1010,6 +1103,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1010
1103
|
companyName?: string | undefined;
|
|
1011
1104
|
apartment?: string | undefined;
|
|
1012
1105
|
} | undefined;
|
|
1106
|
+
personal_org_id?: string | undefined;
|
|
1013
1107
|
}[];
|
|
1014
1108
|
packages: {
|
|
1015
1109
|
name: string;
|
|
@@ -1061,6 +1155,21 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1061
1155
|
completed_at: string | null;
|
|
1062
1156
|
circuit_json?: any;
|
|
1063
1157
|
}[];
|
|
1158
|
+
organizations: {
|
|
1159
|
+
created_at: string;
|
|
1160
|
+
org_id: string;
|
|
1161
|
+
github_handle: string;
|
|
1162
|
+
owner_account_id: string;
|
|
1163
|
+
is_personal_org: boolean;
|
|
1164
|
+
org_display_name?: string | undefined;
|
|
1165
|
+
}[];
|
|
1166
|
+
orgAccounts: {
|
|
1167
|
+
created_at: string;
|
|
1168
|
+
account_id: string;
|
|
1169
|
+
org_id: string;
|
|
1170
|
+
org_account_id: string;
|
|
1171
|
+
is_owner: boolean;
|
|
1172
|
+
}[];
|
|
1064
1173
|
orderFiles: {
|
|
1065
1174
|
order_id: string;
|
|
1066
1175
|
order_file_id: string;
|
|
@@ -1192,6 +1301,8 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1192
1301
|
transpilation_logs: any[];
|
|
1193
1302
|
circuit_json_build_in_progress: boolean;
|
|
1194
1303
|
circuit_json_build_logs: any[];
|
|
1304
|
+
image_generation_in_progress: boolean;
|
|
1305
|
+
image_generation_logs: any[];
|
|
1195
1306
|
package_build_id: string;
|
|
1196
1307
|
build_in_progress: boolean;
|
|
1197
1308
|
build_error_last_updated_at: string;
|
|
@@ -1201,13 +1312,16 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1201
1312
|
transpilation_completed_at?: string | null | undefined;
|
|
1202
1313
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1203
1314
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1315
|
+
image_generation_started_at?: string | null | undefined;
|
|
1316
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1317
|
+
image_generation_error?: string | null | undefined;
|
|
1204
1318
|
build_started_at?: string | null | undefined;
|
|
1205
1319
|
build_completed_at?: string | null | undefined;
|
|
1206
1320
|
build_error?: string | null | undefined;
|
|
1207
1321
|
preview_url?: string | null | undefined;
|
|
1208
1322
|
build_logs?: string | null | undefined;
|
|
1209
1323
|
}[];
|
|
1210
|
-
}, "addOrder" | "getOrderById" | "getOrderFilesByOrderId" | "addOrderQuote" | "getOrderQuoteById" | "getJlcpcbOrderStatesByOrderId" | "getJlcpcbOrderStepRunsByJlcpcbOrderStateId" | "updateOrder" | "addJlcpcbOrderState" | "updateJlcpcbOrderState" | "addOrderFile" | "getOrderFileById" | "addAccount" | "addAccountPackage" | "getAccountPackageById" | "updateAccountPackage" | "deleteAccountPackage" | "addSnippet" | "getLatestSnippets" | "getTrendingSnippets" | "getPackagesByAuthor" | "getSnippetByAuthorAndName" | "updateSnippet" | "getSnippetById" | "searchSnippets" | "searchPackages" | "searchAccounts" | "deleteSnippet" | "addSession" | "getSessions" | "createLoginPage" | "getLoginPage" | "updateLoginPage" | "getAccount" | "updateAccount" | "createSession" | "addStar" | "removeStar" | "hasStarred" | "addPackage" | "updatePackage" | "getPackageById" | "getPackageReleaseById" | "addPackageRelease" | "updatePackageRelease" | "deletePackageFile" | "addPackageFile" | "updatePackageFile" | "getStarCount" | "getPackageFilesByReleaseId" | "updatePackageReleaseFsSha" | "addAiReview" | "updateAiReview" | "getAiReviewById" | "listAiReviews" | "addDatasheet" | "getDatasheetById" | "getDatasheetByChipName" | "listDatasheets" | "updateDatasheet" | "addPackageBuild" | "getPackageBuildById" | "getPackageBuildsByReleaseId" | "updatePackageBuild"> & {
|
|
1324
|
+
}, "addOrder" | "getOrderById" | "getOrderFilesByOrderId" | "addOrderQuote" | "getOrderQuoteById" | "getJlcpcbOrderStatesByOrderId" | "getJlcpcbOrderStepRunsByJlcpcbOrderStateId" | "updateOrder" | "addJlcpcbOrderState" | "updateJlcpcbOrderState" | "addOrderFile" | "getOrderFileById" | "addAccount" | "addAccountPackage" | "getAccountPackageById" | "updateAccountPackage" | "deleteAccountPackage" | "addSnippet" | "getLatestSnippets" | "getTrendingSnippets" | "getPackagesByAuthor" | "getSnippetByAuthorAndName" | "updateSnippet" | "getSnippetById" | "searchSnippets" | "searchPackages" | "searchAccounts" | "deleteSnippet" | "addSession" | "getSessions" | "createLoginPage" | "getLoginPage" | "updateLoginPage" | "getAccount" | "updateAccount" | "createSession" | "addStar" | "removeStar" | "hasStarred" | "addPackage" | "updatePackage" | "getPackageById" | "getPackageReleaseById" | "addPackageRelease" | "updatePackageRelease" | "deletePackageFile" | "addPackageFile" | "updatePackageFile" | "getStarCount" | "getPackageFilesByReleaseId" | "updatePackageReleaseFsSha" | "addAiReview" | "updateAiReview" | "getAiReviewById" | "listAiReviews" | "addDatasheet" | "getDatasheetById" | "getDatasheetByChipName" | "listDatasheets" | "updateDatasheet" | "addPackageBuild" | "getPackageBuildById" | "getPackageBuildsByReleaseId" | "updatePackageBuild" | "addOrganization" | "getOrgs" | "getOrg" | "addOrganizationAccount" | "getOrganizationAccount" | "getOrganizationAccounts" | "removeOrganizationAccount" | "updateOrganization"> & {
|
|
1211
1325
|
addOrder: (order: Omit<Order, "order_id">) => Order;
|
|
1212
1326
|
getOrderById: (orderId: string) => Order | undefined;
|
|
1213
1327
|
getOrderFilesByOrderId: (orderId: string) => OrderFile[];
|
|
@@ -1238,6 +1352,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1238
1352
|
companyName?: string | undefined;
|
|
1239
1353
|
apartment?: string | undefined;
|
|
1240
1354
|
} | undefined;
|
|
1355
|
+
personal_org_id?: string | undefined;
|
|
1241
1356
|
account_id: string;
|
|
1242
1357
|
};
|
|
1243
1358
|
addAccountPackage: (accountPackage: Omit<AccountPackage, "account_package_id">) => AccountPackage;
|
|
@@ -1306,10 +1421,81 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1306
1421
|
is_popular?: boolean;
|
|
1307
1422
|
}) => Datasheet[];
|
|
1308
1423
|
updateDatasheet: (datasheetId: string, updates: Partial<Datasheet>) => Datasheet | undefined;
|
|
1309
|
-
addPackageBuild: (packageBuild: Omit<
|
|
1424
|
+
addPackageBuild: (packageBuild: Omit<z.input<typeof packageBuildSchema>, "package_build_id">) => PackageBuild;
|
|
1310
1425
|
getPackageBuildById: (packageBuildId: string) => PackageBuild | undefined;
|
|
1311
1426
|
getPackageBuildsByReleaseId: (packageReleaseId: string) => PackageBuild[];
|
|
1312
1427
|
updatePackageBuild: (packageBuildId: string, updates: Partial<PackageBuild>) => PackageBuild | undefined;
|
|
1428
|
+
addOrganization: (organization: {
|
|
1429
|
+
name: string;
|
|
1430
|
+
org_id?: string;
|
|
1431
|
+
is_personal_org?: boolean;
|
|
1432
|
+
owner_account_id: string;
|
|
1433
|
+
}) => {
|
|
1434
|
+
created_at: string;
|
|
1435
|
+
org_id: string;
|
|
1436
|
+
github_handle: string;
|
|
1437
|
+
owner_account_id: string;
|
|
1438
|
+
is_personal_org: boolean;
|
|
1439
|
+
org_display_name?: string | undefined;
|
|
1440
|
+
};
|
|
1441
|
+
getOrgs: (filters?: {
|
|
1442
|
+
owner_account_id?: string;
|
|
1443
|
+
github_handle?: string;
|
|
1444
|
+
name?: string;
|
|
1445
|
+
}, auth?: {
|
|
1446
|
+
account_id?: string;
|
|
1447
|
+
}) => {
|
|
1448
|
+
member_count: number;
|
|
1449
|
+
package_count: number;
|
|
1450
|
+
can_manage_org: boolean;
|
|
1451
|
+
created_at: string;
|
|
1452
|
+
org_id: string;
|
|
1453
|
+
github_handle: string;
|
|
1454
|
+
owner_account_id: string;
|
|
1455
|
+
is_personal_org: boolean;
|
|
1456
|
+
org_display_name?: string | undefined;
|
|
1457
|
+
}[];
|
|
1458
|
+
getOrg: (filters: {
|
|
1459
|
+
org_id?: string;
|
|
1460
|
+
org_name?: string;
|
|
1461
|
+
github_handle?: string;
|
|
1462
|
+
}, auth?: {
|
|
1463
|
+
account_id: string;
|
|
1464
|
+
}) => {
|
|
1465
|
+
member_count: number;
|
|
1466
|
+
package_count: number;
|
|
1467
|
+
can_manage_org: boolean;
|
|
1468
|
+
created_at: string;
|
|
1469
|
+
org_id: string;
|
|
1470
|
+
github_handle: string;
|
|
1471
|
+
owner_account_id: string;
|
|
1472
|
+
is_personal_org: boolean;
|
|
1473
|
+
org_display_name?: string | undefined;
|
|
1474
|
+
} | null;
|
|
1475
|
+
addOrganizationAccount: (organizationAccount: {
|
|
1476
|
+
org_id: string;
|
|
1477
|
+
account_id: string;
|
|
1478
|
+
is_owner?: boolean;
|
|
1479
|
+
}) => {
|
|
1480
|
+
created_at: string;
|
|
1481
|
+
account_id: string;
|
|
1482
|
+
org_id: string;
|
|
1483
|
+
org_account_id: string;
|
|
1484
|
+
is_owner: boolean;
|
|
1485
|
+
};
|
|
1486
|
+
getOrganizationAccount: (filters: {
|
|
1487
|
+
org_id?: string;
|
|
1488
|
+
account_id?: string;
|
|
1489
|
+
}) => OrgAccount | undefined;
|
|
1490
|
+
getOrganizationAccounts: (filters?: {
|
|
1491
|
+
org_id?: string;
|
|
1492
|
+
account_id?: string;
|
|
1493
|
+
}) => OrgAccount[];
|
|
1494
|
+
removeOrganizationAccount: (filters: {
|
|
1495
|
+
org_id: string;
|
|
1496
|
+
account_id: string;
|
|
1497
|
+
}) => boolean;
|
|
1498
|
+
updateOrganization: (orgId: string, updates: Partial<Organization>) => Organization | undefined;
|
|
1313
1499
|
}> & Omit<{
|
|
1314
1500
|
idCounter: number;
|
|
1315
1501
|
snippets: {
|
|
@@ -1353,6 +1539,10 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1353
1539
|
circuit_json_build_in_progress: boolean;
|
|
1354
1540
|
circuit_json_build_logs: any[];
|
|
1355
1541
|
circuit_json_build_is_stale: boolean;
|
|
1542
|
+
image_generation_display_status: "error" | "pending" | "building" | "complete";
|
|
1543
|
+
image_generation_in_progress: boolean;
|
|
1544
|
+
image_generation_logs: any[] | null;
|
|
1545
|
+
image_generation_is_stale: boolean;
|
|
1356
1546
|
ai_review_requested: boolean;
|
|
1357
1547
|
is_pr_preview: boolean;
|
|
1358
1548
|
ai_review_text?: string | null | undefined;
|
|
@@ -1367,6 +1557,10 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1367
1557
|
transpilation_completed_at?: string | null | undefined;
|
|
1368
1558
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1369
1559
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1560
|
+
image_generation_started_at?: string | null | undefined;
|
|
1561
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1562
|
+
image_generation_error?: string | null | undefined;
|
|
1563
|
+
image_generation_error_last_updated_at?: string | null | undefined;
|
|
1370
1564
|
ai_review_started_at?: string | null | undefined;
|
|
1371
1565
|
ai_review_completed_at?: string | null | undefined;
|
|
1372
1566
|
ai_review_error?: any;
|
|
@@ -1416,6 +1610,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1416
1610
|
companyName?: string | undefined;
|
|
1417
1611
|
apartment?: string | undefined;
|
|
1418
1612
|
} | undefined;
|
|
1613
|
+
personal_org_id?: string | undefined;
|
|
1419
1614
|
}[];
|
|
1420
1615
|
packages: {
|
|
1421
1616
|
name: string;
|
|
@@ -1467,6 +1662,21 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1467
1662
|
completed_at: string | null;
|
|
1468
1663
|
circuit_json?: any;
|
|
1469
1664
|
}[];
|
|
1665
|
+
organizations: {
|
|
1666
|
+
created_at: string;
|
|
1667
|
+
org_id: string;
|
|
1668
|
+
github_handle: string;
|
|
1669
|
+
owner_account_id: string;
|
|
1670
|
+
is_personal_org: boolean;
|
|
1671
|
+
org_display_name?: string | undefined;
|
|
1672
|
+
}[];
|
|
1673
|
+
orgAccounts: {
|
|
1674
|
+
created_at: string;
|
|
1675
|
+
account_id: string;
|
|
1676
|
+
org_id: string;
|
|
1677
|
+
org_account_id: string;
|
|
1678
|
+
is_owner: boolean;
|
|
1679
|
+
}[];
|
|
1470
1680
|
orderFiles: {
|
|
1471
1681
|
order_id: string;
|
|
1472
1682
|
order_file_id: string;
|
|
@@ -1598,6 +1808,8 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1598
1808
|
transpilation_logs: any[];
|
|
1599
1809
|
circuit_json_build_in_progress: boolean;
|
|
1600
1810
|
circuit_json_build_logs: any[];
|
|
1811
|
+
image_generation_in_progress: boolean;
|
|
1812
|
+
image_generation_logs: any[];
|
|
1601
1813
|
package_build_id: string;
|
|
1602
1814
|
build_in_progress: boolean;
|
|
1603
1815
|
build_error_last_updated_at: string;
|
|
@@ -1607,13 +1819,16 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1607
1819
|
transpilation_completed_at?: string | null | undefined;
|
|
1608
1820
|
circuit_json_build_started_at?: string | null | undefined;
|
|
1609
1821
|
circuit_json_build_completed_at?: string | null | undefined;
|
|
1822
|
+
image_generation_started_at?: string | null | undefined;
|
|
1823
|
+
image_generation_completed_at?: string | null | undefined;
|
|
1824
|
+
image_generation_error?: string | null | undefined;
|
|
1610
1825
|
build_started_at?: string | null | undefined;
|
|
1611
1826
|
build_completed_at?: string | null | undefined;
|
|
1612
1827
|
build_error?: string | null | undefined;
|
|
1613
1828
|
preview_url?: string | null | undefined;
|
|
1614
1829
|
build_logs?: string | null | undefined;
|
|
1615
1830
|
}[];
|
|
1616
|
-
}, "addOrder" | "getOrderById" | "getOrderFilesByOrderId" | "addOrderQuote" | "getOrderQuoteById" | "getJlcpcbOrderStatesByOrderId" | "getJlcpcbOrderStepRunsByJlcpcbOrderStateId" | "updateOrder" | "addJlcpcbOrderState" | "updateJlcpcbOrderState" | "addOrderFile" | "getOrderFileById" | "addAccount" | "addAccountPackage" | "getAccountPackageById" | "updateAccountPackage" | "deleteAccountPackage" | "addSnippet" | "getLatestSnippets" | "getTrendingSnippets" | "getPackagesByAuthor" | "getSnippetByAuthorAndName" | "updateSnippet" | "getSnippetById" | "searchSnippets" | "searchPackages" | "searchAccounts" | "deleteSnippet" | "addSession" | "getSessions" | "createLoginPage" | "getLoginPage" | "updateLoginPage" | "getAccount" | "updateAccount" | "createSession" | "addStar" | "removeStar" | "hasStarred" | "addPackage" | "updatePackage" | "getPackageById" | "getPackageReleaseById" | "addPackageRelease" | "updatePackageRelease" | "deletePackageFile" | "addPackageFile" | "updatePackageFile" | "getStarCount" | "getPackageFilesByReleaseId" | "updatePackageReleaseFsSha" | "addAiReview" | "updateAiReview" | "getAiReviewById" | "listAiReviews" | "addDatasheet" | "getDatasheetById" | "getDatasheetByChipName" | "listDatasheets" | "updateDatasheet" | "addPackageBuild" | "getPackageBuildById" | "getPackageBuildsByReleaseId" | "updatePackageBuild"> & {
|
|
1831
|
+
}, "addOrder" | "getOrderById" | "getOrderFilesByOrderId" | "addOrderQuote" | "getOrderQuoteById" | "getJlcpcbOrderStatesByOrderId" | "getJlcpcbOrderStepRunsByJlcpcbOrderStateId" | "updateOrder" | "addJlcpcbOrderState" | "updateJlcpcbOrderState" | "addOrderFile" | "getOrderFileById" | "addAccount" | "addAccountPackage" | "getAccountPackageById" | "updateAccountPackage" | "deleteAccountPackage" | "addSnippet" | "getLatestSnippets" | "getTrendingSnippets" | "getPackagesByAuthor" | "getSnippetByAuthorAndName" | "updateSnippet" | "getSnippetById" | "searchSnippets" | "searchPackages" | "searchAccounts" | "deleteSnippet" | "addSession" | "getSessions" | "createLoginPage" | "getLoginPage" | "updateLoginPage" | "getAccount" | "updateAccount" | "createSession" | "addStar" | "removeStar" | "hasStarred" | "addPackage" | "updatePackage" | "getPackageById" | "getPackageReleaseById" | "addPackageRelease" | "updatePackageRelease" | "deletePackageFile" | "addPackageFile" | "updatePackageFile" | "getStarCount" | "getPackageFilesByReleaseId" | "updatePackageReleaseFsSha" | "addAiReview" | "updateAiReview" | "getAiReviewById" | "listAiReviews" | "addDatasheet" | "getDatasheetById" | "getDatasheetByChipName" | "listDatasheets" | "updateDatasheet" | "addPackageBuild" | "getPackageBuildById" | "getPackageBuildsByReleaseId" | "updatePackageBuild" | "addOrganization" | "getOrgs" | "getOrg" | "addOrganizationAccount" | "getOrganizationAccount" | "getOrganizationAccounts" | "removeOrganizationAccount" | "updateOrganization"> & {
|
|
1617
1832
|
addOrder: (order: Omit<Order, "order_id">) => Order;
|
|
1618
1833
|
getOrderById: (orderId: string) => Order | undefined;
|
|
1619
1834
|
getOrderFilesByOrderId: (orderId: string) => OrderFile[];
|
|
@@ -1644,6 +1859,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1644
1859
|
companyName?: string | undefined;
|
|
1645
1860
|
apartment?: string | undefined;
|
|
1646
1861
|
} | undefined;
|
|
1862
|
+
personal_org_id?: string | undefined;
|
|
1647
1863
|
account_id: string;
|
|
1648
1864
|
};
|
|
1649
1865
|
addAccountPackage: (accountPackage: Omit<AccountPackage, "account_package_id">) => AccountPackage;
|
|
@@ -1712,10 +1928,81 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1712
1928
|
is_popular?: boolean;
|
|
1713
1929
|
}) => Datasheet[];
|
|
1714
1930
|
updateDatasheet: (datasheetId: string, updates: Partial<Datasheet>) => Datasheet | undefined;
|
|
1715
|
-
addPackageBuild: (packageBuild: Omit<
|
|
1931
|
+
addPackageBuild: (packageBuild: Omit<z.input<typeof packageBuildSchema>, "package_build_id">) => PackageBuild;
|
|
1716
1932
|
getPackageBuildById: (packageBuildId: string) => PackageBuild | undefined;
|
|
1717
1933
|
getPackageBuildsByReleaseId: (packageReleaseId: string) => PackageBuild[];
|
|
1718
1934
|
updatePackageBuild: (packageBuildId: string, updates: Partial<PackageBuild>) => PackageBuild | undefined;
|
|
1935
|
+
addOrganization: (organization: {
|
|
1936
|
+
name: string;
|
|
1937
|
+
org_id?: string;
|
|
1938
|
+
is_personal_org?: boolean;
|
|
1939
|
+
owner_account_id: string;
|
|
1940
|
+
}) => {
|
|
1941
|
+
created_at: string;
|
|
1942
|
+
org_id: string;
|
|
1943
|
+
github_handle: string;
|
|
1944
|
+
owner_account_id: string;
|
|
1945
|
+
is_personal_org: boolean;
|
|
1946
|
+
org_display_name?: string | undefined;
|
|
1947
|
+
};
|
|
1948
|
+
getOrgs: (filters?: {
|
|
1949
|
+
owner_account_id?: string;
|
|
1950
|
+
github_handle?: string;
|
|
1951
|
+
name?: string;
|
|
1952
|
+
}, auth?: {
|
|
1953
|
+
account_id?: string;
|
|
1954
|
+
}) => {
|
|
1955
|
+
member_count: number;
|
|
1956
|
+
package_count: number;
|
|
1957
|
+
can_manage_org: boolean;
|
|
1958
|
+
created_at: string;
|
|
1959
|
+
org_id: string;
|
|
1960
|
+
github_handle: string;
|
|
1961
|
+
owner_account_id: string;
|
|
1962
|
+
is_personal_org: boolean;
|
|
1963
|
+
org_display_name?: string | undefined;
|
|
1964
|
+
}[];
|
|
1965
|
+
getOrg: (filters: {
|
|
1966
|
+
org_id?: string;
|
|
1967
|
+
org_name?: string;
|
|
1968
|
+
github_handle?: string;
|
|
1969
|
+
}, auth?: {
|
|
1970
|
+
account_id: string;
|
|
1971
|
+
}) => {
|
|
1972
|
+
member_count: number;
|
|
1973
|
+
package_count: number;
|
|
1974
|
+
can_manage_org: boolean;
|
|
1975
|
+
created_at: string;
|
|
1976
|
+
org_id: string;
|
|
1977
|
+
github_handle: string;
|
|
1978
|
+
owner_account_id: string;
|
|
1979
|
+
is_personal_org: boolean;
|
|
1980
|
+
org_display_name?: string | undefined;
|
|
1981
|
+
} | null;
|
|
1982
|
+
addOrganizationAccount: (organizationAccount: {
|
|
1983
|
+
org_id: string;
|
|
1984
|
+
account_id: string;
|
|
1985
|
+
is_owner?: boolean;
|
|
1986
|
+
}) => {
|
|
1987
|
+
created_at: string;
|
|
1988
|
+
account_id: string;
|
|
1989
|
+
org_id: string;
|
|
1990
|
+
org_account_id: string;
|
|
1991
|
+
is_owner: boolean;
|
|
1992
|
+
};
|
|
1993
|
+
getOrganizationAccount: (filters: {
|
|
1994
|
+
org_id?: string;
|
|
1995
|
+
account_id?: string;
|
|
1996
|
+
}) => OrgAccount | undefined;
|
|
1997
|
+
getOrganizationAccounts: (filters?: {
|
|
1998
|
+
org_id?: string;
|
|
1999
|
+
account_id?: string;
|
|
2000
|
+
}) => OrgAccount[];
|
|
2001
|
+
removeOrganizationAccount: (filters: {
|
|
2002
|
+
org_id: string;
|
|
2003
|
+
account_id: string;
|
|
2004
|
+
}) => boolean;
|
|
2005
|
+
updateOrganization: (orgId: string, updates: Partial<Organization>) => Organization | undefined;
|
|
1719
2006
|
};
|
|
1720
2007
|
type DbClient = ReturnType<typeof createDatabase>;
|
|
1721
2008
|
|