@tscircuit/fake-snippets 0.0.119 → 0.0.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/.github/workflows/bun-pver-release.yml +29 -4
  2. package/bun-tests/fake-snippets-api/routes/bug_reports/create.test.ts +37 -0
  3. package/bun-tests/fake-snippets-api/routes/bug_reports/upload_file.test.ts +89 -0
  4. package/bun.lock +2 -2
  5. package/dist/assets/404-CnNkOMw-.js +1 -0
  6. package/dist/assets/Analytics-DIw7l2gi.js +84 -0
  7. package/dist/assets/BuildsList-CeqVVhbz.js +1 -0
  8. package/dist/assets/CodeAndPreview-Dycd0s15.js +722 -0
  9. package/dist/assets/DownloadButtonAndMenu-OIUhbKkj.js +194 -0
  10. package/dist/assets/FileSaver.min-BDsOlqKl.js +1 -0
  11. package/dist/assets/Footer-DU-HdqGk.js +1 -0
  12. package/dist/assets/GithubAvatarWithFallback-CQhrBiKP.js +6 -0
  13. package/dist/assets/Header-CI4GZVOv.js +1 -0
  14. package/dist/assets/Header2-CrMDmo3P.js +5 -0
  15. package/dist/assets/NotFound-DaXtEPsC.js +1 -0
  16. package/dist/assets/OrganizationCard-Bs2dw-AL.js +1 -0
  17. package/dist/assets/PackageBreadcrumb-DpOpPbGc.js +6 -0
  18. package/dist/assets/PackageCard-ejE2dLlA.js +16 -0
  19. package/dist/assets/PackageSearchResults-BI3Rtmr2.js +1 -0
  20. package/dist/assets/ProfileRouter-4xNgtXr5.js +6 -0
  21. package/dist/assets/alert-dialog-DrOB4Tui.js +1 -0
  22. package/dist/assets/authorize-D-5R3QHA.js +16 -0
  23. package/dist/assets/badge-Bk-k6kyg.js +1 -0
  24. package/dist/assets/card-CzXDit7x.js +1 -0
  25. package/dist/assets/circle-alert-Du9-4of0.js +6 -0
  26. package/dist/assets/circle-check-big-KaRyRsht.js +6 -0
  27. package/dist/assets/cpu-BnvjzmIA.js +6 -0
  28. package/dist/assets/create-organization-BHNFvE7B.js +1 -0
  29. package/dist/assets/dashboard-DDH4V91X.js +11 -0
  30. package/dist/assets/datasheet-DqKtWt-O.js +1 -0
  31. package/dist/assets/datasheets-4W6pEMf3.js +1 -0
  32. package/dist/assets/dev-login-CbHdDthp.js +1 -0
  33. package/dist/assets/editor-bqg9Yv91.js +1 -0
  34. package/dist/assets/editor_example_1-1000w.webp +0 -0
  35. package/dist/assets/editor_example_1-1200w.webp +0 -0
  36. package/dist/assets/editor_example_1-1600w.webp +0 -0
  37. package/dist/assets/editor_example_1-2000w.webp +0 -0
  38. package/dist/assets/editor_example_1-400w.webp +0 -0
  39. package/dist/assets/editor_example_1-600w.webp +0 -0
  40. package/dist/assets/editor_example_1-800w.webp +0 -0
  41. package/dist/assets/editor_example_1_more_square-1000w.webp +0 -0
  42. package/dist/assets/editor_example_1_more_square-1200w.webp +0 -0
  43. package/dist/assets/editor_example_1_more_square-1600w.webp +0 -0
  44. package/dist/assets/editor_example_1_more_square-2000w.webp +0 -0
  45. package/dist/assets/editor_example_1_more_square-400w.webp +0 -0
  46. package/dist/assets/editor_example_1_more_square-600w.webp +0 -0
  47. package/dist/assets/editor_example_1_more_square-800w.webp +0 -0
  48. package/dist/assets/editor_example_2-1000w.webp +0 -0
  49. package/dist/assets/editor_example_2-1200w.webp +0 -0
  50. package/dist/assets/editor_example_2-1600w.webp +0 -0
  51. package/dist/assets/editor_example_2-2000w.webp +0 -0
  52. package/dist/assets/editor_example_2-400w.webp +0 -0
  53. package/dist/assets/editor_example_2-600w.webp +0 -0
  54. package/dist/assets/editor_example_2-800w.webp +0 -0
  55. package/dist/assets/example_schematic-1000w.webp +0 -0
  56. package/dist/assets/example_schematic-1200w.webp +0 -0
  57. package/dist/assets/example_schematic-1600w.webp +0 -0
  58. package/dist/assets/example_schematic-2000w.webp +0 -0
  59. package/dist/assets/example_schematic-400w.webp +0 -0
  60. package/dist/assets/example_schematic-600w.webp +0 -0
  61. package/dist/assets/example_schematic-800w.webp +0 -0
  62. package/dist/assets/eye-B_NMTTT7.js +6 -0
  63. package/dist/assets/fallback-image.svg +1 -0
  64. package/dist/assets/favicon-BwEjZKGP.ico +0 -0
  65. package/dist/assets/formatTimeAgo-CawXna5h.js +6 -0
  66. package/dist/assets/github-DjKGjbX1.js +6 -0
  67. package/dist/assets/github-dark-DHJKELXO.js +1 -0
  68. package/dist/assets/github-light-DAi9KRSo.js +1 -0
  69. package/dist/assets/hash-DfKYpqTm.js +6 -0
  70. package/dist/assets/index-B17tE1vy.js +1 -0
  71. package/dist/assets/index-BQPj88OW.js +6051 -0
  72. package/dist/assets/index-DvNLZBaq.js +6 -0
  73. package/dist/assets/keyboard-4b_qLHIF.js +11 -0
  74. package/dist/assets/label-CTudXc4q.js +1 -0
  75. package/dist/assets/landing-Cjvvx-9q.js +11 -0
  76. package/dist/assets/latest-DMk4BmXW.js +1 -0
  77. package/dist/assets/layers-BJ1iwaVM.js +6 -0
  78. package/dist/assets/load-prettier-DgbV1Jgu.js +1 -0
  79. package/dist/assets/lock-BOZRJdUv.js +6 -0
  80. package/dist/assets/main-DPEM9abA.js +26 -0
  81. package/dist/assets/main-MTKdI4FA.css +1 -0
  82. package/dist/assets/my-orders-B7lEyNR9.js +1 -0
  83. package/dist/assets/organization-settings-rNvhYFgZ.js +6 -0
  84. package/dist/assets/package-editor-T4WIRP49.js +1 -0
  85. package/dist/assets/pen-D54fxNRf.js +6 -0
  86. package/dist/assets/plus-KkE_6Dq2.js +6 -0
  87. package/dist/assets/preview-release-DWhKHFWp.js +1 -0
  88. package/dist/assets/quickstart-WF3HR9Dc.js +1 -0
  89. package/dist/assets/refresh-cw-aWASTRku.js +6 -0
  90. package/dist/assets/release-builds-COa5ndHa.js +1 -0
  91. package/dist/assets/release-detail-iclJPUO-.js +6 -0
  92. package/dist/assets/releases-Clsyp-7n.js +1 -0
  93. package/dist/assets/role-badge-BGF_IMlO.js +16 -0
  94. package/dist/assets/search-CwH23pAU.js +1 -0
  95. package/dist/assets/select-BN8AF1J7.js +1 -0
  96. package/dist/assets/settings-B2bMEtS4.js +6 -0
  97. package/dist/assets/skeleton-DLAS40-y.js +1 -0
  98. package/dist/assets/svg-to-png-BX4YEHCP-JcDm8Hc5.js +1 -0
  99. package/dist/assets/svg-to-png-BX4YEHCP-pNo9Afg8.js +1 -0
  100. package/dist/assets/tabs-Ce0NFuwd.js +1 -0
  101. package/dist/assets/timeAgo-VY0F2EV9.js +10 -0
  102. package/dist/assets/tooltip-C1pwvC0K.js +11 -0
  103. package/dist/assets/trash-2-BW3eClHz.js +6 -0
  104. package/dist/assets/trending-C8246HGf.js +1 -0
  105. package/dist/assets/triangle-alert-BMIBEO1D.js +6 -0
  106. package/dist/assets/tsx-COt5Ahok.js +1 -0
  107. package/dist/assets/use-create-datasheet-B7TDsTUt.js +1 -0
  108. package/dist/assets/use-delete-package-DLKtoTOj.js +1 -0
  109. package/dist/assets/use-download-zip-CAOKjGXW.js +1 -0
  110. package/dist/assets/use-list-user-orgs-CgJIT7N4.js +1 -0
  111. package/dist/assets/use-organization-XwYYTFck.js +1 -0
  112. package/dist/assets/use-package-builds-Bx8rfxi1.js +1 -0
  113. package/dist/assets/use-package-by-package-name-1s1Pcarw.js +1 -0
  114. package/dist/assets/use-package-files-CmmWVuGn.js +1 -0
  115. package/dist/assets/use-package-release-by-id-or-version-BuuXcSZq.js +1 -0
  116. package/dist/assets/use-package-release-images-BMaZtvmk.js +1 -0
  117. package/dist/assets/use-packages-base-api-url-DA1hucM7.js +1 -0
  118. package/dist/assets/useQueries-BJ7Ue7HV.js +1 -0
  119. package/dist/assets/user-settings-BqO5FkMf.js +1 -0
  120. package/dist/assets/view-package-C-OvJr_Q.js +165 -0
  121. package/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
  122. package/dist/assets/wasm-CG6Dc4jp.js +1 -0
  123. package/dist/index.html +127 -0
  124. package/dist/landing.html +34 -0
  125. package/dist/robots.txt +9 -0
  126. package/dist/sitemap.xml +118 -0
  127. package/dist/stats.html +4949 -0
  128. package/fake-snippets-api/lib/db/db-client.ts +89 -0
  129. package/fake-snippets-api/lib/db/schema.ts +29 -0
  130. package/fake-snippets-api/routes/api/bug_reports/create.ts +43 -0
  131. package/fake-snippets-api/routes/api/bug_reports/upload_file.ts +113 -0
  132. package/package.json +2 -2
  133. package/src/components/Header.tsx +16 -0
  134. package/src/components/PackageCard.tsx +7 -4
  135. package/src/components/PackageSearchResults.tsx +1 -7
  136. package/src/components/SearchComponent.tsx +64 -53
  137. package/src/components/TrendingPackagesCarousel.tsx +16 -23
  138. package/src/components/ViewPackagePage/components/mobile-sidebar.tsx +3 -2
  139. package/src/components/ViewPackagePage/components/preview-image-squares.tsx +6 -3
  140. package/src/hooks/use-preview-images.ts +22 -17
  141. package/src/hooks/useUpdatePackageFilesMutation.ts +8 -0
  142. package/src/lib/utils/getPackagePreviewImageUrl.ts +15 -0
  143. package/src/pages/dashboard.tsx +0 -1
  144. package/src/pages/editor.tsx +12 -9
  145. package/src/pages/organization-profile.tsx +0 -1
  146. package/src/pages/package-editor.tsx +13 -9
  147. package/src/pages/user-profile.tsx +0 -1
  148. package/dist/bundle.js +0 -9034
  149. package/dist/index.d.ts +0 -2065
  150. package/dist/index.js +0 -3737
  151. package/dist/schema.d.ts +0 -2972
  152. package/dist/schema.js +0 -426
  153. package/fake-snippets-api/bun.lockb +0 -0
