CipherStashDocs
ReferenceStack SDKAPI reference

encryption

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

@cipherstash/stack


encryption

Classes

BatchEncryptQueryOperation

Defined in: encryption/operations/batch-encrypt-query.ts:98

Extends

Constructors

Constructor
new BatchEncryptQueryOperation(client, terms): BatchEncryptQueryOperation;

Defined in: encryption/operations/batch-encrypt-query.ts:101

Parameters
client

Client

terms

readonly ScalarQueryTerm[]

Returns

BatchEncryptQueryOperation

Overrides
EncryptionOperation<
  EncryptedQueryResult[]
>.constructor

Methods

audit()
audit(config): this;

Defined in: 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: encryption/operations/base-operation.ts:28

Get the audit data for this operation.

Returns

AuditData

Inherited from
EncryptionOperation.getAuditData
then()
then<TResult1, TResult2>(onfulfilled?, onrejected?): Promise<TResult1 | TResult2>;

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

Make the operation thenable

Type Parameters
TResult1

TResult1 = Result<EncryptedQueryResult[], 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): BatchEncryptQueryOperationWithLockContext;

Defined in: encryption/operations/batch-encrypt-query.ts:108

Parameters
lockContext

LockContextInput

Returns

BatchEncryptQueryOperationWithLockContext

execute()
execute(): Promise&lt;Result&lt;EncryptedQueryResult[], EncryptionError&gt;>;

Defined in: encryption/operations/batch-encrypt-query.ts:119

Execute the operation and return a Result

Returns

Promise<Result<EncryptedQueryResult[], EncryptionError>>

Overrides
EncryptionOperation.execute

BulkDecryptModelsOperation

Defined in: encryption/operations/bulk-decrypt-models.ts:14

Extends

Type Parameters

T

T extends Record<string, unknown>

Constructors

Constructor
new BulkDecryptModelsOperation&lt;T&gt;(client, models): BulkDecryptModelsOperation&lt;T&gt;;

Defined in: encryption/operations/bulk-decrypt-models.ts:20

Parameters
client

Client

models

T[]

Returns

BulkDecryptModelsOperation<T>

Overrides
EncryptionOperation&lt;Decrypted&lt;T&gt;[]>.constructor

Methods

audit()
audit(config): this;

Defined in: 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: 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: encryption/operations/base-operation.ts:42

Make the operation thenable

Type Parameters
TResult1

TResult1 = Result<Decrypted<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): BulkDecryptModelsOperationWithLockContext&lt;T&gt;;

Defined in: encryption/operations/bulk-decrypt-models.ts:26

Parameters
lockContext

LockContextInput

Returns

BulkDecryptModelsOperationWithLockContext<T>

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

Defined in: encryption/operations/bulk-decrypt-models.ts:32

Execute the operation and return a Result

Returns

Promise<Result<Decrypted<T>[], EncryptionError>>

Overrides
EncryptionOperation.execute
getOperation()
getOperation(): {
  client: Client;
  models: T[];
};

Defined in: encryption/operations/bulk-decrypt-models.ts:63

Returns
{
  client: Client;
  models: T[];
}
client
client: Client;
models
models: T[];

BulkDecryptOperation

Defined in: encryption/operations/bulk-decrypt.ts:60

Extends

Constructors

Constructor
new BulkDecryptOperation(client, encryptedPayloads): BulkDecryptOperation;

Defined in: encryption/operations/bulk-decrypt.ts:64

Parameters
client

Client

encryptedPayloads

BulkDecryptPayload

Returns

BulkDecryptOperation

Overrides
EncryptionOperation&lt;BulkDecryptedData&gt;.constructor

Methods

audit()
audit(config): this;

Defined in: 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: 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: encryption/operations/base-operation.ts:42

Make the operation thenable

Type Parameters
TResult1

TResult1 = Result<BulkDecryptedData, 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): BulkDecryptOperationWithLockContext;

Defined in: encryption/operations/bulk-decrypt.ts:70

Parameters
lockContext

LockContextInput

Returns

BulkDecryptOperationWithLockContext

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

Defined in: encryption/operations/bulk-decrypt.ts:76

Execute the operation and return a Result

Returns

Promise<Result<BulkDecryptedData, EncryptionError>>

