@karmaniverous/entity-manager
Advanced tools
Comparing version 6.12.0 to 6.13.0
@@ -6,2 +6,3 @@ 'use strict'; | ||
var addKeys = require('./addKeys.js'); | ||
var encodeGeneratedProperty = require('./encodeGeneratedProperty.js'); | ||
var findIndexToken = require('./findIndexToken.js'); | ||
@@ -53,2 +54,15 @@ var ParsedConfig = require('./ParsedConfig.js'); | ||
/** | ||
* Encode a generated property value. Returns a string or undefined if atomicity requirement of sharded properties not met. | ||
* | ||
* @param property - {@link Config.generatedProperties | Generated property} key. | ||
* @param item - Partial {@link ItemMap | `ItemMap`} object. | ||
* | ||
* @returns Encoded generated property value. | ||
* | ||
* @throws `Error` if `property` is not a {@link Config.generatedProperties | generated property}. | ||
*/ | ||
encodeGeneratedProperty(property, item) { | ||
return encodeGeneratedProperty.encodeGeneratedProperty(this, property, item); | ||
} | ||
/** | ||
* Update generated properties, hash key, and range key on an {@link EntityItem | `EntityItem`} object. | ||
@@ -55,0 +69,0 @@ * |
@@ -545,2 +545,13 @@ import { EntityMap, TranscodeMap, ConditionalProperty, Exactify, PropertiesOfType, TranscodableProperties, FlattenEntityMap, Transcodes, SortOrder, MutuallyExclusive, NotNever, DefaultTranscodeMap } from '@karmaniverous/entity-tools'; | ||
/** | ||
* Encode a generated property value. Returns a string or undefined if atomicity requirement of sharded properties not met. | ||
* | ||
* @param property - {@link Config.generatedProperties | Generated property} key. | ||
* @param item - Partial {@link ItemMap | `ItemMap`} object. | ||
* | ||
* @returns Encoded generated property value. | ||
* | ||
* @throws `Error` if `property` is not a {@link Config.generatedProperties | generated property}. | ||
*/ | ||
encodeGeneratedProperty<C extends BaseConfigMap>(property: C['ShardedKeys'] | C['UnshardedKeys'], item: EntityItem<C>): string | undefined; | ||
/** | ||
* Update generated properties, hash key, and range key on an {@link EntityItem | `EntityItem`} object. | ||
@@ -588,3 +599,3 @@ * | ||
*/ | ||
findIndexToken(hashKeyToken: C['HashKey'] | C['ShardedKeys'], rangeKeyToken: C['RangeKey'] | C['UnshardedKeys'] | C['TranscodedProperties']): string | undefined; | ||
findIndexToken(hashKeyToken: string, rangeKeyToken: string): string | undefined; | ||
/** | ||
@@ -591,0 +602,0 @@ * Query a database entity across shards in a provider-generic fashion. |
import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib'; | ||
import { pick } from 'radash'; | ||
import { addKeys } from './addKeys.js'; | ||
import { encodeGeneratedProperty } from './encodeGeneratedProperty.js'; | ||
import { findIndexToken } from './findIndexToken.js'; | ||
@@ -50,2 +51,15 @@ import { configSchema } from './ParsedConfig.js'; | ||
/** | ||
* Encode a generated property value. Returns a string or undefined if atomicity requirement of sharded properties not met. | ||
* | ||
* @param property - {@link Config.generatedProperties | Generated property} key. | ||
* @param item - Partial {@link ItemMap | `ItemMap`} object. | ||
* | ||
* @returns Encoded generated property value. | ||
* | ||
* @throws `Error` if `property` is not a {@link Config.generatedProperties | generated property}. | ||
*/ | ||
encodeGeneratedProperty(property, item) { | ||
return encodeGeneratedProperty(this, property, item); | ||
} | ||
/** | ||
* Update generated properties, hash key, and range key on an {@link EntityItem | `EntityItem`} object. | ||
@@ -52,0 +66,0 @@ * |
@@ -135,3 +135,3 @@ { | ||
"types": "dist/index.d.ts", | ||
"version": "6.12.0" | ||
"version": "6.13.0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
178870
3884