-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/unkeyed/unkey
- Loading branch information
Showing
24 changed files
with
1,240 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
apps/billing/src/lib/db-marketing/schemas/takeaways-schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { z } from "zod"; | ||
|
||
/** | ||
* @description Schema for glossary entry takeaways | ||
* @sourceOfTruth This is the source of truth for the takeaways schema as it's used for database storage | ||
* @todo Extract this schema into a shared package to avoid duplication with apps/www | ||
*/ | ||
export const takeawaysSchema = z.object({ | ||
tldr: z.string(), | ||
definitionAndStructure: z.array( | ||
z.object({ | ||
key: z.string(), | ||
value: z.string(), | ||
}), | ||
), | ||
historicalContext: z.array( | ||
z.object({ | ||
key: z.string(), | ||
value: z.string(), | ||
}), | ||
), | ||
usageInAPIs: z.object({ | ||
tags: z.array(z.string()), | ||
description: z.string(), | ||
}), | ||
bestPractices: z.array(z.string()), | ||
recommendedReading: z.array( | ||
z.object({ | ||
title: z.string(), | ||
url: z.string(), | ||
}), | ||
), | ||
didYouKnow: z.string(), | ||
}); | ||
|
||
export type Takeaways = z.infer<typeof takeawaysSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.