Overrides
EncryptionOperation.execute
getOperation()
getOperation(): {
  client: Client;
  encryptedPayloads: BulkDecryptPayload;
};

Defined in: encryption/operations/bulk-decrypt.ts:118

Returns
{
  client: Client;
  encryptedPayloads: BulkDecryptPayload;
}
client
client: Client;
encryptedPayloads
encryptedPayloads: BulkDecryptPayload;

BulkEncryptModelsOperation

Defined in: encryption/operations/bulk-encrypt-models.ts:14

Extends

  • EncryptionOperation<T[]>

Type Parameters

T

T extends Record<string, unknown>

Constructors

Constructor
new BulkEncryptModelsOperation&lt;T&gt;(
   client, 
   models, 
   table): BulkEncryptModelsOperation&lt;T&gt;;

Defined in: encryption/operations/bulk-encrypt-models.ts:21

Parameters
client

Client

models

Record<string, unknown>[]

table

BuildableTable

Returns

BulkEncryptModelsOperation<T>

Overrides
EncryptionOperation&lt;T[]&gt;.constructor

Methods

audit()
audit(config): this;

Defined in: 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: 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: 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): BulkEncryptModelsOperationWithLockContext&lt;T&gt;;

Defined in: encryption/operations/bulk-encrypt-models.ts:32

Parameters
lockContext

LockContextInput

Returns

BulkEncryptModelsOperationWithLockContext<T>

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

Defined in: encryption/operations/bulk-encrypt-models.ts:38

Execute the operation and return a Result

Returns

Promise<Result<T[], EncryptionError>>

Overrides
EncryptionOperation.execute
getOperation()
getOperation(): {
  client: Client;
  models: Record&lt;string, unknown&gt;[];
  table: BuildableTable;
};

Defined in: encryption/operations/bulk-encrypt-models.ts:75

Returns
{
  client: Client;
  models: Record&lt;string, unknown&gt;[];
  table: BuildableTable;
}
client
client: Client;
models
models: Record&lt;string, unknown&gt;[];
table
table: BuildableTable;

BulkEncryptOperation

Defined in: encryption/operations/bulk-encrypt.ts:73

Extends

Constructors

Constructor
new BulkEncryptOperation(
   client, 
   plaintexts, 
   opts): BulkEncryptOperation;

Defined in: encryption/operations/bulk-encrypt.ts:79

Parameters
client

Client

plaintexts

BulkEncryptPayload

opts

EncryptOptions

Returns

BulkEncryptOperation

Overrides
EncryptionOperation&lt;BulkEncryptedData&gt;.constructor

Methods

audit()
audit(config): this;

Defined in: 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: 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: encryption/operations/base-operation.ts:42

Make the operation thenable

Type Parameters
TResult1

TResult1 = Result<BulkEncryptedData, 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): BulkEncryptOperationWithLockContext;

Defined in: encryption/operations/bulk-encrypt.ts:91

Parameters
lockContext

LockContextInput

Returns

BulkEncryptOperationWithLockContext

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

Defined in: encryption/operations/bulk-encrypt.ts:97

Execute the operation and return a Result

Returns

Promise<Result<BulkEncryptedData, EncryptionError>>

Overrides
EncryptionOperation.execute
getOperation()
getOperation(): {
  client: Client;
  plaintexts: BulkEncryptPayload;
  column: BuildableColumn;
  table: BuildableTable;
};

Defined in: encryption/operations/bulk-encrypt.ts:148

Returns
{
  client: Client;
  plaintexts: BulkEncryptPayload;
  column: BuildableColumn;
  table: BuildableTable;
}
client
client: Client;
plaintexts
plaintexts: BulkEncryptPayload;
column
column: BuildableColumn;
table
table: BuildableTable;

DecryptModelOperation

Defined in: encryption/operations/decrypt-model.ts:14

Extends

Type Parameters

T

T extends Record<string, unknown>

Constructors

Constructor
new DecryptModelOperation&lt;T&gt;(client, model): DecryptModelOperation&lt;T&gt;;

Defined in: encryption/operations/decrypt-model.ts:20

Parameters
client

Client

model

T

Returns

DecryptModelOperation<T>

Overrides
EncryptionOperation&lt;Decrypted&lt;T&gt;>.constructor

