The core modeling package for patternmesh.
It provides:
softDelete, archive)pnpm add @patternmeshjs/core
Requirements:
defineTablekeyBrandstringnumberbooleandatetimeenumTypeidjsonttlobjectrecordliststringSetnumberSetfieldRefpathRefFieldDefSchemaRecordInferItemCreateInputPrimaryKeyInputSettableShapeAddableShapeRemovableKeysFieldRefentityCompiledEntityCOMPILED_ENTITYconnectConnectOptionsConnectedDbEach repository exposes:
create(data, options?) — strict not-exists writeput(data, options?) — unconditional writeget(key)delete(key, options?)find.<pattern>(input)batchGet(keys)batchWrite({ puts, deletes })update(key)explain.createexplain.putexplain.getexplain.deleteexplain.find.<pattern>explain.batchGetexplain.batchWritecreateRelationscreateReadBundlescreateWriteRecipesRelationBuilderReadBundleBuilderReadBundleStepBuilderWriteRecipeBuilderWriteRecipeStepBuilderRelationDeclRelationsConfigHasManyDeclBelongsToDeclHasManyThroughDeclReadBundleStepDeclReadBundleDeclReadBundlesConfigWriteRecipeStepDeclWriteRecipeDeclWriteRecipesConfigTRANSACT_MAX_ITEMSTransactWriteBuilderTransactReadBuildercreateTransactServicesCompiledOperationPageOpaqueCursorDynamoReadPlanAccessPatternDefFieldMetaBatchChunkPlanQuerySelectModeReturnConsumedCapacityModeDynamoAdapterGetItemInputPutItemInputDeleteItemInputDeleteItemOutputQueryInputUpdateItemInputQueryOutputScanInputScanOutputConsumedCapacityPutItemOutputBatchGetItemInputBatchGetItemOutputBatchWriteItemInputBatchWriteItemOutputBatchWritePutBatchWriteDeleteTransactGetSlotTransactGetItemsInputTransactGetItemsOutputTransactWriteItemInputTransactWriteItemsInputDynamoModelErrorValidationErrorConfigurationErrorConditionFailedErrorItemAlreadyExistsErrorNotUniqueErrorQueryLimitErrorBatchWriteExhaustedErrorBatchGetExhaustedErrorTransactionCanceledErrorIdempotentParameterMismatchErrorTransactionCancellationReasoncreateAccessPatternFactoryBATCH_GET_MAX_KEYSBATCH_WRITE_MAX_OPSchunkArrayCreateReturnModeDeleteReturnModeencodeCursordecodeCursorcreate() enforces attribute_not_exists(partitionKey) and throws
ItemAlreadyExistsError on collision.put() overwrites unconditionally.pk, sk, index key attributes, and the internal
discriminator.batchGet(keys) preserves input order and returns null for misses.batchWrite({ puts, deletes }) is chunked per DynamoDB limits and throws
BatchWriteExhaustedError if unprocessed items remain after retries.ConsistentRead on a GSI route throws ValidationError.ap.count(...) is the supported COUNT surface.ap.scan(...) is explicit; there is no implicit repository scan.db.tx.write supports at most 100 participants.clientRequestToken for DynamoDB's 10-minute idempotency window.ValidationErrorttl() values must be non-negative integer epoch secondsjson() values must be JSON-serializableobject, list, and set fields when data is bounded and read with the
parent item.