@dynamatix/gb-schemas 2.20.1 → 2.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ import mongoose from 'mongoose';
2
+ const applicantDirectDebitSchema = new mongoose.Schema({
3
+ accountNumber: { type: String },
4
+ addressLine1: { type: String },
5
+ addressLine2: { type: String },
6
+ Applicants: { type: String },
7
+ branch: { type: String },
8
+ city: { type: String },
9
+ contactPostcode: { type: String },
10
+ institution: { type: String },
11
+ isConfirmDeclaration: { type: String, default: false },
12
+ nameOfAccountHolder: { type: String },
13
+ selectedPaymentDay: { type: String },
14
+ sortCode: { type: String }
15
+ }, { timestamps: true });
16
+ export default applicantDirectDebitSchema;
@@ -117,6 +117,10 @@ export declare class EncryptionPlugin {
117
117
  * keys, parent-object values containing encrypted leaves, and full
118
118
  * replacement documents (updates without atomic operators).
119
119
  *
120
+ * `null`/`undefined` operator values pass through untouched so callers
121
+ * can clear encrypted fields (`$set: { field: null }`) — libmongocrypt
122
+ * rejects those BSON types for explicit encryption.
123
+ *
120
124
  * @param update - The mutable update object from `Query.getUpdate()`.
121
125
  * @param paths - Encrypted dot paths of the schema.
122
126
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"encryption.plugin.d.ts","sourceRoot":"","sources":["../../../shared/encryption/encryption.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAmB,MAAM,UAAU,CAAC;AAuBnD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,gBAAgB;IACzB,OAAO;IAEP;;;;;;;;;;;;;;OAcG;WACW,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAczC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAc5B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAUjC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAiBjC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAgChC;;;;;;;;;;;OAWG;mBACkB,aAAa;IA0BlC;;;;;;;;;;;;OAYG;mBACkB,eAAe;IAiBpC;;;;;;;;;;OAUG;mBACkB,iBAAiB;IAQtC;;;;;;;;;;;OAWG;mBACkB,gBAAgB;IAarC;;;;;;;;;;;OAWG;mBACkB,cAAc;IAuBnC;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAU/B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAU/B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAO9B"}
1
+ {"version":3,"file":"encryption.plugin.d.ts","sourceRoot":"","sources":["../../../shared/encryption/encryption.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAmB,MAAM,UAAU,CAAC;AAuBnD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,gBAAgB;IACzB,OAAO;IAEP;;;;;;;;;;;;;;OAcG;WACW,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAczC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAc5B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAUjC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAiBjC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAgChC;;;;;;;;;;;;;;;OAeG;mBACkB,aAAa;IA6BlC;;;;;;;;;;;;OAYG;mBACkB,eAAe;IAiBpC;;;;;;;;;;OAUG;mBACkB,iBAAiB;IAQtC;;;;;;;;;;;OAWG;mBACkB,gBAAgB;IAarC;;;;;;;;;;;OAWG;mBACkB,cAAc;IAuBnC;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAU/B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAU/B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAO9B"}
@@ -174,6 +174,10 @@ export class EncryptionPlugin {
174
174
  * keys, parent-object values containing encrypted leaves, and full
175
175
  * replacement documents (updates without atomic operators).
176
176
  *
177
+ * `null`/`undefined` operator values pass through untouched so callers
178
+ * can clear encrypted fields (`$set: { field: null }`) — libmongocrypt
179
+ * rejects those BSON types for explicit encryption.
180
+ *
177
181
  * @param update - The mutable update object from `Query.getUpdate()`.
178
182
  * @param paths - Encrypted dot paths of the schema.
179
183
  * @example
@@ -194,6 +198,9 @@ export class EncryptionPlugin {
194
198
  continue;
195
199
  }
196
200
  for (const [key, value] of Object.entries(target)) {
201
+ if (value === null || value === undefined) {
202
+ continue;
203
+ }
197
204
  for (const path of paths) {
198
205
  if (key === path) {
199
206
  target[key] = await transform(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.20.1",
3
+ "version": "2.20.3",
4
4
  "description": "All the schemas for gatehouse bank back-end .",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",