Methods

audit()
audit(config): this;

Defined in: 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: 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: encryption/operations/base-operation.ts:42

Make the operation thenable

Type Parameters
TResult1

TResult1 = Result<Decrypted<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): DecryptModelOperationWithLockContext&lt;T&gt;;

Defined in: encryption/operations/decrypt-model.ts:26

Parameters
lockContext

LockContextInput

Returns

DecryptModelOperationWithLockContext<T>

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

Defined in: encryption/operations/decrypt-model.ts:32

Execute the operation and return a Result

Returns

Promise<Result<Decrypted<T>, EncryptionError>>

Overrides
EncryptionOperation.execute
getOperation()
getOperation(): {
  client: Client;
  model: T;
};

Defined in: encryption/operations/decrypt-model.ts:62

Returns
{
  client: Client;
  model: T;
}
client
client: Client;
model
model: T;

DecryptOperation

Defined in: encryption/operations/decrypt.ts:18

Decrypts an encrypted payload using the provided client. This is the type returned by the decrypt method of the EncryptionClient.

Extends

  • EncryptionOperation<JsPlaintext>

Constructors

Constructor
new DecryptOperation(client, encryptedData): DecryptOperation;

Defined in: encryption/operations/decrypt.ts:26

Parameters
client

Client

encryptedData

EncryptedPayload | null

Returns

DecryptOperation

Overrides
EncryptionOperation&lt;JsPlaintext&gt;.constructor

Methods

audit()
audit(config): this;

Defined in: 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: 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: encryption/operations/base-operation.ts:42

Make the operation thenable

Type Parameters
TResult1

TResult1 = Result<JsPlaintext, 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): DecryptOperationWithLockContext;

Defined in: encryption/operations/decrypt.ts:32

Parameters
lockContext

LockContextInput

Returns

DecryptOperationWithLockContext

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

Defined in: encryption/operations/decrypt.ts:38

Execute the operation and return a Result

Returns

Promise<Result<JsPlaintext, EncryptionError>>

Overrides
EncryptionOperation.execute
getOperation()
getOperation(): {
  client: Client;
  encryptedData: EncryptedPayload | null;
  auditData?: Record&lt;string, unknown&gt;;
};

Defined in: encryption/operations/decrypt.ts:76

Returns
{
  client: Client;
  encryptedData: EncryptedPayload | null;
  auditData?: Record&lt;string, unknown&gt;;
}
client
client: Client;
encryptedData
encryptedData: EncryptedPayload | null;
auditData?
optional auditData: Record&lt;string, unknown&gt;;

EncryptModelOperation

Defined in: encryption/operations/encrypt-model.ts:14

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: encryption/operations/encrypt-model.ts:21

Parameters
client

Client

model

Record<string, unknown>

table

BuildableTable

Returns

EncryptModelOperation<T>

Overrides
EncryptionOperation&lt;T&gt;.constructor

Methods

audit()
audit(config): this;

Defined in: 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: 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: 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: encryption/operations/encrypt-model.ts:32

Parameters
lockContext

LockContextInput

Returns

EncryptModelOperationWithLockContext<T>

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

Defined in: encryption/operations/encrypt-model.ts:38

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: BuildableTable;
};

Defined in: encryption/operations/encrypt-model.ts:74

Returns
{
  client: Client;
  model: Record&lt;string, unknown&gt;;
  table: BuildableTable;
}
client
client: Client;
model
model: Record&lt;string, unknown&gt;;
table
table: BuildableTable;

EncryptQueryOperation

Defined in: encryption/operations/encrypt-query.ts:26

Extends

Constructors

Constructor
new EncryptQueryOperation(
   client, 
   plaintext, 
   opts): EncryptQueryOperation;

Defined in: encryption/operations/encrypt-query.ts:27

Parameters
client

Client

plaintext

Plaintext | null | undefined

opts

QueryTermBase

Returns

EncryptQueryOperation

Overrides
EncryptionOperation&lt;EncryptedQueryResult&gt;.constructor

Methods

audit()
audit(config): this;

Defined in: 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: 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: encryption/operations/base-operation.ts:42

Make the operation thenable

Type Parameters
TResult1

