@tscircuit/fake-snippets 0.0.149 → 0.0.150

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1110,6 +1110,53 @@ declare const orgAccountSchema: z.ZodObject<{
1110
1110
  can_manage_org?: boolean | undefined;
1111
1111
  }>;
1112
1112
  type OrgAccount = z.infer<typeof orgAccountSchema>;
1113
+ declare const orgInvitationSchema: z.ZodObject<{
1114
+ org_invitation_id: z.ZodString;
1115
+ org_id: z.ZodString;
1116
+ invitee_email: z.ZodNullable<z.ZodString>;
1117
+ inviter_account_id: z.ZodString;
1118
+ invitation_token: z.ZodString;
1119
+ is_link_invite: z.ZodDefault<z.ZodBoolean>;
1120
+ is_pending: z.ZodDefault<z.ZodBoolean>;
1121
+ is_accepted: z.ZodDefault<z.ZodBoolean>;
1122
+ is_expired: z.ZodDefault<z.ZodBoolean>;
1123
+ is_revoked: z.ZodDefault<z.ZodBoolean>;
1124
+ created_at: z.ZodString;
1125
+ expires_at: z.ZodString;
1126
+ accepted_at: z.ZodNullable<z.ZodString>;
1127
+ accepted_by_account_id: z.ZodNullable<z.ZodString>;
1128
+ }, "strip", z.ZodTypeAny, {
1129
+ created_at: string;
1130
+ expires_at: string;
1131
+ org_id: string;
1132
+ org_invitation_id: string;
1133
+ invitee_email: string | null;
1134
+ inviter_account_id: string;
1135
+ invitation_token: string;
1136
+ is_link_invite: boolean;
1137
+ is_pending: boolean;
1138
+ is_accepted: boolean;
1139
+ is_expired: boolean;
1140
+ is_revoked: boolean;
1141
+ accepted_at: string | null;
1142
+ accepted_by_account_id: string | null;
1143
+ }, {
1144
+ created_at: string;
1145
+ expires_at: string;
1146
+ org_id: string;
1147
+ org_invitation_id: string;
1148
+ invitee_email: string | null;
1149
+ inviter_account_id: string;
1150
+ invitation_token: string;
1151
+ accepted_at: string | null;
1152
+ accepted_by_account_id: string | null;
1153
+ is_link_invite?: boolean | undefined;
1154
+ is_pending?: boolean | undefined;
1155
+ is_accepted?: boolean | undefined;
1156
+ is_expired?: boolean | undefined;
1157
+ is_revoked?: boolean | undefined;
1158
+ }>;
1159
+ type OrgInvitation = z.infer<typeof orgInvitationSchema>;
1113
1160
  declare const userPermissionsSchema: z.ZodObject<{
1114
1161
  can_manage_org: z.ZodOptional<z.ZodBoolean>;
1115
1162
  can_manage_package: z.ZodOptional<z.ZodBoolean>;
@@ -1326,6 +1373,22 @@ declare const createDatabase: ({ seed }?: {
1326
1373
  is_owner: boolean;
1327
1374
  can_manage_org: boolean;
1328
1375
  }[];
1376
+ orgInvitations: {
1377
+ created_at: string;
1378
+ expires_at: string;
1379
+ org_id: string;
1380
+ org_invitation_id: string;
1381
+ invitee_email: string | null;
1382
+ inviter_account_id: string;
1383
+ invitation_token: string;
1384
+ is_link_invite: boolean;
1385
+ is_pending: boolean;
1386
+ is_accepted: boolean;
1387
+ is_expired: boolean;
1388
+ is_revoked: boolean;
1389
+ accepted_at: string | null;
1390
+ accepted_by_account_id: string | null;
1391
+ }[];
1329
1392
  orderFiles: {
1330
1393
  order_id: string;
1331
1394
  order_file_id: string;
@@ -1496,7 +1559,7 @@ declare const createDatabase: ({ seed }?: {
1496
1559
  content_mimetype: string;
1497
1560
  is_text: boolean;
1498
1561
  }[];
1499
- }, "addOrder" | "getOrderById" | "getOrderFilesByOrderId" | "addOrderQuote" | "getOrderQuoteById" | "getJlcpcbOrderStatesByOrderId" | "getJlcpcbOrderStepRunsByJlcpcbOrderStateId" | "updateOrder" | "addJlcpcbOrderState" | "updateJlcpcbOrderState" | "addOrderFile" | "getOrderFileById" | "addBugReport" | "getBugReportById" | "addBugReportFile" | "getBugReportFilesByBugReportId" | "addAccount" | "addAccountPackage" | "getAccountPackageById" | "updateAccountPackage" | "deleteAccountPackage" | "addSnippet" | "getLatestSnippets" | "getTrendingSnippets" | "getPackagesByAuthor" | "getSnippetByAuthorAndName" | "updateSnippet" | "getSnippetById" | "searchSnippets" | "searchPackages" | "searchAccounts" | "deleteSnippet" | "addSession" | "getSessions" | "createLoginPage" | "getLoginPage" | "updateLoginPage" | "getAccount" | "updateAccount" | "createSession" | "deleteSession" | "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" | "updateOrganizationAccount" | "updateOrganization" | "deleteOrganization" | "deleteAccount"> & {
1562
+ }, "addOrder" | "getOrderById" | "getOrderFilesByOrderId" | "addOrderQuote" | "getOrderQuoteById" | "getJlcpcbOrderStatesByOrderId" | "getJlcpcbOrderStepRunsByJlcpcbOrderStateId" | "updateOrder" | "addJlcpcbOrderState" | "updateJlcpcbOrderState" | "addOrderFile" | "getOrderFileById" | "addBugReport" | "getBugReportById" | "addBugReportFile" | "getBugReportFilesByBugReportId" | "addAccount" | "addAccountPackage" | "getAccountPackageById" | "updateAccountPackage" | "deleteAccountPackage" | "addSnippet" | "getLatestSnippets" | "getTrendingSnippets" | "getPackagesByAuthor" | "getSnippetByAuthorAndName" | "updateSnippet" | "getSnippetById" | "searchSnippets" | "searchPackages" | "searchAccounts" | "deleteSnippet" | "addSession" | "getSessions" | "createLoginPage" | "getLoginPage" | "updateLoginPage" | "getAccount" | "updateAccount" | "createSession" | "deleteSession" | "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" | "updateOrganizationAccount" | "updateOrganization" | "deleteOrganization" | "deleteAccount" | "addOrgInvitation" | "getOrgInvitationByToken" | "listOrgInvitations" | "updateOrgInvitation"> & {
1500
1563
  addOrder: (order: Omit<Order, "order_id">) => Order;
1501
1564
  getOrderById: (orderId: string) => Order | undefined;
1502
1565
  getOrderFilesByOrderId: (orderId: string) => OrderFile[];
@@ -1707,6 +1770,15 @@ declare const createDatabase: ({ seed }?: {
1707
1770
  updateOrganization: (orgId: string, updates: Partial<Organization>) => Organization | undefined;
1708
1771
  deleteOrganization: (orgId: string) => boolean;
1709
1772
  deleteAccount: (accountId: string) => boolean;
1773
+ addOrgInvitation: (invitation: {
1774
+ org_id: string;
1775
+ invitee_email: string;
1776
+ inviter_account_id: string;
1777
+ invitation_token: string;
1778
+ }) => OrgInvitation;
1779
+ getOrgInvitationByToken: (token: string) => OrgInvitation | undefined;
1780
+ listOrgInvitations: (orgId: string) => OrgInvitation[];
1781
+ updateOrgInvitation: (invitationId: string, updates: Partial<OrgInvitation>) => OrgInvitation | undefined;
1710
1782
  }> & Omit<{
1711
1783
  idCounter: number;
1712
1784
  snippets: {
@@ -1909,6 +1981,22 @@ declare const createDatabase: ({ seed }?: {
1909
1981
  is_owner: boolean;
1910
1982
  can_manage_org: boolean;
1911
1983
  }[];
1984
+ orgInvitations: {
1985
+ created_at: string;
1986
+ expires_at: string;
1987
+ org_id: string;
1988
+ org_invitation_id: string;
1989
+ invitee_email: string | null;
1990
+ inviter_account_id: string;
1991
+ invitation_token: string;
1992
+ is_link_invite: boolean;
1993
+ is_pending: boolean;
1994
+ is_accepted: boolean;
1995
+ is_expired: boolean;
1996
+ is_revoked: boolean;
1997
+ accepted_at: string | null;
1998
+ accepted_by_account_id: string | null;
1999
+ }[];
1912
2000
  orderFiles: {
1913
2001
  order_id: string;
1914
2002
  order_file_id: string;
@@ -2079,7 +2167,7 @@ declare const createDatabase: ({ seed }?: {
2079
2167
  content_mimetype: string;
2080
2168
  is_text: boolean;
2081
2169
  }[];
2082
- }, "addOrder" | "getOrderById" | "getOrderFilesByOrderId" | "addOrderQuote" | "getOrderQuoteById" | "getJlcpcbOrderStatesByOrderId" | "getJlcpcbOrderStepRunsByJlcpcbOrderStateId" | "updateOrder" | "addJlcpcbOrderState" | "updateJlcpcbOrderState" | "addOrderFile" | "getOrderFileById" | "addBugReport" | "getBugReportById" | "addBugReportFile" | "getBugReportFilesByBugReportId" | "addAccount" | "addAccountPackage" | "getAccountPackageById" | "updateAccountPackage" | "deleteAccountPackage" | "addSnippet" | "getLatestSnippets" | "getTrendingSnippets" | "getPackagesByAuthor" | "getSnippetByAuthorAndName" | "updateSnippet" | "getSnippetById" | "searchSnippets" | "searchPackages" | "searchAccounts" | "deleteSnippet" | "addSession" | "getSessions" | "createLoginPage" | "getLoginPage" | "updateLoginPage" | "getAccount" | "updateAccount" | "createSession" | "deleteSession" | "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" | "updateOrganizationAccount" | "updateOrganization" | "deleteOrganization" | "deleteAccount"> & {
2170
+ }, "addOrder" | "getOrderById" | "getOrderFilesByOrderId" | "addOrderQuote" | "getOrderQuoteById" | "getJlcpcbOrderStatesByOrderId" | "getJlcpcbOrderStepRunsByJlcpcbOrderStateId" | "updateOrder" | "addJlcpcbOrderState" | "updateJlcpcbOrderState" | "addOrderFile" | "getOrderFileById" | "addBugReport" | "getBugReportById" | "addBugReportFile" | "getBugReportFilesByBugReportId" | "addAccount" | "addAccountPackage" | "getAccountPackageById" | "updateAccountPackage" | "deleteAccountPackage" | "addSnippet" | "getLatestSnippets" | "getTrendingSnippets" | "getPackagesByAuthor" | "getSnippetByAuthorAndName" | "updateSnippet" | "getSnippetById" | "searchSnippets" | "searchPackages" | "searchAccounts" | "deleteSnippet" | "addSession" | "getSessions" | "createLoginPage" | "getLoginPage" | "updateLoginPage" | "getAccount" | "updateAccount" | "createSession" | "deleteSession" | "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" | "updateOrganizationAccount" | "updateOrganization" | "deleteOrganization" | "deleteAccount" | "addOrgInvitation" | "getOrgInvitationByToken" | "listOrgInvitations" | "updateOrgInvitation"> & {
2083
2171
  addOrder: (order: Omit<Order, "order_id">) => Order;
2084
2172
  getOrderById: (orderId: string) => Order | undefined;
2085
2173
  getOrderFilesByOrderId: (orderId: string) => OrderFile[];
@@ -2290,6 +2378,15 @@ declare const createDatabase: ({ seed }?: {
2290
2378
  updateOrganization: (orgId: string, updates: Partial<Organization>) => Organization | undefined;
2291
2379
  deleteOrganization: (orgId: string) => boolean;
2292
2380
  deleteAccount: (accountId: string) => boolean;
2381
+ addOrgInvitation: (invitation: {
2382
+ org_id: string;
2383
+ invitee_email: string;
2384
+ inviter_account_id: string;
2385
+ invitation_token: string;
2386
+ }) => OrgInvitation;
2387
+ getOrgInvitationByToken: (token: string) => OrgInvitation | undefined;
2388
+ listOrgInvitations: (orgId: string) => OrgInvitation[];
2389
+ updateOrgInvitation: (invitationId: string, updates: Partial<OrgInvitation>) => OrgInvitation | undefined;
2293
2390
  };
2294
2391
  type DbClient = ReturnType<typeof createDatabase>;
2295
2392
 
package/dist/index.js CHANGED
@@ -400,6 +400,22 @@ var orgAccountSchema = z.object({
400
400
  created_at: z.string().datetime(),
401
401
  can_manage_org: z.boolean().default(false)
402
402
  });
403
+ var orgInvitationSchema = z.object({
404
+ org_invitation_id: z.string(),
405
+ org_id: z.string(),
406
+ invitee_email: z.string().email().nullable(),
407
+ inviter_account_id: z.string(),
408
+ invitation_token: z.string(),
409
+ is_link_invite: z.boolean().default(false),
410
+ is_pending: z.boolean().default(true),
411
+ is_accepted: z.boolean().default(false),
412
+ is_expired: z.boolean().default(false),
413
+ is_revoked: z.boolean().default(false),
414
+ created_at: z.string().datetime(),
415
+ expires_at: z.string().datetime(),
416
+ accepted_at: z.string().datetime().nullable(),
417
+ accepted_by_account_id: z.string().nullable()
418
+ });
403
419
  var userPermissionsSchema = z.object({
404
420
  can_manage_org: z.boolean().optional(),
405
421
  can_manage_package: z.boolean().optional()
@@ -431,6 +447,7 @@ var databaseSchema = z.object({
431
447
  orders: z.array(orderSchema).default([]),
432
448
  organizations: z.array(orgSchema).default([]),
433
449
  orgAccounts: z.array(orgAccountSchema).default([]),
450
+ orgInvitations: z.array(orgInvitationSchema).default([]),
434
451
  orderFiles: z.array(orderFileSchema).default([]),
435
452
  accountSnippets: z.array(accountSnippetSchema).default([]),
436
453
  accountPackages: z.array(accountPackageSchema).default([]),
@@ -4077,6 +4094,60 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
4077
4094
  return state;
4078
4095
  });
4079
4096
  return deleted;
4097
+ },
4098
+ addOrgInvitation: (invitation) => {
4099
+ const expiresAt = /* @__PURE__ */ new Date();
4100
+ expiresAt.setDate(expiresAt.getDate() + 7);
4101
+ const newInvitation = {
4102
+ org_invitation_id: `org_invitation_${get().idCounter + 1}`,
4103
+ org_id: invitation.org_id,
4104
+ invitee_email: invitation.invitee_email,
4105
+ inviter_account_id: invitation.inviter_account_id,
4106
+ invitation_token: invitation.invitation_token,
4107
+ is_link_invite: false,
4108
+ is_pending: true,
4109
+ is_accepted: false,
4110
+ is_expired: false,
4111
+ is_revoked: false,
4112
+ created_at: (/* @__PURE__ */ new Date()).toISOString(),
4113
+ expires_at: expiresAt.toISOString(),
4114
+ accepted_at: null,
4115
+ accepted_by_account_id: null
4116
+ };
4117
+ set((state) => ({
4118
+ orgInvitations: [...state.orgInvitations, newInvitation],
4119
+ idCounter: state.idCounter + 1
4120
+ }));
4121
+ return newInvitation;
4122
+ },
4123
+ getOrgInvitationByToken: (token) => {
4124
+ const state = get();
4125
+ return state.orgInvitations.find(
4126
+ (invitation) => invitation.invitation_token === token
4127
+ );
4128
+ },
4129
+ listOrgInvitations: (orgId) => {
4130
+ const state = get();
4131
+ return state.orgInvitations.filter(
4132
+ (invitation) => invitation.org_id === orgId
4133
+ );
4134
+ },
4135
+ updateOrgInvitation: (invitationId, updates) => {
4136
+ let updatedInvitation;
4137
+ set((state) => {
4138
+ const index = state.orgInvitations.findIndex(
4139
+ (inv) => inv.org_invitation_id === invitationId
4140
+ );
4141
+ if (index === -1) return state;
4142
+ const updatedInvitations = [...state.orgInvitations];
4143
+ updatedInvitations[index] = {
4144
+ ...updatedInvitations[index],
4145
+ ...updates
4146
+ };
4147
+ updatedInvitation = updatedInvitations[index];
4148
+ return { ...state, orgInvitations: updatedInvitations };
4149
+ });
4150
+ return updatedInvitation;
4080
4151
  }
4081
4152
  }));
4082
4153
 
package/dist/schema.d.ts CHANGED
@@ -1327,6 +1327,53 @@ declare const orgAccountSchema: z.ZodObject<{
1327
1327
  can_manage_org?: boolean | undefined;
1328
1328
  }>;
1329
1329
  type OrgAccount = z.infer<typeof orgAccountSchema>;
1330
+ declare const orgInvitationSchema: z.ZodObject<{
1331
+ org_invitation_id: z.ZodString;
1332
+ org_id: z.ZodString;
1333
+ invitee_email: z.ZodNullable<z.ZodString>;
1334
+ inviter_account_id: z.ZodString;
1335
+ invitation_token: z.ZodString;
1336
+ is_link_invite: z.ZodDefault<z.ZodBoolean>;
1337
+ is_pending: z.ZodDefault<z.ZodBoolean>;
1338
+ is_accepted: z.ZodDefault<z.ZodBoolean>;
1339
+ is_expired: z.ZodDefault<z.ZodBoolean>;
1340
+ is_revoked: z.ZodDefault<z.ZodBoolean>;
1341
+ created_at: z.ZodString;
1342
+ expires_at: z.ZodString;
1343
+ accepted_at: z.ZodNullable<z.ZodString>;
1344
+ accepted_by_account_id: z.ZodNullable<z.ZodString>;
1345
+ }, "strip", z.ZodTypeAny, {
1346
+ created_at: string;
1347
+ expires_at: string;
1348
+ org_id: string;
1349
+ org_invitation_id: string;
1350
+ invitee_email: string | null;
1351
+ inviter_account_id: string;
1352
+ invitation_token: string;
1353
+ is_link_invite: boolean;
1354
+ is_pending: boolean;
1355
+ is_accepted: boolean;
1356
+ is_expired: boolean;
1357
+ is_revoked: boolean;
1358
+ accepted_at: string | null;
1359
+ accepted_by_account_id: string | null;
1360
+ }, {
1361
+ created_at: string;
1362
+ expires_at: string;
1363
+ org_id: string;
1364
+ org_invitation_id: string;
1365
+ invitee_email: string | null;
1366
+ inviter_account_id: string;
1367
+ invitation_token: string;
1368
+ accepted_at: string | null;
1369
+ accepted_by_account_id: string | null;
1370
+ is_link_invite?: boolean | undefined;
1371
+ is_pending?: boolean | undefined;
1372
+ is_accepted?: boolean | undefined;
1373
+ is_expired?: boolean | undefined;
1374
+ is_revoked?: boolean | undefined;
1375
+ }>;
1376
+ type OrgInvitation = z.infer<typeof orgInvitationSchema>;
1330
1377
  declare const userPermissionsSchema: z.ZodObject<{
1331
1378
  can_manage_org: z.ZodOptional<z.ZodBoolean>;
1332
1379
  can_manage_package: z.ZodOptional<z.ZodBoolean>;
@@ -2007,6 +2054,52 @@ declare const databaseSchema: z.ZodObject<{
2007
2054
  is_owner?: boolean | undefined;
2008
2055
  can_manage_org?: boolean | undefined;
2009
2056
  }>, "many">>;
2057
+ orgInvitations: z.ZodDefault<z.ZodArray<z.ZodObject<{
2058
+ org_invitation_id: z.ZodString;
2059
+ org_id: z.ZodString;
2060
+ invitee_email: z.ZodNullable<z.ZodString>;
2061
+ inviter_account_id: z.ZodString;
2062
+ invitation_token: z.ZodString;
2063
+ is_link_invite: z.ZodDefault<z.ZodBoolean>;
2064
+ is_pending: z.ZodDefault<z.ZodBoolean>;
2065
+ is_accepted: z.ZodDefault<z.ZodBoolean>;
2066
+ is_expired: z.ZodDefault<z.ZodBoolean>;
2067
+ is_revoked: z.ZodDefault<z.ZodBoolean>;
2068
+ created_at: z.ZodString;
2069
+ expires_at: z.ZodString;
2070
+ accepted_at: z.ZodNullable<z.ZodString>;
2071
+ accepted_by_account_id: z.ZodNullable<z.ZodString>;
2072
+ }, "strip", z.ZodTypeAny, {
2073
+ created_at: string;
2074
+ expires_at: string;
2075
+ org_id: string;
2076
+ org_invitation_id: string;
2077
+ invitee_email: string | null;
2078
+ inviter_account_id: string;
2079
+ invitation_token: string;
2080
+ is_link_invite: boolean;
2081
+ is_pending: boolean;
2082
+ is_accepted: boolean;
2083
+ is_expired: boolean;
2084
+ is_revoked: boolean;
2085
+ accepted_at: string | null;
2086
+ accepted_by_account_id: string | null;
2087
+ }, {
2088
+ created_at: string;
2089
+ expires_at: string;
2090
+ org_id: string;
2091
+ org_invitation_id: string;
2092
+ invitee_email: string | null;
2093
+ inviter_account_id: string;
2094
+ invitation_token: string;
2095
+ accepted_at: string | null;
2096
+ accepted_by_account_id: string | null;
2097
+ is_link_invite?: boolean | undefined;
2098
+ is_pending?: boolean | undefined;
2099
+ is_accepted?: boolean | undefined;
2100
+ is_expired?: boolean | undefined;
2101
+ is_revoked?: boolean | undefined;
2102
+ }>, "many">>;
2010
2103
  orderFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
2011
2104
  order_file_id: z.ZodString;
2012
2105
  order_id: z.ZodString;
@@ -2733,6 +2826,22 @@ declare const databaseSchema: z.ZodObject<{
2733
2826
  is_owner: boolean;
2734
2827
  can_manage_org: boolean;
2735
2828
  }[];
2829
+ orgInvitations: {
2830
+ created_at: string;
2831
+ expires_at: string;
2832
+ org_id: string;
2833
+ org_invitation_id: string;
2834
+ invitee_email: string | null;
2835
+ inviter_account_id: string;
2836
+ invitation_token: string;
2837
+ is_link_invite: boolean;
2838
+ is_pending: boolean;
2839
+ is_accepted: boolean;
2840
+ is_expired: boolean;
2841
+ is_revoked: boolean;
2842
+ accepted_at: string | null;
2843
+ accepted_by_account_id: string | null;
2844
+ }[];
2736
2845
  orderFiles: {
2737
2846
  order_id: string;
2738
2847
  order_file_id: string;
@@ -3105,6 +3214,22 @@ declare const databaseSchema: z.ZodObject<{
3105
3214
  is_owner?: boolean | undefined;
3106
3215
  can_manage_org?: boolean | undefined;
3107
3216
  }[] | undefined;
3217
+ orgInvitations?: {
3218
+ created_at: string;
3219
+ expires_at: string;
3220
+ org_id: string;
3221
+ org_invitation_id: string;
3222
+ invitee_email: string | null;
3223
+ inviter_account_id: string;
3224
+ invitation_token: string;
3225
+ accepted_at: string | null;
3226
+ accepted_by_account_id: string | null;
3227
+ is_link_invite?: boolean | undefined;
3228
+ is_pending?: boolean | undefined;
3229
+ is_accepted?: boolean | undefined;
3230
+ is_expired?: boolean | undefined;
3231
+ is_revoked?: boolean | undefined;
3232
+ }[] | undefined;
3108
3233
  orderFiles?: {
3109
3234
  order_id: string;
3110
3235
  order_file_id: string;
@@ -3279,4 +3404,4 @@ declare const databaseSchema: z.ZodObject<{
3279
3404
  type DatabaseSchema = z.infer<typeof databaseSchema>;
3280
3405
  declare const tscircuitHandleSchema: z.ZodString;
3281
3406
 
3282
- export { type Account, type AccountPackage, type AccountSnippet, type AiReview, type BugReport, type BugReportFile, type DatabaseSchema, type Datasheet, type GithubInstallation, type JlcpcbOrderState, type JlcpcbOrderStepRun, type LoginPage, type Order, type OrderFile, type OrderQuote, type OrgAccount, type Organization, type Package, type PackageBuild, type PackageFile, type PackageRelease, type PublicAccount, type PublicOrgSchema, type QuotedComponent, type Session, type ShippingOption, type Snippet, type UserPermissions, accountPackageSchema, accountSchema, accountSnippetSchema, aiReviewSchema, bugReportFileResponseSchema, bugReportFileSchema, bugReportSchema, databaseSchema, datasheetPinInformationSchema, datasheetSchema, errorResponseSchema, errorSchema, githubInstallationSchema, jlcpcbOrderStateSchema, jlcpcbOrderStepRunSchema, loginPageSchema, orderFileSchema, orderQuoteSchema, orderSchema, orgAccountSchema, orgSchema, packageBuildSchema, packageFileSchema, packageReleaseSchema, packageSchema, publicAccountSchema, publicOrgSchema, quotedComponentSchema, sessionSchema, shippingInfoSchema, snippetSchema, tscircuitHandleSchema, userPermissionsSchema };
3407
+ export { type Account, type AccountPackage, type AccountSnippet, type AiReview, type BugReport, type BugReportFile, type DatabaseSchema, type Datasheet, type GithubInstallation, type JlcpcbOrderState, type JlcpcbOrderStepRun, type LoginPage, type Order, type OrderFile, type OrderQuote, type OrgAccount, type OrgInvitation, type Organization, type Package, type PackageBuild, type PackageFile, type PackageRelease, type PublicAccount, type PublicOrgSchema, type QuotedComponent, type Session, type ShippingOption, type Snippet, type UserPermissions, accountPackageSchema, accountSchema, accountSnippetSchema, aiReviewSchema, bugReportFileResponseSchema, bugReportFileSchema, bugReportSchema, databaseSchema, datasheetPinInformationSchema, datasheetSchema, errorResponseSchema, errorSchema, githubInstallationSchema, jlcpcbOrderStateSchema, jlcpcbOrderStepRunSchema, loginPageSchema, orderFileSchema, orderQuoteSchema, orderSchema, orgAccountSchema, orgInvitationSchema, orgSchema, packageBuildSchema, packageFileSchema, packageReleaseSchema, packageSchema, publicAccountSchema, publicOrgSchema, quotedComponentSchema, sessionSchema, shippingInfoSchema, snippetSchema, tscircuitHandleSchema, userPermissionsSchema };
package/dist/schema.js CHANGED
@@ -394,6 +394,22 @@ var orgAccountSchema = z.object({
394
394
  created_at: z.string().datetime(),
395
395
  can_manage_org: z.boolean().default(false)
396
396
  });
397
+ var orgInvitationSchema = z.object({
398
+ org_invitation_id: z.string(),
399
+ org_id: z.string(),
400
+ invitee_email: z.string().email().nullable(),
401
+ inviter_account_id: z.string(),
402
+ invitation_token: z.string(),
403
+ is_link_invite: z.boolean().default(false),
404
+ is_pending: z.boolean().default(true),
405
+ is_accepted: z.boolean().default(false),
406
+ is_expired: z.boolean().default(false),
407
+ is_revoked: z.boolean().default(false),
408
+ created_at: z.string().datetime(),
409
+ expires_at: z.string().datetime(),
410
+ accepted_at: z.string().datetime().nullable(),
411
+ accepted_by_account_id: z.string().nullable()
412
+ });
397
413
  var userPermissionsSchema = z.object({
398
414
  can_manage_org: z.boolean().optional(),
399
415
  can_manage_package: z.boolean().optional()
@@ -425,6 +441,7 @@ var databaseSchema = z.object({
425
441
  orders: z.array(orderSchema).default([]),
426
442
  organizations: z.array(orgSchema).default([]),
427
443
  orgAccounts: z.array(orgAccountSchema).default([]),
444
+ orgInvitations: z.array(orgInvitationSchema).default([]),
428
445
  orderFiles: z.array(orderFileSchema).default([]),
429
446
  accountSnippets: z.array(accountSnippetSchema).default([]),
430
447
  accountPackages: z.array(accountPackageSchema).default([]),
@@ -463,6 +480,7 @@ export {
463
480
  orderQuoteSchema,
464
481
  orderSchema,
465
482
  orgAccountSchema,
483
+ orgInvitationSchema,
466
484
  orgSchema,
467
485
  packageBuildSchema,
468
486
  packageFileSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/fake-snippets",
3
- "version": "0.0.149",
3
+ "version": "0.0.150",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -84,7 +84,7 @@
84
84
  "@tscircuit/3d-viewer": "^0.0.435",
85
85
  "@tscircuit/assembly-viewer": "^0.0.5",
86
86
  "@tscircuit/create-snippet-url": "^0.0.8",
87
- "@tscircuit/eval": "^0.0.479",
87
+ "@tscircuit/eval": "^0.0.481",
88
88
  "@tscircuit/layout": "^0.0.29",
89
89
  "@tscircuit/mm": "^0.0.8",
90
90
  "@tscircuit/pcb-viewer": "^1.11.256",