postgresdk 0.18.22 → 0.18.24
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/README.md +9 -0
- package/dist/cli.js +284 -608
- package/dist/emit-include-loader.d.ts +6 -2
- package/dist/emit-sdk-contract.d.ts +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +285 -608
- package/dist/types.d.ts +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -146,6 +146,10 @@ export default {
|
|
|
146
146
|
schema: "public", // Database schema to introspect
|
|
147
147
|
outDir: "./api", // Output directory (or { client: "./sdk", server: "./api" })
|
|
148
148
|
softDeleteColumn: null, // Column name for soft deletes (e.g., "deleted_at")
|
|
149
|
+
softDeleteColumnOverrides: { // Per-table overrides (null = disable soft delete for that table)
|
|
150
|
+
// captures: "hidden_at", // different column name for a specific table
|
|
151
|
+
// audit_logs: null, // hard deletes only for this table
|
|
152
|
+
},
|
|
149
153
|
numericMode: "auto", // "auto" | "number" | "string" - How to type numeric columns
|
|
150
154
|
includeMethodsDepth: 2, // Max depth for nested includes
|
|
151
155
|
dateType: "date", // "date" | "string" - How to handle timestamps
|
|
@@ -738,6 +742,11 @@ const nested = await sdk.users.list({
|
|
|
738
742
|
}
|
|
739
743
|
});
|
|
740
744
|
|
|
745
|
+
// Soft deletes — when softDeleteColumn is configured, deleted records are hidden by default.
|
|
746
|
+
// Pass includeSoftDeleted: true to opt into seeing them (e.g., for admin/recovery UIs).
|
|
747
|
+
const allUsers = await sdk.users.list({ includeSoftDeleted: true });
|
|
748
|
+
const deletedUser = await sdk.users.getByPk("123", { includeSoftDeleted: true });
|
|
749
|
+
|
|
741
750
|
// Pagination with filtered results
|
|
742
751
|
let allResults = [];
|
|
743
752
|
let offset = 0;
|