TResult1 = Result<EncryptedQueryResult, 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): EncryptQueryOperationWithLockContext;

Defined in: encryption/operations/encrypt-query.ts:35

Parameters
lockContext

LockContextInput

Returns

EncryptQueryOperationWithLockContext

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

Defined in: encryption/operations/encrypt-query.ts:47

Execute the operation and return a Result

Returns

Promise<Result<EncryptedQueryResult, EncryptionError>>

Overrides
EncryptionOperation.execute
getOperation()
getOperation(): {
  client: Client;
  plaintext: Plaintext | null | undefined;
  column: BuildableQueryColumn;
  table: BuildableTable;
  queryType?: QueryTypeName;
  returnType?: EncryptedReturnType;
};

Defined in: encryption/operations/encrypt-query.ts:119

Returns
{
  client: Client;
  plaintext: Plaintext | null | undefined;
  column: BuildableQueryColumn;
  table: BuildableTable;
  queryType?: QueryTypeName;
  returnType?: EncryptedReturnType;
}
client
client: Client;
plaintext
plaintext: Plaintext | null | undefined;
column
column: BuildableQueryColumn;
table
table: BuildableTable;
queryType?
optional queryType: QueryTypeName;
returnType?
optional returnType: EncryptedReturnType;

EncryptOperation

Defined in: encryption/operations/encrypt.ts:22

Extends

Constructors

Constructor
new EncryptOperation(
   client, 
   plaintext, 
   opts): EncryptOperation;

Defined in: encryption/operations/encrypt.ts:32

Parameters
client

Client

plaintext

Plaintext | null

opts

EncryptOptions

Returns

EncryptOperation

Overrides
EncryptionOperation&lt;Encrypted&gt;.constructor

Methods

audit()
audit(config): this;

Defined in: 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: 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: encryption/operations/base-operation.ts:42

Make the operation thenable

Type Parameters
TResult1

TResult1 = Result<EncryptedPayload, 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): EncryptOperationWithLockContext;

Defined in: encryption/operations/encrypt.ts:44

Parameters
lockContext

LockContextInput

Returns

EncryptOperationWithLockContext

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

Defined in: encryption/operations/encrypt.ts:50

Execute the operation and return a Result

Returns

Promise<Result<EncryptedPayload, EncryptionError>>

Overrides
EncryptionOperation.execute
getOperation()
getOperation(): {
  client: Client;
  plaintext: Plaintext | null;
  column: BuildableColumn;
  table: BuildableTable;
};

Defined in: encryption/operations/encrypt.ts:102

Returns
{
  client: Client;
  plaintext: Plaintext | null;
  column: BuildableColumn;
  table: BuildableTable;
}
client
client: Client;
plaintext
plaintext: Plaintext | null;
column
column: BuildableColumn;
table
table: BuildableTable;

Functions

noClientError()

function noClientError(): Error;

Defined in: encryption/index.ts:64

Returns

Error


Encryption()

Call Signature

function Encryption&lt;S&gt;(config): Promise&lt;EncryptionClient&lt;S&gt;>;

Defined in: encryption/index.ts:870

Type Parameters
S

S extends readonly [AnyV3Table, AnyV3Table]

Parameters
config
schemas

S

config?

ClientConfig

Returns

Promise<EncryptionClient<S>>

Call Signature

function Encryption&lt;S&gt;(config): Promise&lt;EncryptionClient&lt;S&gt;>;

Defined in: encryption/index.ts:873

Type Parameters
S

S extends readonly AnyV3Table[]

Parameters
config
schemas

NonEmptyV3<S>

config?

ClientConfig

Returns

Promise<EncryptionClient<S>>

References

EncryptionClient

Re-exports EncryptionClient

On this page

