Skip to content

docs: standalone Working with models and objects page #7

@coderdan

Description

@coderdan

Summary

The old docs had guides/protect-js/working-with-models-and-objects — the canonical entry point for encryptModel / decryptModel / bulkEncryptModels / bulkDecryptModels. The new docs scatter these methods across the Drizzle, DynamoDB, and Supabase pages but never introduce them on their own.

Where it currently appears

File Methods shown
cipherstash/encryption/drizzle.mdx:150,159,365,371,490,525 All four methods, but only in Drizzle context
cipherstash/encryption/dynamodb.mdx:105,135,160 DynamoDB-specific variants
cipherstash/encryption/supabase.mdx:428–432 Mentioned as wrapper internals
deploy/testing.mdx:42,45 Stub mocks

A user reading "Storing data" learns about encrypt/decrypt/bulkEncrypt but not about model-level methods, even though the model methods are usually what they want.

Suggested page

content/stack/cipherstash/encryption/models.mdx covering:

  • The four methods (encryptModel, decryptModel, bulkEncryptModels, bulkDecryptModels)
  • Schema-driven field selection — which fields get encrypted, what passes through unchanged
  • Performance note: model bulk variants are a single ZeroKMS call regardless of N
  • Failure shape (result.failure.{type,message})
  • Cross-links to bulk-operations.mdx (raw value variants), drizzle.mdx, dynamodb.mdx

Reference material

Old page in cipherstash-js-suite git history at apps/docs/src/app/(articles)/guides/protect-js/working-with-models-and-objects/page.md (commit 1c3d40ed^).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions