integrationPackage manifestv2.1.5

integration.growth-persistence

Tenant-scoped transactional persistence for GrowthOS referral and affiliate state.

@lssm-tech/integration.growth-persistence
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 2.1.5. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
servernode
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGEintegration.growth-persistenceintegrations

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

10 declarations · first 6 shownSELECT TO INSPECT

@lssm-tech/integration.growth-persistence

Server-only persistence for GrowthOS referral and affiliate state. It provides a serialized in-memory adapter for tests, a structural PgLite/Postgres adapter, and matching Drizzle table exports with tenant, entity, external conversion, link-code, reward-rule/beneficiary, webhook-event, and idempotency constraints.

Every mutation runs inside a transaction. Ledger entries and webhook receipts are immutable, payout items remain separately addressable, and duplicate conversions or rewards are rejected. Provider credentials and raw acquisition tokens are not persisted.

The optional ./marketing subpath provides SqlMarketingExecutionStore, SqlEditorialStore and SqlMediaGenerationStore using the same pinned-transaction SQL client. Each exposes an additive migrate() for host-owned migrations in the private marketing_execution schema. Revision updates append history atomically. Budget reservations serialize by brand scope, unknown dispatches retain liability, and definitive failures release their reservation. Media history stores provider job IDs and durable artifact references, never temporary download URLs.

SqlMarketingProposalStore persists goal-plan requests and immutable result history. It permits one generating-to-result transition per request, protects the original goal/brand binding, and isolates records by tenant, workspace and brand.

SqlMarketingConversionStore persists conversion revisions and append-only receipt history in the private marketing_execution schema. Call migrate() before mounting the conversion service. Accepted history is immutable, corrections are ordered, and CAS claims prevent concurrent workers from dispatching the same revision twice.

SqlMarketingObservationStore preserves immutable snapshots partitioned by campaign, platform, account and tenant/workspace/brand. Late polls cannot replace newer snapshots; conflicting same-timestamp writes fail. SqlMarketingObservationEvidenceStore retains sanitized provider responses for replay and rejects credential-bearing artifacts. Run both stores' migrate() methods before mounting the observation service.

Social scheduling adapters (SqlSocialScheduleStore, SqlSocialIntentStore, SqlSocialRecoveryLeases) implement library-owned contracts with SQL history, CAS, server-clock lease expiry and monotonically fenced recovery. Call their migrate() methods before starting workers. Canonical intent creation verifies the publication-key binding and rejects changed payloads; recovery claims require the matching live lease. Grant verification, policy evaluation, provider bindings and audit delivery remain host-owned requirements. The adapters never supply an allowing authority.

SqlXPublicationStore persists immutable reviewed thread plans, per-part CAS claims and append-only history. It verifies canonical root identity, scoped native request digests, predecessor IDs and confirmation author/media/reply facts. SqlSocialIntentStore supports fenced continuation of reconciled parent intents without changing their publication keys.

SqlXUploadStore persists immutable asset/chunk manifests and sequential native upload claims with transactional history. Migrate before starting upload workers. It rejects plan changes, altered native identity, reset uncertain steps and terminal-state rewrites. Source media bytes and credentials remain outside the store.

SqlLinkedInMediaJobStore persists scoped image/video plans, exact dispatch claims, part receipts and immutable history. Private upload capabilities are stored separately through LinkedInSecretSessionVault; the SQL payload contains only versioned references. Migrate before running the bounded native upload worker.

SqlPlanningApprovalStore persists private planning quotes, immutable issued receipts, revocation and revision history. Its consume method implements the canonical nonce store with atomic SQL uniqueness. Run migrate first and retain nonce rows through their expiry. Receipt records are private authority evidence, never analytics or public assets.

SqlMarketingOptimizationEvidenceStore records immutable assessed experiment documents, recomputes assessments before writes, and returns canonical SHA-256 artifact references. Use record for the marketing promotion wrapper's recordEvidence callback. Reads require explicit marketing scope and verify stored content against the artifact digest. Host authorization remains mandatory before storage access.

SqlMarketingOptimizationLifecycleStore implements the shared lifecycle store with an explicit marketing scope/program binding. Candidates are immutable; receipt appends serialize per candidate and validate canonical replay before committing. Duplicate receipts must match exactly; changed identities, digest chains and sequence gaps fail. It reconstructs current state from durable history. Effect adapters must separately honor the lifecycle idempotency key and expected state/sequence before external actions.

SqlContentRightsStore serializes rights grants and registered uses per tenant/workspace and appends immutable snapshots. Revocation and withdrawal queue creation share one transaction. Supply it to ContentRightsService; provider removal and confirmation evidence remain separate execution responsibilities.

Rights invariants are also enforced at the storage boundary: revoked grants cannot be reactivated, registered-use identities cannot change, confirmed withdrawals cannot be rewritten, and revocation cannot commit while existing uses lack withdrawal obligations. A failed invariant rolls back the entire scope transaction.

Terminal withdrawal jobs must commit with matching registered-use state and evidence. An unavailable automated attempt may later be resolved by separately evidenced manual confirmation; a confirmed job cannot leave its use pending.

SqlContentWithdrawalQueue supplies durable pending-use discovery and batch-result tracking. Migrate the rights store first, then the queue. Discovery selects pending uses within its authorized scope and processes never-attempted/least-recently-attempted items first, so unresolved removals do not starve later revocations. Terminal result records must agree with authoritative use state. Bind loadPending/recordResults to the installation withdrawal worker's callbacks.

SqlEditorialStore.listRecovery reads scoped publishing/unknown claims ordered by update time and ID. Reconciled terminal records disappear from discovery; publication is never resubmitted by this read.

SqlEditorialGitStore provides additive scoped Git dispatch persistence with revision CAS. Compiler artifacts cannot change after dispatch, and confirmed commit identity cannot be rewritten. Run its migration before enabling a Git publisher.

Run the updated SqlEditorialGitStore.migrate() before enabling preparation-failure handling. Additive claim-lock and failure tables serialize failure versus dispatch, retain immutable receipts and fence failed claims. Preserve one canonical writer while upgrading. Confirmed preparation failure permits the editorial article to be revised under a new publication claim.

SqlEditorialStore.listPage supports bounded keyset discovery with a C-collation ID index and parameterized filters. Run migrate to install the additive listing index. The runtime authorizes rows and emits summaries without Markdown.

SqlEditorialStore.listHistory reads existing append-only editorial_history records with exact scope, revision bounds and pagination. It does not modify or reconstruct prior revisions.

Media generation persistence rejects removal or replacement of existing artifact references. Each imported output may add a running-state history revision before final success.

Media persistence enforces immutable expected output counts and requires succeeded jobs to contain exactly that many durable artifact references when the count is known.

Declared capabilities.

Integration Growth Persistence

Tenant-scoped transactional persistence for GrowthOS referral and affiliate state.

Use it to

  • Adopt tenant-scoped transactional persistence for growthos referral and affiliate state

Requires

  • TypeScript

Choose another boundary when

  • The @lssm-tech/integration.growth-persistence package constraints do not match the target runtime or platform.

@lssm-tech/integration.growth-persistence

@lssm-tech/integration.growth-persistence/ddl

@lssm-tech/integration.growth-persistence/drizzle-schema

@lssm-tech/integration.growth-persistence/memory

@lssm-tech/integration.growth-persistence/pglite

@lssm-tech/integration.growth-persistence/types

Imports and export paths.

33 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

33 imports

@lssm-tech/integration.growth-persistence/ddl
@lssm-tech/integration.growth-persistence/types

Dependencies and related packages.

Runtime dependencies 10
drizzle-orm
catalog:data
zod
catalog:
Development dependencies 5
@electric-sql/pglite
catalog:data
typescript
catalog:

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
publish:pkg:canarybun publish:pkg --tag canary
buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
devcontractspec-bun-build dev
cleanrimraf dist .turbo
lint:checknode ../../../scripts/biome.cjs check .
lint:fixnode ../../../scripts/biome.cjs check --write .
testbun test
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit
Your view

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Your context

The different parts of you

Choose a starting point

A useful mix of context, visuals and gentle guidance.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Reading comfort

Choose your language

Interface language changes text only. Markets, prices and workflows keep their own settings.

Translation coverage

Original source

Navigation151
Graph616
Categories378
Portfolio833
Examples2,035
Source preview1,542

More translations will be added as content is reviewed.

This preference is saved on this browser.

Search the website

Useful starting points

No results. Try a shorter phrase, an operation name or another search area.

A LITTLE ROOM TO EXPLORE

Find something to explore.

Open a closer look on this page, try a different perspective, or follow the detail into its own page.

How previews and controls work
01

Look before you leave

Hover a link or focus it with Tab to see a preview. Clicking the original link or pressing Enter always opens its destination.

02

Stay with the context

Move into the preview to explore its sections. Use Alt + ↓ from a focused link to enter it with the keyboard. Escape closes it.

03

Open the possibilities

Disclosure rows, perspective choices and highlighted controls reveal more. Your view changes reading comfort and the context you explore.

A separate button for a closer look

Show small preview buttons beside links where there is room. Tap the eye to inspect, or tap the link to go straight there. This choice stays in this tab.

No browsing history is collected. Reduced motion follows your device and Your view.