Tessa merged #1528 before I got to add these comments lol (it's my fault, should have left the PR as draft until I was actually ready)
This commit is contained in:
		
							parent
							
								
									d88a6eb07f
								
							
						
					
					
						commit
						3ed10ad893
					
				| @ -10,6 +10,7 @@ export const AccessCode: Record<UserRole, number> = { | ||||
|   owner: 40, | ||||
| } as const; | ||||
| 
 | ||||
| /** `${4-digit year}-${2-digit month}` */ | ||||
| export type YearMonth = `${number}-${Range<0, 2>}${Range<0, 10>}`; | ||||
| 
 | ||||
| export type OrgData = { | ||||
| @ -18,26 +19,11 @@ export type OrgData = { | ||||
|   slug: string; | ||||
|   quotas?: Record<string, number>; | ||||
|   bytesStored: number; | ||||
|   usage: { | ||||
|     // Keyed by {4-digit year}-{2-digit month}
 | ||||
|     [key: YearMonth]: number; | ||||
|   } | null; | ||||
|   crawlExecSeconds?: { | ||||
|     // Keyed by {4-digit year}-{2-digit month}
 | ||||
|     [key: YearMonth]: number; | ||||
|   }; | ||||
|   monthlyExecSeconds?: { | ||||
|     // Keyed by {4-digit year}-{2-digit month}
 | ||||
|     [key: YearMonth]: number; | ||||
|   }; | ||||
|   extraExecSeconds?: { | ||||
|     // Keyed by {4-digit year}-{2-digit month}
 | ||||
|     [key: YearMonth]: number; | ||||
|   }; | ||||
|   giftedExecSeconds?: { | ||||
|     // Keyed by {4-digit year}-{2-digit month}
 | ||||
|     [key: YearMonth]: number; | ||||
|   }; | ||||
|   usage: { [key: YearMonth]: number } | null; | ||||
|   crawlExecSeconds?: { [key: YearMonth]: number }; | ||||
|   monthlyExecSeconds?: { [key: YearMonth]: number }; | ||||
|   extraExecSeconds?: { [key: YearMonth]: number }; | ||||
|   giftedExecSeconds?: { [key: YearMonth]: number }; | ||||
|   extraExecSecondsAvailable: number; | ||||
|   giftedExecSecondsAvailable: number; | ||||
|   storageQuotaReached?: boolean; | ||||
|  | ||||
| @ -16,6 +16,7 @@ type Enumerate< | ||||
|   ? Acc[number] | ||||
|   : Enumerate<N, [...Acc, Acc["length"]]>; | ||||
| 
 | ||||
| /** Number literal range from `F` to `T` (exclusive) */ | ||||
| export type Range<F extends number, T extends number> = Exclude< | ||||
|   Enumerate<T>, | ||||
|   Enumerate<F> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user