diff --git a/notNeededPackages.json b/notNeededPackages.json index dbd21ab15b920e..87a1f9791b7127 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -12,10 +12,6 @@ "libraryName": "hyphenate-style-name", "asOfVersion": "1.1.0" }, - "@types/mongoose-geojson-schema": { - "libraryName": "mongoose-geojson-schema", - "asOfVersion": "3.0.0" - }, "a11y-dialog": { "libraryName": "a11y-dialog", "asOfVersion": "5.3.2" @@ -4617,10 +4613,18 @@ "libraryName": "mongoose-autopopulate", "asOfVersion": "0.16.0" }, + "mongoose-geojson-schema": { + "libraryName": "mongoose-geojson-schema", + "asOfVersion": "3.0.0" + }, "mongoose-paginate-v2": { "libraryName": "mongoose-paginate-v2", "asOfVersion": "1.6.0" }, + "mongoose-unique-validator": { + "libraryName": "mongoose-unique-validator", + "asOfVersion": "6.1.0" + }, "monk": { "libraryName": "monk", "asOfVersion": "6.0.0" diff --git a/types/mongoose-unique-validator/.npmignore b/types/mongoose-unique-validator/.npmignore deleted file mode 100644 index 93e307400a5456..00000000000000 --- a/types/mongoose-unique-validator/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!**/*.d.ts -!**/*.d.cts -!**/*.d.mts -!**/*.d.*.ts diff --git a/types/mongoose-unique-validator/index.d.ts b/types/mongoose-unique-validator/index.d.ts deleted file mode 100644 index d699224b3c712f..00000000000000 --- a/types/mongoose-unique-validator/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Schema } from "mongoose"; - -export = mongooseUniqueValidator; - -declare function mongooseUniqueValidator(schema: Schema, options?: any): void; - -declare namespace mongooseUniqueValidator { -} diff --git a/types/mongoose-unique-validator/mongoose-unique-validator-tests.ts b/types/mongoose-unique-validator/mongoose-unique-validator-tests.ts deleted file mode 100644 index 4b9af950500b62..00000000000000 --- a/types/mongoose-unique-validator/mongoose-unique-validator-tests.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Schema } from "mongoose"; -import uniqueValidator = require("mongoose-unique-validator"); - -const schema = new Schema({ - test: { type: String }, -}); - -schema.plugin(uniqueValidator); diff --git a/types/mongoose-unique-validator/package.json b/types/mongoose-unique-validator/package.json deleted file mode 100644 index 491fb4f15f5372..00000000000000 --- a/types/mongoose-unique-validator/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "private": true, - "name": "@types/mongoose-unique-validator", - "version": "1.0.9999", - "projects": [ - "https://github.com/blakehaswell/mongoose-unique-validator#readme" - ], - "dependencies": { - "@types/node": "*", - "mongoose": "^6.3.0" - }, - "devDependencies": { - "@types/mongoose-unique-validator": "workspace:." - }, - "owners": [] -} diff --git a/types/mongoose-unique-validator/tsconfig.json b/types/mongoose-unique-validator/tsconfig.json deleted file mode 100644 index bb8259a4fd2397..00000000000000 --- a/types/mongoose-unique-validator/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "module": "node16", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "mongoose-unique-validator-tests.ts" - ] -} diff --git a/types/saml/index.d.ts b/types/saml/index.d.ts index 1f3a8939b32ce9..0a581408fdcafe 100644 --- a/types/saml/index.d.ts +++ b/types/saml/index.d.ts @@ -14,6 +14,7 @@ export interface SamlSignedOpts { audiences?: string | string[] | undefined; cert: Buffer; digestAlgorithm?: string | undefined; + disallowEncryptionWithInsecureAlgorithm?: boolean | undefined; encryptionAlgorithm?: string | undefined; encryptionCert?: Buffer | undefined; encryptionPublicKey?: Buffer | undefined; @@ -31,10 +32,12 @@ export interface SamlSignedOpts { recipient?: string | undefined; sessionIndex?: string | undefined; signatureAlgorithm?: string | undefined; + signatureIdAttribute?: string | undefined; signatureNamespacePrefix?: string | undefined; subjectConfirmationMethod?: string | undefined; typedAttributes?: boolean | undefined; uid?: string | undefined; + warnOnInsecureEncryptionAlgorithm?: boolean | undefined; xpathToNodeBeforeSignature?: string | undefined; } @@ -44,6 +47,7 @@ export interface SamlUnassignedOpts { audiences?: string | string[] | undefined; cert?: Buffer | undefined; digestAlgorithm?: string | undefined; + disallowEncryptionWithInsecureAlgorithm?: boolean | undefined; encryptionAlgorithm?: string | undefined; encryptionCert?: Buffer | undefined; encryptionPublicKey?: Buffer | undefined; @@ -65,6 +69,7 @@ export interface SamlUnassignedOpts { subjectConfirmationMethod?: string | undefined; typedAttributes?: boolean | undefined; uid?: string | undefined; + warnOnInsecureEncryptionAlgorithm?: boolean | undefined; xpathToNodeBeforeSignature?: string | undefined; } export namespace Saml11 { diff --git a/types/saml/saml-tests.ts b/types/saml/saml-tests.ts index bddec535ccce16..41e09b05e8ae5b 100644 --- a/types/saml/saml-tests.ts +++ b/types/saml/saml-tests.ts @@ -85,3 +85,30 @@ Saml20.createUnsignedAssertion( }, () => {}, ); + +// v4.0 encryption options +Saml20.create( + { + cert: Buffer.from("certificate"), + key: Buffer.from("key"), + encryptionCert: Buffer.from("encryption-cert"), + encryptionAlgorithm: "http://www.w3.org/2009/xmlenc11#aes256-gcm", + keyEncryptionAlgorithm: "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p", + disallowEncryptionWithInsecureAlgorithm: true, + warnOnInsecureEncryptionAlgorithm: false, + }, + () => {}, +); + +// v4.0 signatureIdAttribute option +Saml11.create({ + cert: Buffer.from("certificate"), + key: Buffer.from("key"), + signatureIdAttribute: "ID", +}); + +// ReadonlyArray attribute values +const attrs: SamlAttributes = { + email: "foo@bar.com", + groups: ["Group1", "Group2"] as ReadonlyArray, +};