CipherStashDocs
StackLatestPackagesStackSrcEncryptionClasses

EncryptModelOperation

EncryptModelOperation is a class in @cipherstash/stack. TypeScript API reference with its signature, parameters, and usage.

@cipherstash/stack


Class: EncryptModelOperation<T>

Defined in: packages/stack/src/encryption/operations/encrypt-model.ts:15

Extends

  • EncryptionOperation<T>

Type Parameters

T

T extends Record<string, unknown>

Constructors

Constructor

new EncryptModelOperation&lt;T&gt;(
   client, 
   model, 
   table): EncryptModelOperation&lt;T&gt;;

Defined in: packages/stack/src/encryption/operations/encrypt-model.ts:22

Parameters

client

Client

model

Record<string, unknown>

table

EncryptedTable<EncryptedTableColumn>

Returns

EncryptModelOperation<T>

Overrides

EncryptionOperation&lt;T&gt;.constructor

Methods

audit()

audit(config): this;

Defined in: packages/stack/src/encryption/operations/base-operation.ts:20

Attach audit metadata to this operation. Can be chained.

Parameters

config

AuditConfig

Configuration for ZeroKMS audit logging

Returns

this

Inherited from

EncryptionOperation.audit

getAuditData()

getAuditData(): AuditData;

Defined in: packages/stack/src/encryption/operations/base-operation.ts:28

Get the audit data for this operation.

Returns

AuditData

Inherited from

EncryptionOperation.getAuditData

then()

then&lt;TResult1, TResult2&gt;(onfulfilled?, onrejected?): Promise&lt;TResult1 | TResult2&gt;;

Defined in: packages/stack/src/encryption/operations/base-operation.ts:42

Make the operation thenable

Type Parameters

TResult1

TResult1 = Result<T, EncryptionError>

TResult2

TResult2 = never

Parameters

onfulfilled?

(value) => TResult1 | PromiseLike<TResult1> | null

onrejected?

(reason) => TResult2 | PromiseLike<TResult2> | null

Returns

Promise<TResult1 | TResult2>

Inherited from

EncryptionOperation.then

withLockContext()

withLockContext(lockContext): EncryptModelOperationWithLockContext&lt;T&gt;;

Defined in: packages/stack/src/encryption/operations/encrypt-model.ts:33

Parameters

lockContext

LockContext

Returns

EncryptModelOperationWithLockContext<T>


execute()

execute(): Promise&lt;Result&lt;T, EncryptionError&gt;>;

Defined in: packages/stack/src/encryption/operations/encrypt-model.ts:39

Execute the operation and return a Result

Returns

Promise<Result<T, EncryptionError>>

Overrides

EncryptionOperation.execute

getOperation()

getOperation(): {
  client: Client;
  model: Record&lt;string, unknown&gt;;
  table: EncryptedTable&lt;EncryptedTableColumn&gt;;
};

Defined in: packages/stack/src/encryption/operations/encrypt-model.ts:75

Returns

{
  client: Client;
  model: Record&lt;string, unknown&gt;;
  table: EncryptedTable&lt;EncryptedTableColumn&gt;;
}
client
client: Client;
model
model: Record&lt;string, unknown&gt;;
table
table: EncryptedTable&lt;EncryptedTableColumn&gt;;

On this page