encryptionClassesBatchEncryptQueryOperationExtendsConstructorsConstructorParametersclienttermsReturnsOverridesMethodsaudit()ParametersconfigReturnsInherited fromgetAuditData()ReturnsInherited fromthen()Type ParametersTResult1TResult2Parametersonfulfilled?onrejected?ReturnsInherited fromwithLockContext()ParameterslockContextReturnsexecute()ReturnsOverridesBulkDecryptModelsOperationExtendsType ParametersTConstructorsConstructorParametersclientmodelsReturnsOverridesMethodsaudit()ParametersconfigReturnsInherited fromgetAuditData()ReturnsInherited fromthen()Type ParametersTResult1TResult2Parametersonfulfilled?onrejected?ReturnsInherited fromwithLockContext()ParameterslockContextReturnsexecute()ReturnsOverridesgetOperation()ReturnsclientmodelsBulkDecryptOperationExtendsConstructorsConstructorParametersclientencryptedPayloadsReturnsOverridesMethodsaudit()ParametersconfigReturnsInherited fromgetAuditData()ReturnsInherited fromthen()Type ParametersTResult1TResult2Parametersonfulfilled?onrejected?ReturnsInherited fromwithLockContext()ParameterslockContextReturnsexecute()ReturnsOverridesgetOperation()ReturnsclientencryptedPayloadsBulkEncryptModelsOperationExtendsType ParametersTConstructorsConstructorParametersclientmodelstableReturnsOverridesMethodsaudit()ParametersconfigReturnsInherited fromgetAuditData()ReturnsInherited fromthen()Type ParametersTResult1TResult2Parametersonfulfilled?onrejected?ReturnsInherited fromwithLockContext()ParameterslockContextReturnsexecute()ReturnsOverridesgetOperation()ReturnsclientmodelstableBulkEncryptOperationExtendsConstructorsConstructorParametersclientplaintextsoptsReturnsOverridesMethodsaudit()ParametersconfigReturnsInherited fromgetAuditData()ReturnsInherited fromthen()Type ParametersTResult1TResult2Parametersonfulfilled?onrejected?ReturnsInherited fromwithLockContext()ParameterslockContextReturnsexecute()ReturnsOverridesgetOperation()ReturnsclientplaintextscolumntableDecryptModelOperationExtendsType ParametersTConstructorsConstructorParametersclientmodelReturnsOverridesMethodsaudit()ParametersconfigReturnsInherited fromgetAuditData()ReturnsInherited fromthen()Type ParametersTResult1TResult2Parametersonfulfilled?onrejected?ReturnsInherited fromwithLockContext()ParameterslockContextReturnsexecute()ReturnsOverridesgetOperation()ReturnsclientmodelDecryptOperationExtendsConstructorsConstructorParametersclientencryptedDataReturnsOverridesMethodsaudit()ParametersconfigReturnsInherited fromgetAuditData()ReturnsInherited fromthen()Type ParametersTResult1TResult2Parametersonfulfilled?onrejected?ReturnsInherited fromwithLockContext()ParameterslockContextReturnsexecute()ReturnsOverridesgetOperation()ReturnsclientencryptedDataauditData?EncryptModelOperationExtendsType ParametersTConstructorsConstructorParametersclientmodeltableReturnsOverridesMethodsaudit()ParametersconfigReturnsInherited fromgetAuditData()ReturnsInherited fromthen()Type ParametersTResult1TResult2Parametersonfulfilled?onrejected?ReturnsInherited fromwithLockContext()ParameterslockContextReturnsexecute()ReturnsOverridesgetOperation()ReturnsclientmodeltableEncryptQueryOperationExtendsConstructorsConstructorParametersclientplaintextoptsReturnsOverridesMethodsaudit()ParametersconfigReturnsInherited fromgetAuditData()ReturnsInherited fromthen()Type ParametersTResult1TResult2Parametersonfulfilled?onrejected?ReturnsInherited fromwithLockContext()ParameterslockContextReturnsexecute()ReturnsOverridesgetOperation()ReturnsclientplaintextcolumntablequeryType?returnType?EncryptOperationExtendsConstructorsConstructorParametersclientplaintextoptsReturnsOverridesMethodsaudit()ParametersconfigReturnsInherited fromgetAuditData()ReturnsInherited fromthen()Type ParametersTResult1TResult2Parametersonfulfilled?onrejected?ReturnsInherited fromwithLockContext()ParameterslockContextReturnsexecute()ReturnsOverridesgetOperation()ReturnsclientplaintextcolumntableFunctionsnoClientError()ReturnsEncryption()Call SignatureType ParametersSParametersconfigschemasconfig?ReturnsCall SignatureType ParametersSParametersconfigschemasconfig?ReturnsReferencesEncryptionClient