package/dist/index.d.ts DELETED
@@ -1,2065 +0,0 @@
1
- import * as zustand_vanilla from 'zustand/vanilla';
2
- import { z } from 'zod';
3
- import { Middleware } from 'winterspec';
4
-
5
- declare const snippetSchema: z.ZodObject<{
6
- snippet_id: z.ZodString;
7
- package_release_id: z.ZodString;
8
- name: z.ZodString;
9
- unscoped_name: z.ZodString;
10
- owner_name: z.ZodString;
11
- is_starred: z.ZodDefault<z.ZodBoolean>;
12
- code: z.ZodString;
13
- dts: z.ZodOptional<z.ZodString>;
14
- compiled_js: z.ZodNullable<z.ZodOptional<z.ZodString>>;
15
- circuit_json: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
16
- manual_edits_json_content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
17
- created_at: z.ZodString;
18
- updated_at: z.ZodString;
19
- starred_at: z.ZodOptional<z.ZodString>;
20
- snippet_type: z.ZodEnum<["board", "package", "model", "footprint"]>;
21
- description: z.ZodOptional<z.ZodString>;
22
- version: z.ZodDefault<z.ZodString>;
23
- star_count: z.ZodDefault<z.ZodNumber>;
24
- is_private: z.ZodDefault<z.ZodBoolean>;
25
- is_public: z.ZodDefault<z.ZodBoolean>;
26
- is_unlisted: z.ZodDefault<z.ZodBoolean>;
27
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
28
- }, "strip", z.ZodTypeAny, {
29
- code: string;
30
- snippet_id: string;
31
- package_release_id: string;
32
- name: string;
33
- unscoped_name: string;
34
- owner_name: string;
35
- is_starred: boolean;
36
- created_at: string;
37
- updated_at: string;
38
- snippet_type: "board" | "package" | "model" | "footprint";
39
- version: string;
40
- star_count: number;
41
- is_private: boolean;
42
- is_public: boolean;
43
- is_unlisted: boolean;
44
- dts?: string | undefined;
45
- compiled_js?: string | null | undefined;
46
- circuit_json?: Record<string, any>[] | null | undefined;
47
- manual_edits_json_content?: string | null | undefined;
48
- starred_at?: string | undefined;
49
- description?: string | undefined;
50
- tags?: string[] | undefined;
51
- }, {
52
- code: string;
53
- snippet_id: string;
54
- package_release_id: string;
55
- name: string;
56
- unscoped_name: string;
57
- owner_name: string;
58
- created_at: string;
59
- updated_at: string;
60
- snippet_type: "board" | "package" | "model" | "footprint";
61
- is_starred?: boolean | undefined;
62
- dts?: string | undefined;
63
- compiled_js?: string | null | undefined;
64
- circuit_json?: Record<string, any>[] | null | undefined;
65
- manual_edits_json_content?: string | null | undefined;
66
- starred_at?: string | undefined;
67
- description?: string | undefined;
68
- version?: string | undefined;
69
- star_count?: number | undefined;
70
- is_private?: boolean | undefined;
71
- is_public?: boolean | undefined;
72
- is_unlisted?: boolean | undefined;
73
- tags?: string[] | undefined;
74
- }>;
75
- type Snippet = z.infer<typeof snippetSchema>;
76
- declare const sessionSchema: z.ZodObject<{
77
- session_id: z.ZodString;
78
- account_id: z.ZodString;
79
- expires_at: z.ZodString;
80
- is_cli_session: z.ZodBoolean;
81
- }, "strip", z.ZodTypeAny, {
82
- session_id: string;
83
- account_id: string;
84
- expires_at: string;
85
- is_cli_session: boolean;
86
- }, {
87
- session_id: string;
88
- account_id: string;
89
- expires_at: string;
90
- is_cli_session: boolean;
91
- }>;
92
- type Session = z.infer<typeof sessionSchema>;
93
- declare const loginPageSchema: z.ZodObject<{
94
- login_page_id: z.ZodString;
95
- login_page_auth_token: z.ZodString;
96
- was_login_successful: z.ZodBoolean;
97
- has_been_used_to_create_session: z.ZodBoolean;
98
- created_at: z.ZodString;
99
- expires_at: z.ZodString;
100
- }, "strip", z.ZodTypeAny, {
101
- created_at: string;
102
- expires_at: string;
103
- login_page_id: string;
104
- login_page_auth_token: string;
105
- was_login_successful: boolean;
106
- has_been_used_to_create_session: boolean;
107
- }, {
108
- created_at: string;
109
- expires_at: string;
110
- login_page_id: string;
111
- login_page_auth_token: string;
112
- was_login_successful: boolean;
113
- has_been_used_to_create_session: boolean;
114
- }>;
115
- type LoginPage = z.infer<typeof loginPageSchema>;
116
- declare const accountSchema: z.ZodObject<{
117
- account_id: z.ZodString;
118
- github_username: z.ZodString;
119
- shippingInfo: z.ZodOptional<z.ZodObject<{
120
- firstName: z.ZodString;
121
- lastName: z.ZodString;
122
- companyName: z.ZodOptional<z.ZodString>;
123
- address: z.ZodString;
124
- apartment: z.ZodOptional<z.ZodString>;
125
- city: z.ZodString;
126
- state: z.ZodString;
127
- zipCode: z.ZodString;
128
- country: z.ZodString;
129
- phone: z.ZodString;
130
- }, "strip", z.ZodTypeAny, {
131
- firstName: string;
132
- lastName: string;
133
- address: string;
134
- city: string;
135
- state: string;
136
- zipCode: string;
137
- country: string;
138
- phone: string;
139
- companyName?: string | undefined;
140
- apartment?: string | undefined;
141
- }, {
142
- firstName: string;
143
- lastName: string;
144
- address: string;
145
- city: string;
146
- state: string;
147
- zipCode: string;
148
- country: string;
149
- phone: string;
150
- companyName?: string | undefined;
151
- apartment?: string | undefined;
152
- }>>;
153
- personal_org_id: z.ZodOptional<z.ZodString>;
154
- is_tscircuit_staff: z.ZodDefault<z.ZodBoolean>;
155
- }, "strip", z.ZodTypeAny, {
156
- account_id: string;
157
- github_username: string;
158
- is_tscircuit_staff: boolean;
159
- shippingInfo?: {
160
- firstName: string;
161
- lastName: string;
162
- address: string;
163
- city: string;
164
- state: string;
165
- zipCode: string;
166
- country: string;
167
- phone: string;
168
- companyName?: string | undefined;
169
- apartment?: string | undefined;
170
- } | undefined;
171
- personal_org_id?: string | undefined;
172
- }, {
173
- account_id: string;
174
- github_username: string;
175
- shippingInfo?: {
176
- firstName: string;
177
- lastName: string;
178
- address: string;
179
- city: string;
180
- state: string;
181
- zipCode: string;
182
- country: string;
183
- phone: string;
184
- companyName?: string | undefined;
185
- apartment?: string | undefined;
186
- } | undefined;
187
- personal_org_id?: string | undefined;
188
- is_tscircuit_staff?: boolean | undefined;
189
- }>;
190
- type Account = z.infer<typeof accountSchema>;
191
- declare const orderSchema: z.ZodObject<{
192
- order_id: z.ZodString;
193
- account_id: z.ZodNullable<z.ZodString>;
194
- is_running: z.ZodBoolean;
195
- is_started: z.ZodBoolean;
196
- is_finished: z.ZodBoolean;
197
- error: z.ZodNullable<z.ZodObject<{
198
- error_code: z.ZodString;
199
- message: z.ZodString;
200
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
201
- error_code: z.ZodString;
202
- message: z.ZodString;
203
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
204
- error_code: z.ZodString;
205
- message: z.ZodString;
206
- }, z.ZodTypeAny, "passthrough">>>;
207
- has_error: z.ZodBoolean;
208
- created_at: z.ZodString;
209
- started_at: z.ZodNullable<z.ZodString>;
210
- completed_at: z.ZodNullable<z.ZodString>;
211
- circuit_json: z.ZodAny;
212
- }, "strip", z.ZodTypeAny, {
213
- error: z.objectOutputType<{
214
- error_code: z.ZodString;
215
- message: z.ZodString;
216
- }, z.ZodTypeAny, "passthrough"> | null;
217
- created_at: string;
218
- account_id: string | null;
219
- order_id: string;
220
- is_running: boolean;
221
- is_started: boolean;
222
- is_finished: boolean;
223
- has_error: boolean;
224
- started_at: string | null;
225
- completed_at: string | null;
226
- circuit_json?: any;
227
- }, {
228
- error: z.objectInputType<{
229
- error_code: z.ZodString;
230
- message: z.ZodString;
231
- }, z.ZodTypeAny, "passthrough"> | null;
232
- created_at: string;
233
- account_id: string | null;
234
- order_id: string;
235
- is_running: boolean;
236
- is_started: boolean;
237
- is_finished: boolean;
238
- has_error: boolean;
239
- started_at: string | null;
240
- completed_at: string | null;
241
- circuit_json?: any;
242
- }>;
243
- type Order = z.infer<typeof orderSchema>;
244
- declare const orderFileSchema: z.ZodObject<{
245
- order_file_id: z.ZodString;
246
- order_id: z.ZodString;
247
- is_gerbers_zip: z.ZodBoolean;
248
- content_type: z.ZodString;
249
- for_provider: z.ZodNullable<z.ZodString>;
250
- uploaded_at: z.ZodString;
251
- content_text: z.ZodNullable<z.ZodString>;
252
- content_bytes: z.ZodNullable<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>>;
253
- }, "strip", z.ZodTypeAny, {
254
- order_id: string;
255
- order_file_id: string;
256
- is_gerbers_zip: boolean;
257
- content_type: string;
258
- for_provider: string | null;
259
- uploaded_at: string;
260
- content_text: string | null;
261
- content_bytes: Uint8Array<ArrayBuffer> | null;
262
- }, {
263
- order_id: string;
264
- order_file_id: string;
265
- is_gerbers_zip: boolean;
266
- content_type: string;
267
- for_provider: string | null;
268
- uploaded_at: string;
269
- content_text: string | null;
270
- content_bytes: Uint8Array<ArrayBuffer> | null;
271
- }>;
272
- type OrderFile = z.infer<typeof orderFileSchema>;
273
- declare const orderQuoteSchema: z.ZodObject<{
274
- order_quote_id: z.ZodString;
275
- account_id: z.ZodNullable<z.ZodString>;
276
- package_release_id: z.ZodNullable<z.ZodString>;
277
- is_completed: z.ZodDefault<z.ZodBoolean>;
278
- is_processing: z.ZodDefault<z.ZodBoolean>;
279
- vendor_name: z.ZodString;
280
- error: z.ZodNullable<z.ZodObject<{
281
- error_code: z.ZodString;
282
- message: z.ZodString;
283
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
284
- error_code: z.ZodString;
285
- message: z.ZodString;
286
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
287
- error_code: z.ZodString;
288
- message: z.ZodString;
289
- }, z.ZodTypeAny, "passthrough">>>;
290
- has_error: z.ZodDefault<z.ZodBoolean>;
291
- created_at: z.ZodString;
292
- updated_at: z.ZodString;
293
- completed_at: z.ZodNullable<z.ZodString>;
294
- quoted_components: z.ZodNullable<z.ZodArray<z.ZodObject<{
295
- manufacturer_part_number: z.ZodNullable<z.ZodString>;
296
- supplier_part_number: z.ZodNullable<z.ZodString>;
297
- quantity: z.ZodDefault<z.ZodNumber>;
298
- unit_price: z.ZodDefault<z.ZodNumber>;
299
- total_price: z.ZodDefault<z.ZodNumber>;
300
- available: z.ZodDefault<z.ZodBoolean>;
301
- }, "strip", z.ZodTypeAny, {
302
- manufacturer_part_number: string | null;
303
- supplier_part_number: string | null;
304
- quantity: number;
305
- unit_price: number;
306
- total_price: number;
307
- available: boolean;
308
- }, {
309
- manufacturer_part_number: string | null;
310
- supplier_part_number: string | null;
311
- quantity?: number | undefined;
312
- unit_price?: number | undefined;
313
- total_price?: number | undefined;
314
- available?: boolean | undefined;
315
- }>, "many">>;
316
- bare_pcb_cost: z.ZodDefault<z.ZodNumber>;
317
- shipping_options: z.ZodArray<z.ZodObject<{
318
- carrier: z.ZodString;
319
- service: z.ZodString;
320
- cost: z.ZodNumber;
321
- }, "strip", z.ZodTypeAny, {
322
- carrier: string;
323
- service: string;
324
- cost: number;
325
- }, {
326
- carrier: string;
327
- service: string;
328
- cost: number;
329
- }>, "many">;
330
- total_cost_without_shipping: z.ZodDefault<z.ZodNumber>;
331
- }, "strip", z.ZodTypeAny, {
332
- error: z.objectOutputType<{
333
- error_code: z.ZodString;
334
- message: z.ZodString;
335
- }, z.ZodTypeAny, "passthrough"> | null;
336
- package_release_id: string | null;
337
- created_at: string;
338
- updated_at: string;
339
- account_id: string | null;
340
- has_error: boolean;
341
- completed_at: string | null;
342
- order_quote_id: string;
343
- is_completed: boolean;
344
- is_processing: boolean;
345
- vendor_name: string;
346
- quoted_components: {
347
- manufacturer_part_number: string | null;
348
- supplier_part_number: string | null;
349
- quantity: number;
350
- unit_price: number;
351
- total_price: number;
352
- available: boolean;
353
- }[] | null;
354
- bare_pcb_cost: number;
355
- shipping_options: {
356
- carrier: string;
357
- service: string;
358
- cost: number;
359
- }[];
360
- total_cost_without_shipping: number;
361
- }, {
362
- error: z.objectInputType<{
363
- error_code: z.ZodString;
364
- message: z.ZodString;
365
- }, z.ZodTypeAny, "passthrough"> | null;
366
- package_release_id: string | null;
367
- created_at: string;
368
- updated_at: string;
369
- account_id: string | null;
370
- completed_at: string | null;
371
- order_quote_id: string;
372
- vendor_name: string;
373
- quoted_components: {
374
- manufacturer_part_number: string | null;
375
- supplier_part_number: string | null;
376
- quantity?: number | undefined;
377
- unit_price?: number | undefined;
378
- total_price?: number | undefined;
379
- available?: boolean | undefined;
380
- }[] | null;
381
- shipping_options: {
382
- carrier: string;
383
- service: string;
384
- cost: number;
385
- }[];
386
- has_error?: boolean | undefined;
387
- is_completed?: boolean | undefined;
388
- is_processing?: boolean | undefined;
389
- bare_pcb_cost?: number | undefined;
390
- total_cost_without_shipping?: number | undefined;
391
- }>;
392
- type OrderQuote = z.infer<typeof orderQuoteSchema>;
393
- declare const aiReviewSchema: z.ZodObject<{
394
- ai_review_id: z.ZodString;
395
- package_release_id: z.ZodOptional<z.ZodString>;
396
- ai_review_text: z.ZodNullable<z.ZodString>;
397
- start_processing_at: z.ZodNullable<z.ZodString>;
398
- finished_processing_at: z.ZodNullable<z.ZodString>;
399
- processing_error: z.ZodNullable<z.ZodAny>;
400
- created_at: z.ZodString;
401
- display_status: z.ZodEnum<["pending", "completed", "failed"]>;
402
- }, "strip", z.ZodTypeAny, {
403
- created_at: string;
404
- ai_review_id: string;
405
- ai_review_text: string | null;
406
- start_processing_at: string | null;
407
- finished_processing_at: string | null;
408
- display_status: "pending" | "completed" | "failed";
409
- package_release_id?: string | undefined;
410
- processing_error?: any;
411
- }, {
412
- created_at: string;
413
- ai_review_id: string;
414
- ai_review_text: string | null;
415
- start_processing_at: string | null;
416
- finished_processing_at: string | null;
417
- display_status: "pending" | "completed" | "failed";
418
- package_release_id?: string | undefined;
419
- processing_error?: any;
420
- }>;
421
- type AiReview = z.infer<typeof aiReviewSchema>;
422
- declare const datasheetSchema: z.ZodObject<{
423
- datasheet_id: z.ZodString;
424
- chip_name: z.ZodString;
425
- created_at: z.ZodString;
426
- pin_information: z.ZodNullable<z.ZodArray<z.ZodObject<{
427
- pin_number: z.ZodString;
428
- name: z.ZodString;
429
- description: z.ZodString;
430
- capabilities: z.ZodArray<z.ZodString, "many">;
431
- }, "strip", z.ZodTypeAny, {
432
- name: string;
433
- description: string;
434
- pin_number: string;
435
- capabilities: string[];
436
- }, {
437
- name: string;
438
- description: string;
439
- pin_number: string;
440
- capabilities: string[];
441
- }>, "many">>;
442
- datasheet_pdf_urls: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
443
- ai_description: z.ZodNullable<z.ZodString>;
444
- }, "strip", z.ZodTypeAny, {
445
- created_at: string;
446
- datasheet_id: string;
447
- chip_name: string;
448
- pin_information: {
449
- name: string;
450
- description: string;
451
- pin_number: string;
452
- capabilities: string[];
453
- }[] | null;
454
- datasheet_pdf_urls: string[] | null;
455
- ai_description: string | null;
456
- }, {
457
- created_at: string;
458
- datasheet_id: string;
459
- chip_name: string;
460
- pin_information: {
461
- name: string;
462
- description: string;
463
- pin_number: string;
464
- capabilities: string[];
465
- }[] | null;
466
- datasheet_pdf_urls: string[] | null;
467
- ai_description: string | null;
468
- }>;
469
- type Datasheet = z.infer<typeof datasheetSchema>;
470
- declare const accountPackageSchema: z.ZodObject<{
471
- account_package_id: z.ZodString;
472
- account_id: z.ZodString;
473
- package_id: z.ZodString;
474
- is_starred: z.ZodBoolean;
475
- created_at: z.ZodString;
476
- updated_at: z.ZodString;
477
- }, "strip", z.ZodTypeAny, {
478
- is_starred: boolean;
479
- created_at: string;
480
- updated_at: string;
481
- account_id: string;
482
- account_package_id: string;
483
- package_id: string;
484
- }, {
485
- is_starred: boolean;
486
- created_at: string;
487
- updated_at: string;
488
- account_id: string;
489
- account_package_id: string;
490
- package_id: string;
491
- }>;
492
- type AccountPackage = z.infer<typeof accountPackageSchema>;
493
- declare const packageReleaseSchema: z.ZodObject<{
494
- package_release_id: z.ZodString;
495
- package_id: z.ZodString;
496
- version: z.ZodNullable<z.ZodString>;
497
- is_locked: z.ZodBoolean;
498
- is_latest: z.ZodBoolean;
499
- created_at: z.ZodString;
500
- commit_sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
501
- license: z.ZodOptional<z.ZodNullable<z.ZodString>>;
502
- circuit_json_build_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
503
- circuit_json_build_error_last_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
504
- has_transpiled: z.ZodDefault<z.ZodBoolean>;
505
- transpilation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
506
- fs_sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
507
- display_status: z.ZodDefault<z.ZodEnum<["pending", "building", "complete", "error"]>>;
508
- total_build_duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
509
- transpilation_display_status: z.ZodDefault<z.ZodEnum<["pending", "building", "complete", "error"]>>;
510
- transpilation_in_progress: z.ZodDefault<z.ZodBoolean>;
511
- transpilation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
512
- transpilation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
513
- transpilation_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
514
- transpilation_is_stale: z.ZodDefault<z.ZodBoolean>;
515
- circuit_json_build_display_status: z.ZodDefault<z.ZodEnum<["pending", "building", "complete", "error"]>>;
516
- circuit_json_build_in_progress: z.ZodDefault<z.ZodBoolean>;
517
- circuit_json_build_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
518
- circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
519
- circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
520
- circuit_json_build_is_stale: z.ZodDefault<z.ZodBoolean>;
521
- image_generation_display_status: z.ZodDefault<z.ZodEnum<["pending", "building", "complete", "error"]>>;
522
- image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
523
- image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
524
- image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
525
- image_generation_logs: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodAny, "many">>>;
526
- image_generation_is_stale: z.ZodDefault<z.ZodBoolean>;
527
- image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
528
- image_generation_error_last_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
529
- ai_review_text: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
530
- ai_review_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
531
- ai_review_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
532
- ai_review_error: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
533
- ai_review_logs: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodAny, "many">>>;
534
- ai_review_requested: z.ZodDefault<z.ZodBoolean>;
535
- is_pr_preview: z.ZodDefault<z.ZodBoolean>;
536
- github_pr_number: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
537
- latest_package_build_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
538
- branch_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
539
- commit_message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
540
- commit_author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
541
- pcb_preview_image_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
542
- sch_preview_image_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
543
- cad_preview_image_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
544
- }, "strip", z.ZodTypeAny, {
545
- package_release_id: string;
546
- created_at: string;
547
- version: string | null;
548
- display_status: "error" | "pending" | "building" | "complete";
549
- package_id: string;
550
- is_locked: boolean;
551
- is_latest: boolean;
552
- has_transpiled: boolean;
553
- transpilation_display_status: "error" | "pending" | "building" | "complete";
554
- transpilation_in_progress: boolean;
555
- transpilation_logs: any[];
556
- transpilation_is_stale: boolean;
557
- circuit_json_build_display_status: "error" | "pending" | "building" | "complete";
558
- circuit_json_build_in_progress: boolean;
559
- circuit_json_build_logs: any[];
560
- circuit_json_build_is_stale: boolean;
561
- image_generation_display_status: "error" | "pending" | "building" | "complete";
562
- image_generation_in_progress: boolean;
563
- image_generation_logs: any[] | null;
564
- image_generation_is_stale: boolean;
565
- ai_review_requested: boolean;
566
- is_pr_preview: boolean;
567
- pcb_preview_image_url: string | null;
568
- sch_preview_image_url: string | null;
569
- cad_preview_image_url: string | null;
570
- ai_review_text?: string | null | undefined;
571
- commit_sha?: string | null | undefined;
572
- license?: string | null | undefined;
573
- circuit_json_build_error?: string | null | undefined;
574
- circuit_json_build_error_last_updated_at?: string | null | undefined;
575
- transpilation_error?: string | null | undefined;
576
- fs_sha?: string | null | undefined;
577
- total_build_duration_ms?: number | null | undefined;
578
- transpilation_started_at?: string | null | undefined;
579
- transpilation_completed_at?: string | null | undefined;
580
- circuit_json_build_started_at?: string | null | undefined;
581
- circuit_json_build_completed_at?: string | null | undefined;
582
- image_generation_started_at?: string | null | undefined;
583
- image_generation_completed_at?: string | null | undefined;
584
- image_generation_error?: string | null | undefined;
585
- image_generation_error_last_updated_at?: string | null | undefined;
586
- ai_review_started_at?: string | null | undefined;
587
- ai_review_completed_at?: string | null | undefined;
588
- ai_review_error?: any;
589
- ai_review_logs?: any[] | null | undefined;
590
- github_pr_number?: number | null | undefined;
591
- latest_package_build_id?: string | null | undefined;
592
- branch_name?: string | null | undefined;
593
- commit_message?: string | null | undefined;
594
- commit_author?: string | null | undefined;
595
- }, {
596
- package_release_id: string;
597
- created_at: string;
598
- version: string | null;
599
- package_id: string;
600
- is_locked: boolean;
601
- is_latest: boolean;
602
- ai_review_text?: string | null | undefined;
603
- display_status?: "error" | "pending" | "building" | "complete" | undefined;
604
- commit_sha?: string | null | undefined;
605
- license?: string | null | undefined;
606
- circuit_json_build_error?: string | null | undefined;
607
- circuit_json_build_error_last_updated_at?: string | null | undefined;
608
- has_transpiled?: boolean | undefined;
609
- transpilation_error?: string | null | undefined;
610
- fs_sha?: string | null | undefined;
611
- total_build_duration_ms?: number | null | undefined;
612
- transpilation_display_status?: "error" | "pending" | "building" | "complete" | undefined;
613
- transpilation_in_progress?: boolean | undefined;
614
- transpilation_started_at?: string | null | undefined;
615
- transpilation_completed_at?: string | null | undefined;
616
- transpilation_logs?: any[] | undefined;
617
- transpilation_is_stale?: boolean | undefined;
618
- circuit_json_build_display_status?: "error" | "pending" | "building" | "complete" | undefined;
619
- circuit_json_build_in_progress?: boolean | undefined;
620
- circuit_json_build_started_at?: string | null | undefined;
621
- circuit_json_build_completed_at?: string | null | undefined;
622
- circuit_json_build_logs?: any[] | undefined;
623
- circuit_json_build_is_stale?: boolean | undefined;
624
- image_generation_display_status?: "error" | "pending" | "building" | "complete" | undefined;
625
- image_generation_in_progress?: boolean | undefined;
626
- image_generation_started_at?: string | null | undefined;
627
- image_generation_completed_at?: string | null | undefined;
628
- image_generation_logs?: any[] | null | undefined;
629
- image_generation_is_stale?: boolean | undefined;
630
- image_generation_error?: string | null | undefined;
631
- image_generation_error_last_updated_at?: string | null | undefined;
632
- ai_review_started_at?: string | null | undefined;
633
- ai_review_completed_at?: string | null | undefined;
634
- ai_review_error?: any;
635
- ai_review_logs?: any[] | null | undefined;
636
- ai_review_requested?: boolean | undefined;
637
- is_pr_preview?: boolean | undefined;
638
- github_pr_number?: number | null | undefined;
639
- latest_package_build_id?: string | null | undefined;
640
- branch_name?: string | null | undefined;
641
- commit_message?: string | null | undefined;
642
- commit_author?: string | null | undefined;
643
- pcb_preview_image_url?: string | null | undefined;
644
- sch_preview_image_url?: string | null | undefined;
645
- cad_preview_image_url?: string | null | undefined;
646
- }>;
647
- type PackageRelease = z.infer<typeof packageReleaseSchema>;
648
- declare const packageFileSchema: z.ZodObject<{
649
- package_file_id: z.ZodString;
650
- package_release_id: z.ZodString;
651
- file_path: z.ZodString;
652
- content_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
653
- created_at: z.ZodString;
654
- content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
655
- is_release_tarball: z.ZodOptional<z.ZodBoolean>;
656
- npm_pack_output: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
657
- }, "strip", z.ZodTypeAny, {
658
- package_release_id: string;
659
- created_at: string;
660
- package_file_id: string;
661
- file_path: string;
662
- content_text?: string | null | undefined;
663
- content_mimetype?: string | null | undefined;
664
- is_release_tarball?: boolean | undefined;
665
- npm_pack_output?: any;
666
- }, {
667
- package_release_id: string;
668
- created_at: string;
669
- package_file_id: string;
670
- file_path: string;
671
- content_text?: string | null | undefined;
672
- content_mimetype?: string | null | undefined;
673
- is_release_tarball?: boolean | undefined;
674
- npm_pack_output?: any;
675
- }>;
676
- type PackageFile = z.infer<typeof packageFileSchema>;
677
- declare const packageSchema: z.ZodObject<{
678
- package_id: z.ZodString;
679
- creator_account_id: z.ZodString;
680
- owner_org_id: z.ZodString;
681
- owner_github_username: z.ZodNullable<z.ZodString>;
682
- github_repo_full_name: z.ZodNullable<z.ZodString>;
683
- name: z.ZodString;
684
- unscoped_name: z.ZodString;
685
- description: z.ZodNullable<z.ZodString>;
686
- created_at: z.ZodString;
687
- updated_at: z.ZodString;
688
- is_snippet: z.ZodDefault<z.ZodBoolean>;
689
- is_board: z.ZodDefault<z.ZodBoolean>;
690
- is_package: z.ZodDefault<z.ZodBoolean>;
691
- is_model: z.ZodDefault<z.ZodBoolean>;
692
- is_footprint: z.ZodDefault<z.ZodBoolean>;
693
- is_private: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
694
- is_public: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
695
- is_unlisted: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
696
- is_source_from_github: z.ZodDefault<z.ZodBoolean>;
697
- snippet_type: z.ZodOptional<z.ZodEnum<["board", "package", "model", "footprint"]>>;
698
- latest_package_release_id: z.ZodNullable<z.ZodString>;
699
- latest_version: z.ZodNullable<z.ZodString>;
700
- license: z.ZodNullable<z.ZodString>;
701
- website: z.ZodDefault<z.ZodNullable<z.ZodString>>;
702
- star_count: z.ZodDefault<z.ZodNumber>;
703
- ai_description: z.ZodNullable<z.ZodString>;
704
- latest_license: z.ZodOptional<z.ZodNullable<z.ZodString>>;
705
- ai_usage_instructions: z.ZodNullable<z.ZodString>;
706
- latest_package_release_fs_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
707
- default_view: z.ZodOptional<z.ZodDefault<z.ZodEnum<["files", "3d", "pcb", "schematic"]>>>;
708
- allow_pr_previews: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
709
- is_starred: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
710
- latest_pcb_preview_image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
711
- latest_sch_preview_image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
712
- latest_cad_preview_image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
713
- }, "strip", z.ZodTypeAny, {
714
- name: string;
715
- unscoped_name: string;
716
- created_at: string;
717
- updated_at: string;
718
- description: string | null;
719
- star_count: number;
720
- is_private: boolean | null;
721
- is_public: boolean | null;
722
- is_unlisted: boolean | null;
723
- ai_description: string | null;
724
- package_id: string;
725
- license: string | null;
726
- creator_account_id: string;
727
- owner_org_id: string;
728
- owner_github_username: string | null;
729
- github_repo_full_name: string | null;
730
- is_snippet: boolean;
731
- is_board: boolean;
732
- is_package: boolean;
733
- is_model: boolean;
734
- is_footprint: boolean;
735
- is_source_from_github: boolean;
736
- latest_package_release_id: string | null;
737
- latest_version: string | null;
738
- website: string | null;
739
- ai_usage_instructions: string | null;
740
- latest_package_release_fs_sha: string | null;
741
- is_starred?: boolean | undefined;
742
- snippet_type?: "board" | "package" | "model" | "footprint" | undefined;
743
- latest_license?: string | null | undefined;
744
- default_view?: "files" | "3d" | "pcb" | "schematic" | undefined;
745
- allow_pr_previews?: boolean | undefined;
746
- latest_pcb_preview_image_url?: string | null | undefined;
747
- latest_sch_preview_image_url?: string | null | undefined;
748
- latest_cad_preview_image_url?: string | null | undefined;
749
- }, {
750
- name: string;
751
- unscoped_name: string;
752
- created_at: string;
753
- updated_at: string;
754
- description: string | null;
755
- ai_description: string | null;
756
- package_id: string;
757
- license: string | null;
758
- creator_account_id: string;
759
- owner_org_id: string;
760
- owner_github_username: string | null;
761
- github_repo_full_name: string | null;
762
- latest_package_release_id: string | null;
763
- latest_version: string | null;
764
- ai_usage_instructions: string | null;
765
- is_starred?: boolean | undefined;
766
- snippet_type?: "board" | "package" | "model" | "footprint" | undefined;
767
- star_count?: number | undefined;
768
- is_private?: boolean | null | undefined;
769
- is_public?: boolean | null | undefined;
770
- is_unlisted?: boolean | null | undefined;
771
- is_snippet?: boolean | undefined;
772
- is_board?: boolean | undefined;
773
- is_package?: boolean | undefined;
774
- is_model?: boolean | undefined;
775
- is_footprint?: boolean | undefined;
776
- is_source_from_github?: boolean | undefined;
777
- website?: string | null | undefined;
778
- latest_license?: string | null | undefined;
779
- latest_package_release_fs_sha?: string | null | undefined;
780
- default_view?: "files" | "3d" | "pcb" | "schematic" | undefined;
781
- allow_pr_previews?: boolean | undefined;
782
- latest_pcb_preview_image_url?: string | null | undefined;
783
- latest_sch_preview_image_url?: string | null | undefined;
784
- latest_cad_preview_image_url?: string | null | undefined;
785
- }>;
786
- type Package = z.infer<typeof packageSchema>;
787
- declare const jlcpcbOrderStateSchema: z.ZodObject<{
788
- jlcpcb_order_state_id: z.ZodString;
789
- order_id: z.ZodString;
790
- are_gerbers_uploaded: z.ZodDefault<z.ZodBoolean>;
791
- is_gerber_analyzed: z.ZodDefault<z.ZodBoolean>;
792
- are_initial_costs_calculated: z.ZodDefault<z.ZodBoolean>;
793
- is_pcb_added_to_cart: z.ZodDefault<z.ZodBoolean>;
794
- is_bom_uploaded: z.ZodDefault<z.ZodBoolean>;
795
- is_pnp_uploaded: z.ZodDefault<z.ZodBoolean>;
796
- is_bom_pnp_analyzed: z.ZodDefault<z.ZodBoolean>;
797
- is_bom_parsing_complete: z.ZodDefault<z.ZodBoolean>;
798
- are_components_available: z.ZodDefault<z.ZodBoolean>;
799
- is_patch_map_generated: z.ZodDefault<z.ZodBoolean>;
800
- is_json_merge_file_created: z.ZodDefault<z.ZodBoolean>;
801
- is_dfm_result_generated: z.ZodDefault<z.ZodBoolean>;
802
- are_files_downloaded: z.ZodDefault<z.ZodBoolean>;
803
- are_product_categories_fetched: z.ZodDefault<z.ZodBoolean>;
804
- are_final_costs_calculated: z.ZodDefault<z.ZodBoolean>;
805
- is_json_merge_file_updated: z.ZodDefault<z.ZodBoolean>;
806
- is_added_to_cart: z.ZodDefault<z.ZodBoolean>;
807
- uploaded_gerber_metadata: z.ZodDefault<z.ZodNullable<z.ZodAny>>;
808
- gerber_analysis: z.ZodDefault<z.ZodNullable<z.ZodAny>>;
809
- created_at: z.ZodString;
810
- are_gerbers_generated: z.ZodDefault<z.ZodBoolean>;
811
- current_step: z.ZodDefault<z.ZodNullable<z.ZodString>>;
812
- }, "strip", z.ZodTypeAny, {
813
- created_at: string;
814
- order_id: string;
815
- jlcpcb_order_state_id: string;
816
- are_gerbers_uploaded: boolean;
817
- is_gerber_analyzed: boolean;
818
- are_initial_costs_calculated: boolean;
819
- is_pcb_added_to_cart: boolean;
820
- is_bom_uploaded: boolean;
821
- is_pnp_uploaded: boolean;
822
- is_bom_pnp_analyzed: boolean;
823
- is_bom_parsing_complete: boolean;
824
- are_components_available: boolean;
825
- is_patch_map_generated: boolean;
826
- is_json_merge_file_created: boolean;
827
- is_dfm_result_generated: boolean;
828
- are_files_downloaded: boolean;
829
- are_product_categories_fetched: boolean;
830
- are_final_costs_calculated: boolean;
831
- is_json_merge_file_updated: boolean;
832
- is_added_to_cart: boolean;
833
- are_gerbers_generated: boolean;
834
- current_step: string | null;
835
- uploaded_gerber_metadata?: any;
836
- gerber_analysis?: any;
837
- }, {
838
- created_at: string;
839
- order_id: string;
840
- jlcpcb_order_state_id: string;
841
- are_gerbers_uploaded?: boolean | undefined;
842
- is_gerber_analyzed?: boolean | undefined;
843
- are_initial_costs_calculated?: boolean | undefined;
844
- is_pcb_added_to_cart?: boolean | undefined;
845
- is_bom_uploaded?: boolean | undefined;
846
- is_pnp_uploaded?: boolean | undefined;
847
- is_bom_pnp_analyzed?: boolean | undefined;
848
- is_bom_parsing_complete?: boolean | undefined;
849
- are_components_available?: boolean | undefined;
850
- is_patch_map_generated?: boolean | undefined;
851
- is_json_merge_file_created?: boolean | undefined;
852
- is_dfm_result_generated?: boolean | undefined;
853
- are_files_downloaded?: boolean | undefined;
854
- are_product_categories_fetched?: boolean | undefined;
855
- are_final_costs_calculated?: boolean | undefined;
856
- is_json_merge_file_updated?: boolean | undefined;
857
- is_added_to_cart?: boolean | undefined;
858
- uploaded_gerber_metadata?: any;
859
- gerber_analysis?: any;
860
- are_gerbers_generated?: boolean | undefined;
861
- current_step?: string | null | undefined;
862
- }>;
863
- type JlcpcbOrderState = z.infer<typeof jlcpcbOrderStateSchema>;
864
- declare const jlcpcbOrderStepRunSchema: z.ZodObject<{
865
- jlcpcb_order_step_run_id: z.ZodString;
866
- is_running: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
867
- step_function_name: z.ZodDefault<z.ZodNullable<z.ZodString>>;
868
- jlcpcb_order_state_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
869
- error_message: z.ZodDefault<z.ZodNullable<z.ZodString>>;
870
- created_at: z.ZodString;
871
- }, "strip", z.ZodTypeAny, {
872
- created_at: string;
873
- is_running: boolean | null;
874
- jlcpcb_order_state_id: string | null;
875
- jlcpcb_order_step_run_id: string;
876
- step_function_name: string | null;
877
- error_message: string | null;
878
- }, {
879
- created_at: string;
880
- jlcpcb_order_step_run_id: string;
881
- is_running?: boolean | null | undefined;
882
- jlcpcb_order_state_id?: string | null | undefined;
883
- step_function_name?: string | null | undefined;
884
- error_message?: string | null | undefined;
885
- }>;
886
- type JlcpcbOrderStepRun = z.infer<typeof jlcpcbOrderStepRunSchema>;
887
- declare const packageBuildSchema: z.ZodObject<{
888
- package_build_id: z.ZodString;
889
- package_release_id: z.ZodString;
890
- created_at: z.ZodString;
891
- transpilation_in_progress: z.ZodDefault<z.ZodBoolean>;
892
- transpilation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
893
- transpilation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
894
- transpilation_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
895
- transpilation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
896
- circuit_json_build_in_progress: z.ZodDefault<z.ZodBoolean>;
897
- circuit_json_build_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
898
- circuit_json_build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
899
- circuit_json_build_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
900
- circuit_json_build_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
901
- image_generation_in_progress: z.ZodDefault<z.ZodBoolean>;
902
- image_generation_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
903
- image_generation_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
904
- image_generation_logs: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
905
- image_generation_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
906
- build_in_progress: z.ZodDefault<z.ZodBoolean>;
907
- build_started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
908
- build_completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
909
- build_error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
910
- build_error_last_updated_at: z.ZodString;
911
- preview_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
912
- build_logs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
913
- }, "strip", z.ZodTypeAny, {
914
- package_release_id: string;
915
- created_at: string;
916
- transpilation_in_progress: boolean;
917
- transpilation_logs: any[];
918
- circuit_json_build_in_progress: boolean;
919
- circuit_json_build_logs: any[];
920
- image_generation_in_progress: boolean;
921
- image_generation_logs: any[];
922
- package_build_id: string;
923
- build_in_progress: boolean;
924
- build_error_last_updated_at: string;
925
- circuit_json_build_error?: string | null | undefined;
926
- transpilation_error?: string | null | undefined;
927
- transpilation_started_at?: string | null | undefined;
928
- transpilation_completed_at?: string | null | undefined;
929
- circuit_json_build_started_at?: string | null | undefined;
930
- circuit_json_build_completed_at?: string | null | undefined;
931
- image_generation_started_at?: string | null | undefined;
932
- image_generation_completed_at?: string | null | undefined;
933
- image_generation_error?: string | null | undefined;
934
- build_started_at?: string | null | undefined;
935
- build_completed_at?: string | null | undefined;
936
- build_error?: string | null | undefined;
937
- preview_url?: string | null | undefined;
938
- build_logs?: string | null | undefined;
939
- }, {
940
- package_release_id: string;
941
- created_at: string;
942
- package_build_id: string;
943
- build_error_last_updated_at: string;
944
- circuit_json_build_error?: string | null | undefined;
945
- transpilation_error?: string | null | undefined;
946
- transpilation_in_progress?: boolean | undefined;
947
- transpilation_started_at?: string | null | undefined;
948
- transpilation_completed_at?: string | null | undefined;
949
- transpilation_logs?: any[] | undefined;
950
- circuit_json_build_in_progress?: boolean | undefined;
951
- circuit_json_build_started_at?: string | null | undefined;
952
- circuit_json_build_completed_at?: string | null | undefined;
953
- circuit_json_build_logs?: any[] | undefined;
954
- image_generation_in_progress?: boolean | undefined;
955
- image_generation_started_at?: string | null | undefined;
956
- image_generation_completed_at?: string | null | undefined;
957
- image_generation_logs?: any[] | undefined;
958
- image_generation_error?: string | null | undefined;
959
- build_in_progress?: boolean | undefined;
960
- build_started_at?: string | null | undefined;
961
- build_completed_at?: string | null | undefined;
962
- build_error?: string | null | undefined;
963
- preview_url?: string | null | undefined;
964
- build_logs?: string | null | undefined;
965
- }>;
966
- type PackageBuild = z.infer<typeof packageBuildSchema>;
967
- declare const orgSchema: z.ZodObject<{
968
- org_id: z.ZodString;
969
- github_handle: z.ZodOptional<z.ZodString>;
970
- owner_account_id: z.ZodString;
971
- is_personal_org: z.ZodDefault<z.ZodBoolean>;
972
- created_at: z.ZodString;
973
- org_display_name: z.ZodOptional<z.ZodString>;
974
- org_name: z.ZodString;
975
- }, "strip", z.ZodTypeAny, {
976
- created_at: string;
977
- org_id: string;
978
- owner_account_id: string;
979
- is_personal_org: boolean;
980
- org_name: string;
981
- github_handle?: string | undefined;
982
- org_display_name?: string | undefined;
983
- }, {
984
- created_at: string;
985
- org_id: string;
986
- owner_account_id: string;
987
- org_name: string;
988
- github_handle?: string | undefined;
989
- is_personal_org?: boolean | undefined;
990
- org_display_name?: string | undefined;
991
- }>;
992
- type Organization = z.infer<typeof orgSchema>;
993
- declare const orgAccountSchema: z.ZodObject<{
994
- org_account_id: z.ZodString;
995
- org_id: z.ZodString;
996
- account_id: z.ZodString;
997
- is_owner: z.ZodDefault<z.ZodBoolean>;
998
- created_at: z.ZodString;
999
- }, "strip", z.ZodTypeAny, {
1000
- created_at: string;
1001
- account_id: string;
1002
- org_id: string;
1003
- org_account_id: string;
1004
- is_owner: boolean;
1005
- }, {
1006
- created_at: string;
1007
- account_id: string;
1008
- org_id: string;
1009
- org_account_id: string;
1010
- is_owner?: boolean | undefined;
1011
- }>;
1012
- type OrgAccount = z.infer<typeof orgAccountSchema>;
1013
-
1014
- declare const createDatabase: ({ seed }?: {
1015
- seed?: boolean;
1016
- }) => zustand_vanilla.StoreApi<Omit<{
1017
- idCounter: number;
1018
- snippets: {
1019
- code: string;
1020
- snippet_id: string;
1021
- package_release_id: string;
1022
- name: string;
1023
- unscoped_name: string;
1024
- owner_name: string;
1025
- is_starred: boolean;
1026
- created_at: string;
1027
- updated_at: string;
1028
- snippet_type: "board" | "package" | "model" | "footprint";
1029
- version: string;
1030
- star_count: number;
1031
- is_private: boolean;
1032
- is_public: boolean;
1033
- is_unlisted: boolean;
1034
- dts?: string | undefined;
1035
- compiled_js?: string | null | undefined;
1036
- circuit_json?: Record<string, any>[] | null | undefined;
1037
- manual_edits_json_content?: string | null | undefined;
1038
- starred_at?: string | undefined;
1039
- description?: string | undefined;
1040
- tags?: string[] | undefined;
1041
- }[];
1042
- packageReleases: {
1043
- package_release_id: string;
1044
- created_at: string;
1045
- version: string | null;
1046
- display_status: "error" | "pending" | "building" | "complete";
1047
- package_id: string;
1048
- is_locked: boolean;
1049
- is_latest: boolean;
1050
- has_transpiled: boolean;
1051
- transpilation_display_status: "error" | "pending" | "building" | "complete";
1052
- transpilation_in_progress: boolean;
1053
- transpilation_logs: any[];
1054
- transpilation_is_stale: boolean;
1055
- circuit_json_build_display_status: "error" | "pending" | "building" | "complete";
1056
- circuit_json_build_in_progress: boolean;
1057
- circuit_json_build_logs: any[];
1058
- circuit_json_build_is_stale: boolean;
1059
- image_generation_display_status: "error" | "pending" | "building" | "complete";
1060
- image_generation_in_progress: boolean;
1061
- image_generation_logs: any[] | null;
1062
- image_generation_is_stale: boolean;
1063
- ai_review_requested: boolean;
1064
- is_pr_preview: boolean;
1065
- pcb_preview_image_url: string | null;
1066
- sch_preview_image_url: string | null;
1067
- cad_preview_image_url: string | null;
1068
- ai_review_text?: string | null | undefined;
1069
- commit_sha?: string | null | undefined;
1070
- license?: string | null | undefined;
1071
- circuit_json_build_error?: string | null | undefined;
1072
- circuit_json_build_error_last_updated_at?: string | null | undefined;
1073
- transpilation_error?: string | null | undefined;
1074
- fs_sha?: string | null | undefined;
1075
- total_build_duration_ms?: number | null | undefined;
1076
- transpilation_started_at?: string | null | undefined;
1077
- transpilation_completed_at?: string | null | undefined;
1078
- circuit_json_build_started_at?: string | null | undefined;
1079
- circuit_json_build_completed_at?: string | null | undefined;
1080
- image_generation_started_at?: string | null | undefined;
1081
- image_generation_completed_at?: string | null | undefined;
1082
- image_generation_error?: string | null | undefined;
1083
- image_generation_error_last_updated_at?: string | null | undefined;
1084
- ai_review_started_at?: string | null | undefined;
1085
- ai_review_completed_at?: string | null | undefined;
1086
- ai_review_error?: any;
1087
- ai_review_logs?: any[] | null | undefined;
1088
- github_pr_number?: number | null | undefined;
1089
- latest_package_build_id?: string | null | undefined;
1090
- branch_name?: string | null | undefined;
1091
- commit_message?: string | null | undefined;
1092
- commit_author?: string | null | undefined;
1093
- }[];
1094
- packageFiles: {
1095
- package_release_id: string;
1096
- created_at: string;
1097
- package_file_id: string;
1098
- file_path: string;
1099
- content_text?: string | null | undefined;
1100
- content_mimetype?: string | null | undefined;
1101
- is_release_tarball?: boolean | undefined;
1102
- npm_pack_output?: any;
1103
- }[];
1104
- sessions: {
1105
- session_id: string;
1106
- account_id: string;
1107
- expires_at: string;
1108
- is_cli_session: boolean;
1109
- }[];
1110
- loginPages: {
1111
- created_at: string;
1112
- expires_at: string;
1113
- login_page_id: string;
1114
- login_page_auth_token: string;
1115
- was_login_successful: boolean;
1116
- has_been_used_to_create_session: boolean;
1117
- }[];
1118
- accounts: {
1119
- account_id: string;
1120
- github_username: string;
1121
- is_tscircuit_staff: boolean;
1122
- shippingInfo?: {
1123
- firstName: string;
1124
- lastName: string;
1125
- address: string;
1126
- city: string;
1127
- state: string;
1128
- zipCode: string;
1129
- country: string;
1130
- phone: string;
1131
- companyName?: string | undefined;
1132
- apartment?: string | undefined;
1133
- } | undefined;
1134
- personal_org_id?: string | undefined;
1135
- }[];
1136
- packages: {
1137
- name: string;
1138
- unscoped_name: string;
1139
- created_at: string;
1140
- updated_at: string;
1141
- description: string | null;
1142
- star_count: number;
1143
- is_private: boolean | null;
1144
- is_public: boolean | null;
1145
- is_unlisted: boolean | null;
1146
- ai_description: string | null;
1147
- package_id: string;
1148
- license: string | null;
1149
- creator_account_id: string;
1150
- owner_org_id: string;
1151
- owner_github_username: string | null;
1152
- github_repo_full_name: string | null;
1153
- is_snippet: boolean;
1154
- is_board: boolean;
1155
- is_package: boolean;
1156
- is_model: boolean;
1157
- is_footprint: boolean;
1158
- is_source_from_github: boolean;
1159
- latest_package_release_id: string | null;
1160
- latest_version: string | null;
1161
- website: string | null;
1162
- ai_usage_instructions: string | null;
1163
- latest_package_release_fs_sha: string | null;
1164
- is_starred?: boolean | undefined;
1165
- snippet_type?: "board" | "package" | "model" | "footprint" | undefined;
1166
- latest_license?: string | null | undefined;
1167
- default_view?: "files" | "3d" | "pcb" | "schematic" | undefined;
1168
- allow_pr_previews?: boolean | undefined;
1169
- latest_pcb_preview_image_url?: string | null | undefined;
1170
- latest_sch_preview_image_url?: string | null | undefined;
1171
- latest_cad_preview_image_url?: string | null | undefined;
1172
- }[];
1173
- orders: {
1174
- error: z.objectOutputType<{
1175
- error_code: z.ZodString;
1176
- message: z.ZodString;
1177
- }, z.ZodTypeAny, "passthrough"> | null;
1178
- created_at: string;
1179
- account_id: string | null;
1180
- order_id: string;
1181
- is_running: boolean;
1182
- is_started: boolean;
1183
- is_finished: boolean;
1184
- has_error: boolean;
1185
- started_at: string | null;
1186
- completed_at: string | null;
1187
- circuit_json?: any;
1188
- }[];
1189
- organizations: {
1190
- created_at: string;
1191
- org_id: string;
1192
- owner_account_id: string;
1193
- is_personal_org: boolean;
1194
- org_name: string;
1195
- github_handle?: string | undefined;
1196
- org_display_name?: string | undefined;
1197
- }[];
1198
- orgAccounts: {
1199
- created_at: string;
1200
- account_id: string;
1201
- org_id: string;
1202
- org_account_id: string;
1203
- is_owner: boolean;
1204
- }[];
1205
- orderFiles: {
1206
- order_id: string;
1207
- order_file_id: string;
1208
- is_gerbers_zip: boolean;
1209
- content_type: string;
1210
- for_provider: string | null;
1211
- uploaded_at: string;
1212
- content_text: string | null;
1213
- content_bytes: Uint8Array<ArrayBuffer> | null;
1214
- }[];
1215
- accountSnippets: {
1216
- snippet_id: string;
1217
- created_at: string;
1218
- updated_at: string;
1219
- account_id: string;
1220
- has_starred: boolean;
1221
- }[];
1222
- accountPackages: {
1223
- is_starred: boolean;
1224
- created_at: string;
1225
- updated_at: string;
1226
- account_id: string;
1227
- account_package_id: string;
1228
- package_id: string;
1229
- }[];
1230
- jlcpcbOrderState: {
1231
- created_at: string;
1232
- order_id: string;
1233
- jlcpcb_order_state_id: string;
1234
- are_gerbers_uploaded: boolean;
1235
- is_gerber_analyzed: boolean;
1236
- are_initial_costs_calculated: boolean;
1237
- is_pcb_added_to_cart: boolean;
1238
- is_bom_uploaded: boolean;
1239
- is_pnp_uploaded: boolean;
1240
- is_bom_pnp_analyzed: boolean;
1241
- is_bom_parsing_complete: boolean;
1242
- are_components_available: boolean;
1243
- is_patch_map_generated: boolean;
1244
- is_json_merge_file_created: boolean;
1245
- is_dfm_result_generated: boolean;
1246
- are_files_downloaded: boolean;
1247
- are_product_categories_fetched: boolean;
1248
- are_final_costs_calculated: boolean;
1249
- is_json_merge_file_updated: boolean;
1250
- is_added_to_cart: boolean;
1251
- are_gerbers_generated: boolean;
1252
- current_step: string | null;
1253
- uploaded_gerber_metadata?: any;
1254
- gerber_analysis?: any;
1255
- }[];
1256
- jlcpcbOrderStepRuns: {
1257
- created_at: string;
1258
- is_running: boolean | null;
1259
- jlcpcb_order_state_id: string | null;
1260
- jlcpcb_order_step_run_id: string;
1261
- step_function_name: string | null;
1262
- error_message: string | null;
1263
- }[];
1264
- orderQuotes: {
1265
- error: z.objectOutputType<{
1266
- error_code: z.ZodString;
1267
- message: z.ZodString;
1268
- }, z.ZodTypeAny, "passthrough"> | null;
1269
- package_release_id: string | null;
1270
- created_at: string;
1271
- updated_at: string;
1272
- account_id: string | null;
1273
- has_error: boolean;
1274
- completed_at: string | null;
1275
- order_quote_id: string;
1276
- is_completed: boolean;
1277
- is_processing: boolean;
1278
- vendor_name: string;
1279
- quoted_components: {
1280
- manufacturer_part_number: string | null;
1281
- supplier_part_number: string | null;
1282
- quantity: number;
1283
- unit_price: number;
1284
- total_price: number;
1285
- available: boolean;
1286
- }[] | null;
1287
- bare_pcb_cost: number;
1288
- shipping_options: {
1289
- carrier: string;
1290
- service: string;
1291
- cost: number;
1292
- }[];
1293
- total_cost_without_shipping: number;
1294
- }[];
1295
- aiReviews: {
1296
- created_at: string;
1297
- ai_review_id: string;
1298
- ai_review_text: string | null;
1299
- start_processing_at: string | null;
1300
- finished_processing_at: string | null;
1301
- display_status: "pending" | "completed" | "failed";
1302
- package_release_id?: string | undefined;
1303
- processing_error?: any;
1304
- }[];
1305
- datasheets: {
1306
- created_at: string;
1307
- datasheet_id: string;
1308
- chip_name: string;
1309
- pin_information: {
1310
- name: string;
1311
- description: string;
1312
- pin_number: string;
1313
- capabilities: string[];
1314
- }[] | null;
1315
- datasheet_pdf_urls: string[] | null;
1316
- ai_description: string | null;
1317
- }[];
1318
- githubInstallations: {
1319
- created_at: string;
1320
- updated_at: string;
1321
- account_id: string;
1322
- github_username: string;
1323
- github_installation_id: string;
1324
- installation_id: string;
1325
- is_active: boolean;
1326
- access_token?: string | null | undefined;
1327
- access_token_expires_at?: string | null | undefined;
1328
- }[];
1329
- packageBuilds: {
1330
- package_release_id: string;
1331
- created_at: string;
1332
- transpilation_in_progress: boolean;
1333
- transpilation_logs: any[];
1334
- circuit_json_build_in_progress: boolean;
1335
- circuit_json_build_logs: any[];
1336
- image_generation_in_progress: boolean;
1337
- image_generation_logs: any[];
1338
- package_build_id: string;
1339
- build_in_progress: boolean;
1340
- build_error_last_updated_at: string;
1341
- circuit_json_build_error?: string | null | undefined;
1342
- transpilation_error?: string | null | undefined;
1343
- transpilation_started_at?: string | null | undefined;
1344
- transpilation_completed_at?: string | null | undefined;
1345
- circuit_json_build_started_at?: string | null | undefined;
1346
- circuit_json_build_completed_at?: string | null | undefined;
1347
- image_generation_started_at?: string | null | undefined;
1348
- image_generation_completed_at?: string | null | undefined;
1349
- image_generation_error?: string | null | undefined;
1350
- build_started_at?: string | null | undefined;
1351
- build_completed_at?: string | null | undefined;
1352
- build_error?: string | null | undefined;
1353
- preview_url?: string | null | undefined;
1354
- build_logs?: string | null | undefined;
1355
- }[];
1356
- }, "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"> & {
1357
- addOrder: (order: Omit<Order, "order_id">) => Order;
1358
- getOrderById: (orderId: string) => Order | undefined;
1359
- getOrderFilesByOrderId: (orderId: string) => OrderFile[];
1360
- addOrderQuote: ({ account_id, package_release_id, vendor_name, }: {
1361
- account_id: string;
1362
- package_release_id?: string;
1363
- vendor_name: string;
1364
- }) => string;
1365
- getOrderQuoteById: (orderQuoteId: string) => OrderQuote | undefined;
1366
- getJlcpcbOrderStatesByOrderId: (orderId: string) => JlcpcbOrderState | undefined;
1367
- getJlcpcbOrderStepRunsByJlcpcbOrderStateId: (jlcpcbOrderStateId: string) => JlcpcbOrderStepRun[];
1368
- updateOrder: (orderId: string, updates: Partial<Order>) => void;
1369
- addJlcpcbOrderState: (orderState: Omit<JlcpcbOrderState, "jlcpcb_order_state_id">) => JlcpcbOrderState;
1370
- updateJlcpcbOrderState: (orderId: string, updates: Partial<JlcpcbOrderState>) => void;
1371
- addOrderFile: (orderFile: Omit<OrderFile, "order_file_id">) => OrderFile;
1372
- getOrderFileById: (orderFileId: string) => OrderFile | undefined;
1373
- addAccount: (account: Omit<Account, "account_id" | "is_tscircuit_staff"> & Partial<Pick<Account, "account_id" | "is_tscircuit_staff">>) => {
1374
- is_tscircuit_staff: boolean;
1375
- github_username: string;
1376
- shippingInfo?: {
1377
- firstName: string;
1378
- lastName: string;
1379
- address: string;
1380
- city: string;
1381
- state: string;
1382
- zipCode: string;
1383
- country: string;
1384
- phone: string;
1385
- companyName?: string | undefined;
1386
- apartment?: string | undefined;
1387
- } | undefined;
1388
- personal_org_id?: string | undefined;
1389
- account_id: string;
1390
- };
1391
- addAccountPackage: (accountPackage: Omit<AccountPackage, "account_package_id">) => AccountPackage;
1392
- getAccountPackageById: (accountPackageId: string) => AccountPackage | undefined;
1393
- updateAccountPackage: (accountPackageId: string, updates: Partial<AccountPackage>) => void;
1394
- deleteAccountPackage: (accountPackageId: string) => boolean;
1395
- addSnippet: (snippet: Omit<z.input<typeof snippetSchema>, "snippet_id" | "package_release_id"> & {
1396
- creator_account_id?: string;
1397
- github_repo_full_name?: string;
1398
- branch_name?: string;
1399
- commit_message?: string;
1400
- commit_author?: string;
1401
- }) => Snippet;
1402
- getLatestSnippets: (limit: number) => Snippet[];
1403
- getTrendingSnippets: (limit: number, since: string) => Snippet[];
1404
- getPackagesByAuthor: (authorName?: string) => Package[];
1405
- getSnippetByAuthorAndName: (authorName: string, snippetName: string) => Snippet | undefined;
1406
- updateSnippet: (snippetId: string, updates: Partial<Snippet>) => Snippet | undefined;
1407
- getSnippetById: (snippetId: string, auth?: {
1408
- github_username: string;
1409
- }) => Snippet | undefined;
1410
- searchSnippets: (query: string) => Snippet[];
1411
- searchPackages: (query: string) => Package[];
1412
- searchAccounts: (query: string, limit?: number) => Account[];
1413
- deleteSnippet: (snippetId: string) => boolean;
1414
- addSession: (session: Omit<Session, "session_id">) => Session;
1415
- getSessions: ({ account_id, is_cli_session, }: {
1416
- account_id: string;
1417
- is_cli_session?: boolean;
1418
- }) => Session[];
1419
- createLoginPage: () => LoginPage;
1420
- getLoginPage: (loginPageId: string) => LoginPage | undefined;
1421
- updateLoginPage: (loginPageId: string, updates: Partial<LoginPage>) => void;
1422
- getAccount: (accountId: string) => Account | undefined;
1423
- updateAccount: (accountId: string, updates: Partial<Account>) => Account | undefined;
1424
- createSession: (session: Omit<Session, "session_id">) => Session;
1425
- addStar: (accountId: string, packageId: string) => AccountPackage;
1426
- removeStar: (accountId: string, packageId: string) => void;
1427
- hasStarred: (accountId: string, packageId: string) => boolean;
1428
- addPackage: (_package: Omit<z.input<typeof packageSchema>, "package_id" | "github_repo_full_name">) => Package;
1429
- updatePackage: (packageId: string, updates: Partial<Package>) => Package | undefined;
1430
- getPackageById: (packageId: string) => Package | undefined;
1431
- getPackageReleaseById: (packageReleaseId: string) => PackageRelease | undefined;
1432
- addPackageRelease: (packageRelease: Omit<z.input<typeof packageReleaseSchema>, "package_release_id">) => PackageRelease;
1433
- updatePackageRelease: (packageRelease: PackageRelease) => void;
1434
- deletePackageFile: (packageFileId: string) => boolean;
1435
- addPackageFile: (packageFile: Omit<PackageFile, "package_file_id">) => PackageFile;
1436
- updatePackageFile: (packageFileId: string, updates: Partial<Omit<PackageFile, "package_file_id">>) => PackageFile;
1437
- getStarCount: (packageId: string) => number;
1438
- getPackageFilesByReleaseId: (packageReleaseId: string) => PackageFile[];
1439
- /**
1440
- * Update fs_sha for a package release based on its files
1441
- */
1442
- updatePackageReleaseFsSha: (packageReleaseId: string) => void;
1443
- addAiReview: (review: Omit<AiReview, "ai_review_id">) => AiReview;
1444
- updateAiReview: (aiReviewId: string, updates: Partial<AiReview>) => AiReview | undefined;
1445
- getAiReviewById: (aiReviewId: string) => AiReview | undefined;
1446
- listAiReviews: () => AiReview[];
1447
- addDatasheet: ({ chip_name }: {
1448
- chip_name: string;
1449
- }) => Datasheet;
1450
- getDatasheetById: (datasheetId: string) => Datasheet | undefined;
1451
- getDatasheetByChipName: (chipName: string) => Datasheet | undefined;
1452
- listDatasheets: ({ chip_name, is_popular, }?: {
1453
- chip_name?: string;
1454
- is_popular?: boolean;
1455
- }) => Datasheet[];
1456
- updateDatasheet: (datasheetId: string, updates: Partial<Datasheet>) => Datasheet | undefined;
1457
- addPackageBuild: (packageBuild: Omit<z.input<typeof packageBuildSchema>, "package_build_id">) => PackageBuild;
1458
- getPackageBuildById: (packageBuildId: string) => PackageBuild | undefined;
1459
- getPackageBuildsByReleaseId: (packageReleaseId: string) => PackageBuild[];
1460
- updatePackageBuild: (packageBuildId: string, updates: Partial<PackageBuild>) => PackageBuild | undefined;
1461
- addOrganization: (organization: {
1462
- name: string;
1463
- org_id?: string;
1464
- is_personal_org?: boolean;
1465
- owner_account_id: string;
1466
- github_handle?: string;
1467
- }) => {
1468
- created_at: string;
1469
- org_id: string;
1470
- owner_account_id: string;
1471
- is_personal_org: boolean;
1472
- org_name: string;
1473
- github_handle?: string | undefined;
1474
- org_display_name?: string | undefined;
1475
- };
1476
- getOrgs: (filters?: {
1477
- owner_account_id?: string;
1478
- github_handle?: string;
1479
- name?: string;
1480
- }, auth?: {
1481
- account_id?: string;
1482
- }) => {
1483
- member_count: number;
1484
- package_count: number;
1485
- can_manage_org: boolean;
1486
- created_at: string;
1487
- org_id: string;
1488
- owner_account_id: string;
1489
- is_personal_org: boolean;
1490
- org_name: string;
1491
- github_handle?: string | undefined;
1492
- org_display_name?: string | undefined;
1493
- }[];
1494
- getOrg: (filters: {
1495
- org_id?: string;
1496
- org_name?: string;
1497
- github_handle?: string;
1498
- }, auth?: {
1499
- account_id: string;
1500
- }) => {
1501
- member_count: number;
1502
- package_count: number;
1503
- can_manage_org: boolean;
1504
- created_at: string;
1505
- org_id: string;
1506
- owner_account_id: string;
1507
- is_personal_org: boolean;
1508
- org_name: string;
1509
- github_handle?: string | undefined;
1510
- org_display_name?: string | undefined;
1511
- } | null;
1512
- addOrganizationAccount: (organizationAccount: {
1513
- org_id: string;
1514
- account_id: string;
1515
- is_owner?: boolean;
1516
- }) => {
1517
- created_at: string;
1518
- account_id: string;
1519
- org_id: string;
1520
- org_account_id: string;
1521
- is_owner: boolean;
1522
- };
1523
- getOrganizationAccount: (filters: {
1524
- org_id?: string;
1525
- account_id?: string;
1526
- }) => OrgAccount | undefined;
1527
- getOrganizationAccounts: (filters?: {
1528
- org_id?: string;
1529
- account_id?: string;
1530
- }) => OrgAccount[];
1531
- removeOrganizationAccount: (filters: {
1532
- org_id: string;
1533
- account_id: string;
1534
- }) => boolean;
1535
- updateOrganization: (orgId: string, updates: Partial<Organization>) => Organization | undefined;
1536
- }> & Omit<{
1537
- idCounter: number;
1538
- snippets: {
1539
- code: string;
1540
- snippet_id: string;
1541
- package_release_id: string;
1542
- name: string;
1543
- unscoped_name: string;
1544
- owner_name: string;
1545
- is_starred: boolean;
1546
- created_at: string;
1547
- updated_at: string;
1548
- snippet_type: "board" | "package" | "model" | "footprint";
1549
- version: string;
1550
- star_count: number;
1551
- is_private: boolean;
1552
- is_public: boolean;
1553
- is_unlisted: boolean;
1554
- dts?: string | undefined;
1555
- compiled_js?: string | null | undefined;
1556
- circuit_json?: Record<string, any>[] | null | undefined;
1557
- manual_edits_json_content?: string | null | undefined;
1558
- starred_at?: string | undefined;
1559
- description?: string | undefined;
1560
- tags?: string[] | undefined;
1561
- }[];
1562
- packageReleases: {
1563
- package_release_id: string;
1564
- created_at: string;
1565
- version: string | null;
1566
- display_status: "error" | "pending" | "building" | "complete";
1567
- package_id: string;
1568
- is_locked: boolean;
1569
- is_latest: boolean;
1570
- has_transpiled: boolean;
1571
- transpilation_display_status: "error" | "pending" | "building" | "complete";
1572
- transpilation_in_progress: boolean;
1573
- transpilation_logs: any[];
1574
- transpilation_is_stale: boolean;
1575
- circuit_json_build_display_status: "error" | "pending" | "building" | "complete";
1576
- circuit_json_build_in_progress: boolean;
1577
- circuit_json_build_logs: any[];
1578
- circuit_json_build_is_stale: boolean;
1579
- image_generation_display_status: "error" | "pending" | "building" | "complete";
1580
- image_generation_in_progress: boolean;
1581
- image_generation_logs: any[] | null;
1582
- image_generation_is_stale: boolean;
1583
- ai_review_requested: boolean;
1584
- is_pr_preview: boolean;
1585
- pcb_preview_image_url: string | null;
1586
- sch_preview_image_url: string | null;
1587
- cad_preview_image_url: string | null;
1588
- ai_review_text?: string | null | undefined;
1589
- commit_sha?: string | null | undefined;
1590
- license?: string | null | undefined;
1591
- circuit_json_build_error?: string | null | undefined;
1592
- circuit_json_build_error_last_updated_at?: string | null | undefined;
1593
- transpilation_error?: string | null | undefined;
1594
- fs_sha?: string | null | undefined;
1595
- total_build_duration_ms?: number | null | undefined;
1596
- transpilation_started_at?: string | null | undefined;
1597
- transpilation_completed_at?: string | null | undefined;
1598
- circuit_json_build_started_at?: string | null | undefined;
1599
- circuit_json_build_completed_at?: string | null | undefined;
1600
- image_generation_started_at?: string | null | undefined;
1601
- image_generation_completed_at?: string | null | undefined;
1602
- image_generation_error?: string | null | undefined;
1603
- image_generation_error_last_updated_at?: string | null | undefined;
1604
- ai_review_started_at?: string | null | undefined;
1605
- ai_review_completed_at?: string | null | undefined;
1606
- ai_review_error?: any;
1607
- ai_review_logs?: any[] | null | undefined;
1608
- github_pr_number?: number | null | undefined;
1609
- latest_package_build_id?: string | null | undefined;
1610
- branch_name?: string | null | undefined;
1611
- commit_message?: string | null | undefined;
1612
- commit_author?: string | null | undefined;
1613
- }[];
1614
- packageFiles: {
1615
- package_release_id: string;
1616
- created_at: string;
1617
- package_file_id: string;
1618
- file_path: string;
1619
- content_text?: string | null | undefined;
1620
- content_mimetype?: string | null | undefined;
1621
- is_release_tarball?: boolean | undefined;
1622
- npm_pack_output?: any;
1623
- }[];
1624
- sessions: {
1625
- session_id: string;
1626
- account_id: string;
1627
- expires_at: string;
1628
- is_cli_session: boolean;
1629
- }[];
1630
- loginPages: {
1631
- created_at: string;
1632
- expires_at: string;
1633
- login_page_id: string;
1634
- login_page_auth_token: string;
1635
- was_login_successful: boolean;
1636
- has_been_used_to_create_session: boolean;
1637
- }[];
1638
- accounts: {
1639
- account_id: string;
1640
- github_username: string;
1641
- is_tscircuit_staff: boolean;
1642
- shippingInfo?: {
1643
- firstName: string;
1644
- lastName: string;
1645
- address: string;
1646
- city: string;
1647
- state: string;
1648
- zipCode: string;
1649
- country: string;
1650
- phone: string;
1651
- companyName?: string | undefined;
1652
- apartment?: string | undefined;
1653
- } | undefined;
1654
- personal_org_id?: string | undefined;
1655
- }[];
1656
- packages: {
1657
- name: string;
1658
- unscoped_name: string;
1659
- created_at: string;
1660
- updated_at: string;
1661
- description: string | null;
1662
- star_count: number;
1663
- is_private: boolean | null;
1664
- is_public: boolean | null;
1665
- is_unlisted: boolean | null;
1666
- ai_description: string | null;
1667
- package_id: string;
1668
- license: string | null;
1669
- creator_account_id: string;
1670
- owner_org_id: string;
1671
- owner_github_username: string | null;
1672
- github_repo_full_name: string | null;
1673
- is_snippet: boolean;
1674
- is_board: boolean;
1675
- is_package: boolean;
1676
- is_model: boolean;
1677
- is_footprint: boolean;
1678
- is_source_from_github: boolean;
1679
- latest_package_release_id: string | null;
1680
- latest_version: string | null;
1681
- website: string | null;
1682
- ai_usage_instructions: string | null;
1683
- latest_package_release_fs_sha: string | null;
1684
- is_starred?: boolean | undefined;
1685
- snippet_type?: "board" | "package" | "model" | "footprint" | undefined;
1686
- latest_license?: string | null | undefined;
1687
- default_view?: "files" | "3d" | "pcb" | "schematic" | undefined;
1688
- allow_pr_previews?: boolean | undefined;
1689
- latest_pcb_preview_image_url?: string | null | undefined;
1690
- latest_sch_preview_image_url?: string | null | undefined;
1691
- latest_cad_preview_image_url?: string | null | undefined;
1692
- }[];
1693
- orders: {
1694
- error: z.objectOutputType<{
1695
- error_code: z.ZodString;
1696
- message: z.ZodString;
1697
- }, z.ZodTypeAny, "passthrough"> | null;
1698
- created_at: string;
1699
- account_id: string | null;
1700
- order_id: string;
1701
- is_running: boolean;
1702
- is_started: boolean;
1703
- is_finished: boolean;
1704
- has_error: boolean;
1705
- started_at: string | null;
1706
- completed_at: string | null;
1707
- circuit_json?: any;
1708
- }[];
1709
- organizations: {
1710
- created_at: string;
1711
- org_id: string;
1712
- owner_account_id: string;
1713
- is_personal_org: boolean;
1714
- org_name: string;
1715
- github_handle?: string | undefined;
1716
- org_display_name?: string | undefined;
1717
- }[];
1718
- orgAccounts: {
1719
- created_at: string;
1720
- account_id: string;
1721
- org_id: string;
1722
- org_account_id: string;
1723
- is_owner: boolean;
1724
- }[];
1725
- orderFiles: {
1726
- order_id: string;
1727
- order_file_id: string;
1728
- is_gerbers_zip: boolean;
1729
- content_type: string;
1730
- for_provider: string | null;
1731
- uploaded_at: string;
1732
- content_text: string | null;
1733
- content_bytes: Uint8Array<ArrayBuffer> | null;
1734
- }[];
1735
- accountSnippets: {
1736
- snippet_id: string;
1737
- created_at: string;
1738
- updated_at: string;
1739
- account_id: string;
1740
- has_starred: boolean;
1741
- }[];
1742
- accountPackages: {
1743
- is_starred: boolean;
1744
- created_at: string;
1745
- updated_at: string;
1746
- account_id: string;
1747
- account_package_id: string;
1748
- package_id: string;
1749
- }[];
1750
- jlcpcbOrderState: {
1751
- created_at: string;
1752
- order_id: string;
1753
- jlcpcb_order_state_id: string;
1754
- are_gerbers_uploaded: boolean;
1755
- is_gerber_analyzed: boolean;
1756
- are_initial_costs_calculated: boolean;
1757
- is_pcb_added_to_cart: boolean;
1758
- is_bom_uploaded: boolean;
1759
- is_pnp_uploaded: boolean;
1760
- is_bom_pnp_analyzed: boolean;
1761
- is_bom_parsing_complete: boolean;
1762
- are_components_available: boolean;
1763
- is_patch_map_generated: boolean;
1764
- is_json_merge_file_created: boolean;
1765
- is_dfm_result_generated: boolean;
1766
- are_files_downloaded: boolean;
1767
- are_product_categories_fetched: boolean;
1768
- are_final_costs_calculated: boolean;
1769
- is_json_merge_file_updated: boolean;
1770
- is_added_to_cart: boolean;
1771
- are_gerbers_generated: boolean;
1772
- current_step: string | null;
1773
- uploaded_gerber_metadata?: any;
1774
- gerber_analysis?: any;
1775
- }[];
1776
- jlcpcbOrderStepRuns: {
1777
- created_at: string;
1778
- is_running: boolean | null;
1779
- jlcpcb_order_state_id: string | null;
1780
- jlcpcb_order_step_run_id: string;
1781
- step_function_name: string | null;
1782
- error_message: string | null;
1783
- }[];
1784
- orderQuotes: {
1785
- error: z.objectOutputType<{
1786
- error_code: z.ZodString;
1787
- message: z.ZodString;
1788
- }, z.ZodTypeAny, "passthrough"> | null;
1789
- package_release_id: string | null;
1790
- created_at: string;
1791
- updated_at: string;
1792
- account_id: string | null;
1793
- has_error: boolean;
1794
- completed_at: string | null;
1795
- order_quote_id: string;
1796
- is_completed: boolean;
1797
- is_processing: boolean;
1798
- vendor_name: string;
1799
- quoted_components: {
1800
- manufacturer_part_number: string | null;
1801
- supplier_part_number: string | null;
1802
- quantity: number;
1803
- unit_price: number;
1804
- total_price: number;
1805
- available: boolean;
1806
- }[] | null;
1807
- bare_pcb_cost: number;
1808
- shipping_options: {
1809
- carrier: string;
1810
- service: string;
1811
- cost: number;
1812
- }[];
1813
- total_cost_without_shipping: number;
1814
- }[];
1815
- aiReviews: {
1816
- created_at: string;
1817
- ai_review_id: string;
1818
- ai_review_text: string | null;
1819
- start_processing_at: string | null;
1820
- finished_processing_at: string | null;
1821
- display_status: "pending" | "completed" | "failed";
1822
- package_release_id?: string | undefined;
1823
- processing_error?: any;
1824
- }[];
1825
- datasheets: {
1826
- created_at: string;
1827
- datasheet_id: string;
1828
- chip_name: string;
1829
- pin_information: {
1830
- name: string;
1831
- description: string;
1832
- pin_number: string;
1833
- capabilities: string[];
1834
- }[] | null;
1835
- datasheet_pdf_urls: string[] | null;
1836
- ai_description: string | null;
1837
- }[];
1838
- githubInstallations: {
1839
- created_at: string;
1840
- updated_at: string;
1841
- account_id: string;
1842
- github_username: string;
1843
- github_installation_id: string;
1844
- installation_id: string;
1845
- is_active: boolean;
1846
- access_token?: string | null | undefined;
1847
- access_token_expires_at?: string | null | undefined;
1848
- }[];
1849
- packageBuilds: {
1850
- package_release_id: string;
1851
- created_at: string;
1852
- transpilation_in_progress: boolean;
1853
- transpilation_logs: any[];
1854
- circuit_json_build_in_progress: boolean;
1855
- circuit_json_build_logs: any[];
1856
- image_generation_in_progress: boolean;
1857
- image_generation_logs: any[];
1858
- package_build_id: string;
1859
- build_in_progress: boolean;
1860
- build_error_last_updated_at: string;
1861
- circuit_json_build_error?: string | null | undefined;
1862
- transpilation_error?: string | null | undefined;
1863
- transpilation_started_at?: string | null | undefined;
1864
- transpilation_completed_at?: string | null | undefined;
1865
- circuit_json_build_started_at?: string | null | undefined;
1866
- circuit_json_build_completed_at?: string | null | undefined;
1867
- image_generation_started_at?: string | null | undefined;
1868
- image_generation_completed_at?: string | null | undefined;
1869
- image_generation_error?: string | null | undefined;
1870
- build_started_at?: string | null | undefined;
1871
- build_completed_at?: string | null | undefined;
1872
- build_error?: string | null | undefined;
1873
- preview_url?: string | null | undefined;
1874
- build_logs?: string | null | undefined;
1875
- }[];
1876
- }, "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"> & {
1877
- addOrder: (order: Omit<Order, "order_id">) => Order;
1878
- getOrderById: (orderId: string) => Order | undefined;
1879
- getOrderFilesByOrderId: (orderId: string) => OrderFile[];
1880
- addOrderQuote: ({ account_id, package_release_id, vendor_name, }: {
1881
- account_id: string;
1882
- package_release_id?: string;
1883
- vendor_name: string;
1884
- }) => string;
1885
- getOrderQuoteById: (orderQuoteId: string) => OrderQuote | undefined;
1886
- getJlcpcbOrderStatesByOrderId: (orderId: string) => JlcpcbOrderState | undefined;
1887
- getJlcpcbOrderStepRunsByJlcpcbOrderStateId: (jlcpcbOrderStateId: string) => JlcpcbOrderStepRun[];
1888
- updateOrder: (orderId: string, updates: Partial<Order>) => void;
1889
- addJlcpcbOrderState: (orderState: Omit<JlcpcbOrderState, "jlcpcb_order_state_id">) => JlcpcbOrderState;
1890
- updateJlcpcbOrderState: (orderId: string, updates: Partial<JlcpcbOrderState>) => void;
1891
- addOrderFile: (orderFile: Omit<OrderFile, "order_file_id">) => OrderFile;
1892
- getOrderFileById: (orderFileId: string) => OrderFile | undefined;
1893
- addAccount: (account: Omit<Account, "account_id" | "is_tscircuit_staff"> & Partial<Pick<Account, "account_id" | "is_tscircuit_staff">>) => {
1894
- is_tscircuit_staff: boolean;
1895
- github_username: string;
1896
- shippingInfo?: {
1897
- firstName: string;
1898
- lastName: string;
1899
- address: string;
1900
- city: string;
1901
- state: string;
1902
- zipCode: string;
1903
- country: string;
1904
- phone: string;
1905
- companyName?: string | undefined;
1906
- apartment?: string | undefined;
1907
- } | undefined;
1908
- personal_org_id?: string | undefined;
1909
- account_id: string;
1910
- };
1911
- addAccountPackage: (accountPackage: Omit<AccountPackage, "account_package_id">) => AccountPackage;
1912
- getAccountPackageById: (accountPackageId: string) => AccountPackage | undefined;
1913
- updateAccountPackage: (accountPackageId: string, updates: Partial<AccountPackage>) => void;
1914
- deleteAccountPackage: (accountPackageId: string) => boolean;
1915
- addSnippet: (snippet: Omit<z.input<typeof snippetSchema>, "snippet_id" | "package_release_id"> & {
1916
- creator_account_id?: string;
1917
- github_repo_full_name?: string;
1918
- branch_name?: string;
1919
- commit_message?: string;
1920
- commit_author?: string;
1921
- }) => Snippet;
1922
- getLatestSnippets: (limit: number) => Snippet[];
1923
- getTrendingSnippets: (limit: number, since: string) => Snippet[];
1924
- getPackagesByAuthor: (authorName?: string) => Package[];
1925
- getSnippetByAuthorAndName: (authorName: string, snippetName: string) => Snippet | undefined;
1926
- updateSnippet: (snippetId: string, updates: Partial<Snippet>) => Snippet | undefined;
1927
- getSnippetById: (snippetId: string, auth?: {
1928
- github_username: string;
1929
- }) => Snippet | undefined;
1930
- searchSnippets: (query: string) => Snippet[];
1931
- searchPackages: (query: string) => Package[];
1932
- searchAccounts: (query: string, limit?: number) => Account[];
1933
- deleteSnippet: (snippetId: string) => boolean;
1934
- addSession: (session: Omit<Session, "session_id">) => Session;
1935
- getSessions: ({ account_id, is_cli_session, }: {
1936
- account_id: string;
1937
- is_cli_session?: boolean;
1938
- }) => Session[];
1939
- createLoginPage: () => LoginPage;
1940
- getLoginPage: (loginPageId: string) => LoginPage | undefined;
1941
- updateLoginPage: (loginPageId: string, updates: Partial<LoginPage>) => void;
1942
- getAccount: (accountId: string) => Account | undefined;
1943
- updateAccount: (accountId: string, updates: Partial<Account>) => Account | undefined;
1944
- createSession: (session: Omit<Session, "session_id">) => Session;
1945
- addStar: (accountId: string, packageId: string) => AccountPackage;
1946
- removeStar: (accountId: string, packageId: string) => void;
1947
- hasStarred: (accountId: string, packageId: string) => boolean;
1948
- addPackage: (_package: Omit<z.input<typeof packageSchema>, "package_id" | "github_repo_full_name">) => Package;
1949
- updatePackage: (packageId: string, updates: Partial<Package>) => Package | undefined;
1950
- getPackageById: (packageId: string) => Package | undefined;
1951
- getPackageReleaseById: (packageReleaseId: string) => PackageRelease | undefined;
1952
- addPackageRelease: (packageRelease: Omit<z.input<typeof packageReleaseSchema>, "package_release_id">) => PackageRelease;
1953
- updatePackageRelease: (packageRelease: PackageRelease) => void;
1954
- deletePackageFile: (packageFileId: string) => boolean;
1955
- addPackageFile: (packageFile: Omit<PackageFile, "package_file_id">) => PackageFile;
1956
- updatePackageFile: (packageFileId: string, updates: Partial<Omit<PackageFile, "package_file_id">>) => PackageFile;
1957
- getStarCount: (packageId: string) => number;
1958
- getPackageFilesByReleaseId: (packageReleaseId: string) => PackageFile[];
1959
- /**
1960
- * Update fs_sha for a package release based on its files
1961
- */
1962
- updatePackageReleaseFsSha: (packageReleaseId: string) => void;
1963
- addAiReview: (review: Omit<AiReview, "ai_review_id">) => AiReview;
1964
- updateAiReview: (aiReviewId: string, updates: Partial<AiReview>) => AiReview | undefined;
1965
- getAiReviewById: (aiReviewId: string) => AiReview | undefined;
1966
- listAiReviews: () => AiReview[];
1967
- addDatasheet: ({ chip_name }: {
1968
- chip_name: string;
1969
- }) => Datasheet;
1970
- getDatasheetById: (datasheetId: string) => Datasheet | undefined;
1971
- getDatasheetByChipName: (chipName: string) => Datasheet | undefined;
1972
- listDatasheets: ({ chip_name, is_popular, }?: {
1973
- chip_name?: string;
1974
- is_popular?: boolean;
1975
- }) => Datasheet[];
1976
- updateDatasheet: (datasheetId: string, updates: Partial<Datasheet>) => Datasheet | undefined;
1977
- addPackageBuild: (packageBuild: Omit<z.input<typeof packageBuildSchema>, "package_build_id">) => PackageBuild;
1978
- getPackageBuildById: (packageBuildId: string) => PackageBuild | undefined;
1979
- getPackageBuildsByReleaseId: (packageReleaseId: string) => PackageBuild[];
1980
- updatePackageBuild: (packageBuildId: string, updates: Partial<PackageBuild>) => PackageBuild | undefined;
1981
- addOrganization: (organization: {
1982
- name: string;
1983
- org_id?: string;
1984
- is_personal_org?: boolean;
1985
- owner_account_id: string;
1986
- github_handle?: string;
1987
- }) => {
1988
- created_at: string;
1989
- org_id: string;
1990
- owner_account_id: string;
1991
- is_personal_org: boolean;
1992
- org_name: string;
1993
- github_handle?: string | undefined;
1994
- org_display_name?: string | undefined;
1995
- };
1996
- getOrgs: (filters?: {
1997
- owner_account_id?: string;
1998
- github_handle?: string;
1999
- name?: string;
2000
- }, auth?: {
2001
- account_id?: string;
2002
- }) => {
2003
- member_count: number;
2004
- package_count: number;
2005
- can_manage_org: boolean;
2006
- created_at: string;
2007
- org_id: string;
2008
- owner_account_id: string;
2009
- is_personal_org: boolean;
2010
- org_name: string;
2011
- github_handle?: string | undefined;
2012
- org_display_name?: string | undefined;
2013
- }[];
2014
- getOrg: (filters: {
2015
- org_id?: string;
2016
- org_name?: string;
2017
- github_handle?: string;
2018
- }, auth?: {
2019
- account_id: string;
2020
- }) => {
2021
- member_count: number;
2022
- package_count: number;
2023
- can_manage_org: boolean;
2024
- created_at: string;
2025
- org_id: string;
2026
- owner_account_id: string;
2027
- is_personal_org: boolean;
2028
- org_name: string;
2029
- github_handle?: string | undefined;
2030
- org_display_name?: string | undefined;
2031
- } | null;
2032
- addOrganizationAccount: (organizationAccount: {
2033
- org_id: string;
2034
- account_id: string;
2035
- is_owner?: boolean;
2036
- }) => {
2037
- created_at: string;
2038
- account_id: string;
2039
- org_id: string;
2040
- org_account_id: string;
2041
- is_owner: boolean;
2042
- };
2043
- getOrganizationAccount: (filters: {
2044
- org_id?: string;
2045
- account_id?: string;
2046
- }) => OrgAccount | undefined;
2047
- getOrganizationAccounts: (filters?: {
2048
- org_id?: string;
2049
- account_id?: string;
2050
- }) => OrgAccount[];
2051
- removeOrganizationAccount: (filters: {
2052
- org_id: string;
2053
- account_id: string;
2054
- }) => boolean;
2055
- updateOrganization: (orgId: string, updates: Partial<Organization>) => Organization | undefined;
2056
- };
2057
- type DbClient = ReturnType<typeof createDatabase>;
2058
-
2059
- declare const seed: (db: DbClient) => void;
2060
-
2061
- declare const withDb: Middleware<{}, {
2062
- db: DbClient;
2063
- }>;
2064
-
2065
- export { type DbClient, createDatabase, seed, withDb };